Skip to content

"fs.open" results in an abort #37807

Description

@zyscoder

What steps will reproduce the bug?

Setup a node instance,

» node

and run the following javascript code.

cb = function(err,fd){}; fs.open("", 100000000000000, cb);

Then an abort occurs.

How often does it reproduce? Is there a required condition?

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
Welcome to Node.js v14.15.1.
Type ".help" for more information.
> cb = function(err,fd){}; fs.open("", 100000000000000, cb);
node[67032]: ../src/node_file.cc:1712:void node::fs::Open(const v8::FunctionCallbackInfo<v8::Value>&): Assertion `args[1]->IsInt32()' failed.
 1: 0xa03530 node::Abort() [node]
 2: 0xa035ae  [node]
 3: 0xa099c2  [node]
 4: 0xbe369b  [node]
 5: 0xbe4c46  [node]
 6: 0xbe52c6 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [node]
 7: 0x13ff259  [node]
[1]    67032 abort (core dumped)  node

Additional information

Activity

  1. aduh95 commented on Mar 19, 2021

    @aduh95
    Contributor

    Duplicate of #37430.
    Fixed by #37480, fix will be released with Node.js v16.0.0.

  2. added
    duplicateIssues and PRs that are duplicates of other issues or PRs.
    on Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateIssues and PRs that are duplicates of other issues or PRs.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions