-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.dnsIssues and PRs related to the dns subsystem.Issues and PRs related to the dns subsystem.httpIssues or PRs related to the http subsystem.Issues or PRs related to the http subsystem.
Description
- Version: v12.15.0
- Platform: Linux desktop-home 5.4.53 deps: update openssl to 1.0.1j #1-NixOS SMP Wed Jul 22 07:33:18 UTC 2020 x86_64 GNU/Linux
- Subsystem: net / TCP
What steps will reproduce the bug?
"use strict";
const http = require("http");
http.get({
host: "google.com:80",
path: "/",
lookup: function (host, options, callback) {
callback(null, undefined, 4);
// Note the `undefined` here instead of an IP!
}
});
How often does it reproduce? Is there a required condition?
Completely reproducible.
What is the expected behavior?
Should produce a (catchable/handleable) error indicating that an invalid value was passed from lookup
rather than aborting, since this is public API.
What do you see instead?
node[18969]: ../src/tcp_wrap.cc:312:static void node::TCPWrap::Connect(const v8::FunctionCallbackInfo<v8::Value>&, std::function<int(const char*, T*)>) [with T = sockaddr_in]: Assertion `args[1]->IsString()' failed.
1: 0x9345f8 node::Abort() [node]
2: 0x934691 [node]
3: 0x9fda20 void node::TCPWrap::Connect<sockaddr_in>(v8::FunctionCallbackInfo<v8::Value> const&, std::function<int (char const*, sockaddr_in*)>) [node]
4: 0x9fc95c node::TCPWrap::Connect(v8::FunctionCallbackInfo<v8::Value> const&) [node]
5: 0xb0e819 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) [node]
6: 0xb0ebd0 [node]
7: 0xb0fa6a [node]
8: 0xb0fcf9 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [node]
9: 0x12af4f9 [node]
Aborted (core dumped)
Additional information
N/A
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.dnsIssues and PRs related to the dns subsystem.Issues and PRs related to the dns subsystem.httpIssues or PRs related to the http subsystem.Issues or PRs related to the http subsystem.