Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: blockList.addSubnet throw Assertion `args[2]->IsInt32()' failed when prefix is NaN #36731

Closed
Lxxyx opened this issue Jan 2, 2021 · 0 comments
Labels
confirmed-bug Issues with confirmed bugs. net Issues and PRs related to the net subsystem.

Comments

@Lxxyx
Copy link
Member

Lxxyx commented Jan 2, 2021

  • Version: 15.4.0
  • Platform: macOS 10.15.7
  • Subsystem: net

What steps will reproduce the bug?

const net = require('net');
const blockList = new net.BlockList();
blockList.addSubnet('', NaN);

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

Everytime.

What is the expected behavior?

throw ERR_OUT_OF_RANGE error.

What do you see instead?

> blockList.addSubnet('', NaN)
node[2155]: ../src/node_sockaddr.cc:614:static void node::SocketAddressBlockListWrap::AddSubnet(const FunctionCallbackInfo<v8::Value> &): Assertion `args[2]->IsInt32()' failed.
 1: 0x101379d05 node::Abort() (.cold.1) [/usr/local/bin/node]
 2: 0x1000bde89 node::Abort() [/usr/local/bin/node]
 3: 0x1000bdcf1 node::Assert(node::AssertionInfo const&) [/usr/local/bin/node]
 4: 0x1001420e4 node::SocketAddressBlockListWrap::AddSubnet(v8::FunctionCallbackInfo<v8::Value> const&) [/usr/local/bin/node]
 5: 0x1002a3728 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) [/usr/local/bin/node]
 6: 0x1002a2cbc v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/usr/local/bin/node]
 7: 0x1002a23e7 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/bin/node]
 8: 0x100ac42d9 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit [/usr/local/bin/node]
 9: 0x100a5d402 Builtins_InterpreterEntryTrampoline [/usr/local/bin/node]
[1]    2155 abort      node

Additional information

@targos targos added confirmed-bug Issues with confirmed bugs. net Issues and PRs related to the net subsystem. labels Jan 3, 2021
Lxxyx added a commit to Lxxyx/node that referenced this issue Jan 8, 2021
@jasnell jasnell closed this as completed in 9574e5b Jan 9, 2021
danielleadams pushed a commit that referenced this issue Jan 12, 2021
Fixes: #36731

PR-URL: #36732
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this issue Aug 8, 2021
Fixes: #36731

PR-URL: #36732
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
BethGriggs pushed a commit that referenced this issue Aug 12, 2021
Fixes: #36731

PR-URL: #36732
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this issue Aug 31, 2021
Fixes: #36731

PR-URL: #36732
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
foxxyz pushed a commit to foxxyz/node that referenced this issue Oct 18, 2021
Fixes: nodejs#36731

PR-URL: nodejs#36732
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-bug Issues with confirmed bugs. net Issues and PRs related to the net subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants