From: mhmdanas <mhmdanas@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [ISSUE] [CLOSED] `require("dns").setServers([])` causes Node.js to crash with an assertion error
Date: Mon, 04 Dec 2023 18:33:51 +0100 [thread overview]
Message-ID: <20231204173351.vDYLKOGJX97k2jE9NfM5FNQQAHsRZ1aHL6e_Q6Jd8Vs@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-47411@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 1624 bytes --]
Closed issue by mhmdanas on void-packages repository
https://github.com/void-linux/void-packages/issues/47411
Description:
### Is this a new report?
Yes
### System Info
Void 6.5.12_1 x86_64 GenuineIntel uptodate rFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
### Package(s) Affected
nodejs-18.16.0_3 (and also nodejs built from a locally bumped 18.18.2 template)
### Does a report exist for this bug with the project's home (upstream) and/or another distro?
Couldn't find any.
### Expected behaviour
Node.js doesn't crash.
### Actual behaviour
```console
> require("dns").setServers([])
node[24747]: ../src/cares_wrap.cc:1691:void node::cares_wrap::{anonymous}::SetServers(const v8::FunctionCallbackInfo<v8::Value>&): Assertion `args[0]->IsArray()' failed.
1: 0x5647cd363300 node::Abort() [node]
2: 0x5647cd363394 [node]
3: 0x5647cd2c361c [node]
4: 0x5647cd59d6b6 [node]
5: 0x5647cd59e1b7 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [node]
6: 0x5647cde36539 [node]
fish: Job 1, 'node' terminated by signal SIGABRT (Abort)
```
This doesn't happen with Node.js 18.18.2 installed from `n`:
```console
> require("dns").setServers([])
undefined
```
From my debugging `IsArray` seems to think that `[]` isn't an empty array for some reason(???); I tried skimming through the patches that Void applies, but I failed to find anything suspicious. I'll debug this more when I get the time, but if anybody can help I'd appreciate that too.
### Steps to reproduce
1. `node -e 'require("dns").setServers([])'`
next prev parent reply other threads:[~2023-12-04 17:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-26 13:01 [ISSUE] " mhmdanas
2023-12-04 17:33 ` mhmdanas [this message]
2023-12-04 17:33 ` mhmdanas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231204173351.vDYLKOGJX97k2jE9NfM5FNQQAHsRZ1aHL6e_Q6Jd8Vs@z \
--to=mhmdanas@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).