-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Closed
Labels
fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.
Description
- Version: v10.24.0
- Platform: Linux 5.8.0-38-generic The binary and long term compatibility with node #43~20.04.1-Ubuntu SMP Tue Jan 12 16:39:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
- Subsystem: fs.write
What steps will reproduce the bug?
Setup a node instance,
» node
and run the following javascript code.
fs.write(2**31,undefined,(err,written,buffer)=>{})
Then the node instance occurs an abort.
How often does it reproduce? Is there a required condition?
In my practice, this abort can be reproduced only on v10.x but not on v12.x and v14.x. This abort can always be triggered following the steps above.
What is the expected behavior?
If any error occurs, an exception or other similar error-reporting stuff should be thrown. There is no reason to abort the whole node process.
What do you see instead?
» node
> fs.write(2**31,undefined,(err,written,buffer)=>{})
/home/zys/Toolchains/node-v10.24.0/node[2930715]: ../src/node_file.cc:1818:void node::fs::WriteString(const FunctionCallbackInfo<v8::Value> &): Assertion `args[0]->IsInt32()' failed.
1: 0x17c3524 node::DumpBacktrace(_IO_FILE*) [/home/zys/Toolchains/node-v10.24.0/node]
2: 0x1818dbe node::Abort() [/home/zys/Toolchains/node-v10.24.0/node]
3: 0x1816245 [/home/zys/Toolchains/node-v10.24.0/node]
4: 0x18bdcd0 [/home/zys/Toolchains/node-v10.24.0/node]
5: 0x1ec8fe9 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) [/home/zys/Toolchains/node-v10.24.0/node]
6: 0x1ec67fa [/home/zys/Toolchains/node-v10.24.0/node]
7: 0x1ec4538 [/home/zys/Toolchains/node-v10.24.0/node]
8: 0x7e988e95bf3d
[1] 2930715 abort /home/zys/Toolchains/node-v10.24.0/node
Additional information
Metadata
Metadata
Assignees
Labels
fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.