Skip to content

deps: uv: restore prior signal disposition on Android (DCP-4748)#4

Open
philippe-distributive wants to merge 236 commits into
dcp/releasefrom
dcp-4748-uv-signal-restore-prev-handler
Open

deps: uv: restore prior signal disposition on Android (DCP-4748)#4
philippe-distributive wants to merge 236 commits into
dcp/releasefrom
dcp-4748-uv-signal-restore-prev-handler

Conversation

@philippe-distributive

@philippe-distributive philippe-distributive commented Jun 3, 2026

Copy link
Copy Markdown

Summary

When a Node environment is torn down inside an Android app process
(node::FreeEnvironment()uv_close() on a UV_SIGNAL handle), libuv
resets the signal's disposition to SIG_DFL. On Android that sigaction
call is intercepted by ART's libsigchain, which logs an ERROR-level stack
trace on every worker stop:

E libsigchain: Setting SIGSEGV to SIG_DFL
E libsigchain:   ... uv_close ... node::Environment::CleanupHandles() ...

ART claims SIGSEGV/SIGBUS/SIGFPE/SIGILL/SIGTRAP/SIGABRT for implicit
null-checks, stack-overflow detection, etc., so resetting one to SIG_DFL
also clobbers ART's handler — semantically wrong, not just noisy.

Root cause

uv__signal_unregister_handler() unconditionally installs SIG_DFL once the
last watcher for a signal is removed. libuv never recorded what was installed
before it added its multiplexer — there's a long-standing
/* XXX save old action so we can restore it later on? */ TODO at the install
site.

Fix (gated to __ANDROID__)

On Android, uv__signal_register_handler() captures the previous
struct sigaction (into a per-signum slot) on the genuine
"no libuv handler → installed" transition — gated by a save flag so the
oneshot↔regular re-registration paths never overwrite it with libuv's own
handler. uv__signal_unregister_handler() then restores that saved
disposition instead of forcing SIG_DFL, falling back to SIG_DFL only when
nothing was captured.

The whole save/restore path is #ifdef __ANDROID__; off Android the code
path and behaviour are byte-for-byte unchanged
. On Android the restored
handler is ART's (kept by libsigchain), so no SIG_DFL reset — and no
libsigchain report — occurs. Zero hot-path cost (only the first register /
last unregister per signum); the saved table is touched only under the
existing global signal lock.

Why Android-only

A cross-platform version of this was tried upstream (libuv nodejs#4216) and
reverted (nodejs#4302, refs nodejs#4299) because macOS doesn't propagate
SA_RESETHAND in the old action returned by sigaction()
— so the captured
disposition is wrong there. bionic (Android) round-trips the flags correctly,
so gating to __ANDROID__ keeps the fix where it's both needed and correct
and leaves macOS/Linux/Windows on stock upstream behaviour. See the upstream
discussion in libuv#5157 (this change floated cross-platform) and libuv issue
nodejs#4299.

Alternatives rejected

Testing

  • libuv signal suite built for the host: 10/10 pass (incl.
    we_get_signals_mixed — the oneshot↔regular path the save gate guards —
    signal_pending_on_close, signal_close_loop_alive); non-Android compiles
    warning-free with stock SIG_DFL behaviour preserved.
  • Cross-compiled libnode.so for all four Android ABIs (arm64-v8a, x86_64,
    armeabi-v7a, x86); the 32-bit pair via the ia32 build-host path.
  • On an x86_64 emulator (API 35): worker start→stop, libsigchain "Setting SIGSEGV to SIG_DFL" count 1 → 0, with the cleanup path confirmed
    exercised (FreeEnvironment runs, libuv loop closed cleanly).

Upstreaming

The cross-platform variant is not currently acceptable upstream — it hits
the macOS oldact bug (nodejs#4299) that reverted nodejs#4216. Tracked in libuv#5157,
where an __ANDROID__-gated version is proposed; the door reopens if a
supported macOS (≥ 11) starts round-tripping the flags.

Rollout

Cut a tag (e.g. dcp/3.2.1) → bump node-build's GIT_TAG → rebuild the
Android node_api zips → bump the URL/SHA in
dcp-native/externals/node_api/CMakeLists.txt. (The four android-worker
jnilibs/*.so have already been rebuilt from this branch and validated on the
emulator.)

RafaelGSS and others added 30 commits October 15, 2025 11:07
assert:
  * (SEMVER-MAJOR) move assert.fail with multiple arguments to eol (James M Snell) nodejs#58532
  * (SEMVER-MAJOR) move CallTracker to EOL (James M Snell) nodejs#58006
assert,util:
  * (SEMVER-MAJOR) fail promise comparison in deep equal checks (Ruben Bridgewater) nodejs#59448
  * (SEMVER-MAJOR) handle invalid dates as equal in deep comparison (Ruben Bridgewater) nodejs#57627
async_hooks:
  * (SEMVER-MAJOR) move `asyncResource` property on bound function to EOL (James M Snell) nodejs#58618
buffer:
  * (SEMVER-MAJOR) move SlowBuffer to EOL (Filip Skokan) nodejs#58220
build:
  * (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) nodejs#59805
  * (SEMVER-MAJOR) bump minimum Clang version to 19 (Michaël Zasso) nodejs#59048
  * (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) nodejs#58064
  * (SEMVER-MAJOR) stop distributing Corepack (Antoine du Hamel) nodejs#57617
child_process:
  * (SEMVER-MAJOR) move _channel to end-of-life (James M Snell) nodejs#58527
crypto:
  * (SEMVER-MAJOR) runtime-deprecate default shake128/256 output lengths (Filip Skokan) nodejs#59008
  * (SEMVER-MAJOR) move deprecated hash and mgf1Hash options to EOL (James M Snell) nodejs#58706
  * (SEMVER-MAJOR) runtime deprecate ECDH.setPublicKey() (James M Snell) nodejs#58620
deps:
  * (SEMVER-MAJOR) patch V8 for illumos (Dan McDonald) nodejs#59805
  * (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) nodejs#54077
  * (SEMVER-MAJOR) update V8 to 14.1.146.11 (Michaël Zasso) nodejs#59805
  * (SEMVER-MAJOR) V8: backport 1d3362c55396 (Shu-yu Guo) nodejs#58064
  * (SEMVER-MAJOR) V8: cherry-pick 4f38995c8295 (Shu-yu Guo) nodejs#58064
  * (SEMVER-MAJOR) V8: cherry-pick 044b9b6f589d (Rezvan Mahdavi Hezaveh) nodejs#58064
  * (SEMVER-MAJOR) V8: cherry-pick d2ad518a0b57 (Joyee Cheung) nodejs#58064
  * (SEMVER-MAJOR) V8: revert 6d6c1e680c7b (Michaël Zasso) nodejs#58064
  * (SEMVER-MAJOR) V8: revert e3cddbedb205 (Michaël Zasso) nodejs#58064
  * (SEMVER-MAJOR) use std::map in MSVC STL for EphemeronRememberedSet (Joyee Cheung) nodejs#58064
  * (SEMVER-MAJOR) patch V8 for illumos (Dan McDonald) nodejs#58064
  * (SEMVER-MAJOR) remove problematic comment from v8-internal (Michaël Zasso) nodejs#58064
  * (SEMVER-MAJOR) define V8_PRESERVE_MOST as no-op on Windows (Stefan Stojanovic) nodejs#58064
  * (SEMVER-MAJOR) fix FP16 bitcasts.h (Stefan Stojanovic) nodejs#58064
  * (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) nodejs#58064
  * (SEMVER-MAJOR) update V8 to 13.7.152.9 (Michaël Zasso) nodejs#58064
dgram:
  * (SEMVER-MAJOR) move deprecated APIs to EOL (James M Snell) nodejs#58474
dns:
  * (SEMVER-MAJOR) move falsy hostname in lookup to end-of-life (James M Snell) nodejs#58619
doc,src,test:
  * (SEMVER-MAJOR) replace use of deprecated `GetIsolate` (Michaël Zasso) nodejs#59805
fs:
  * (SEMVER-MAJOR) move FileHandle close on GC to EOL (James M Snell) nodejs#58536
  * (SEMVER-MAJOR) move rmdir recursive option to end-of-life (James M Snell) nodejs#58616
  * (SEMVER-MAJOR) make `processReadResult()` and `readSyncRecursive()` private (Livia Medeiros) nodejs#58672
  * (SEMVER-MAJOR) move fs stream open method to eol (James M Snell) nodejs#58529
  * (SEMVER-MAJOR) remove `fs.F_OK`, `fs.R_OK`, `fs.W_OK`, `fs.X_OK` (Livia Medeiros) nodejs#55862
http:
  * (SEMVER-MAJOR) deprecate writeHeader (Sebastian Beltran) nodejs#59060
lib:
  * (SEMVER-MAJOR) use validators for argument validation (Nam Yooseong) nodejs#59416
  * (SEMVER-MAJOR) expose global ErrorEvent (Richie Bendall) nodejs#58920
  * (SEMVER-MAJOR) deprecate `_stream_*` modules (Dario Piotrowicz) nodejs#58337
  * (SEMVER-MAJOR) deprecate _tls_common and _tls_wrap (Dario Piotrowicz) nodejs#57643
module:
  * (SEMVER-MAJOR) move Module._debug to end-of-life (James M Snell) nodejs#58473
node-api:
  * (SEMVER-MAJOR) add warning for NAPI_EXPERIMENTAL (Miguel Marcondes Filho) nodejs#58280
perf_hooks:
  * (SEMVER-MAJOR) move deprecated accessors to EOF (James M Snell) nodejs#58531
process:
  * (SEMVER-MAJOR) move multipleResolves event to EOL (James M Snell) nodejs#58707
repl:
  * (SEMVER-MAJOR) eol deprecate instantiating without new (Aviv Keller) nodejs#59495
src:
  * (SEMVER-MAJOR) update crypto.getCipherInfo() to use DictionaryTemplate (James M Snell) nodejs#60036
  * (SEMVER-MAJOR) fix calls to v8::Object::wrap (Andreas Haas) nodejs#59805
  * (SEMVER-MAJOR) update NODE_MODULE_VERSION to 141 (Michaël Zasso) nodejs#59805
  * (SEMVER-MAJOR) improve performance of dotenv ToObject (James M Snell) nodejs#60038
  * (SEMVER-MAJOR) use std::string_view from node_report (iknoom) nodejs#60006
  * (SEMVER-MAJOR) unflag --experimental-webstorage by default (Daniel M Brasil) nodejs#57666
  * (SEMVER-MAJOR) store `Local` for `CallbackScope` on stack (Anna Henningsen) nodejs#59705
  * (SEMVER-MAJOR) remove node.h APIs to make callback without an async context (Chengzhong Wu) nodejs#58471
  * (SEMVER-MAJOR) remove deprecated node::EmitBeforeExit and node::EmitExit (Chengzhong Wu) nodejs#58469
  * (SEMVER-MAJOR) remove deprecated node::CreatePlatform and node::FreePlatform (Chengzhong Wu) nodejs#58470
  * (SEMVER-MAJOR) remove deprecated node::InitializeNodeWithArgs (Chengzhong Wu) nodejs#58470
  * (SEMVER-MAJOR) update NODE_MODULE_VERSION to 138 (Michaël Zasso) nodejs#58064
src,permission:
  * (SEMVER-MAJOR) add --allow-net permission (Rafael Gonzaga) nodejs#58517
test:
  * (SEMVER-MAJOR) update cppgc-object addon config (StefanStojanovic) nodejs#59805
  * (SEMVER-MAJOR) spin longer for sequential/test-worker-prof (Michaël Zasso) nodejs#59805
  * (SEMVER-MAJOR) remove `--always-turbofan` flag (Michaël Zasso) nodejs#59805
  * (SEMVER-MAJOR) update snapshot for V8 14.1 (Michaël Zasso) nodejs#59805
test,win:
  * (SEMVER-MAJOR) split addon tests (StefanStojanovic) nodejs#59805
tls:
  * (SEMVER-MAJOR) move IP-address servername deprecation to eol (James M Snell) nodejs#58533
tools:
  * (SEMVER-MAJOR) update V8 gypfiles for 14.0 (Michaël Zasso) nodejs#59805
  * (SEMVER-MAJOR) update V8 gypfiles for 13.9 (Michaël Zasso) nodejs#59805
  * (SEMVER-MAJOR) update V8 gypfiles for 13.8 (Michaël Zasso) nodejs#59805
  * (SEMVER-MAJOR) enable leaptiering for aix/ibmi (Abdirahim Musse) nodejs#59805
  * (SEMVER-MAJOR) update V8 gypfiles for 13.7 (Michaël Zasso) nodejs#58064
url:
  * (SEMVER-MAJOR) move bad port deprecation in legacy url to end-of-life (James M Snell) nodejs#58617
util,console:
  * (SEMVER-MAJOR) colorize regexp groups, character classes, etc (Ruben Bridgewater) nodejs#59710
worker:
  * (SEMVER-MAJOR) move terminate callback to end-of-life (James M Snell) nodejs#58528

PR-URL: nodejs#59896
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: nodejs#60219
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Refs: nodejs@5623194
PR-URL: nodejs#60223
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
PR-URL: nodejs#60224
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
PR-URL: nodejs#60225
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
Co-Authored-By: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: nodejs#59778
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
This relaxes the validation in sync hooks so that it accepts
the quirky nullish source returned by the default step of the
async loader when the module being loaded is CommonJS.
When there are no customization hooks registered, a saner
synchronous default load step is used to use a property
instead of a reset nullish source to signify that the module
should go through the CJS monkey patching routes and reduce
excessive reloading from disk.

PR-URL: nodejs#59929
Fixes: nodejs#59384
Fixes: nodejs#57327
Refs: nodejs#59666
Refs: https://github.com/dygabo/load_module_test
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
By default, the total buffered payloads are limited to 100MB, and 5MB
for each single request. The oldest unused requests will be evicted
first when the buffer size limit has been exceeded.

PR-URL: nodejs#60236
Refs: https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-enable
Reviewed-By: Ryuhei Shima <shimaryuhei@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Original commit message:

    [api] Add index-based module resolution in InstantiateModule()

    Add new InstantiateModule() overload that allows embedders to identify
    modules requests by index in the module requests array rather than
    using specifier and import attributes. When embedders want to fetch
    all the modules using information from module->GetModuleRequests()
    before calling InstantiateModule() instead of having to do the fetching
    inside the InstantiateModule() callback, they could just maintain a simple array of modules indexed by module request positions and
    look up the fetched the module by index in the new callback.
    Previously this has to be done by mapping from specifier and import
    attributes to module objects cached on the embedder side, leading to an overhead to hash the specifier and import attributes for each module request.

    Refs: nodejs#59396
    Bug: 435317398
    Change-Id: Ie017d2f3ccc605e0f58aa423504b5fa5fdbcc633
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6804466
    Commit-Queue: Joyee Cheung <joyee@igalia.com>
    Reviewed-by: Camillo Bruni <cbruni@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#102613}

Refs: v8/v8@3d0f462
PR-URL: nodejs#59396
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/6804466
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
This makes use of a new module resolution V8 API that passes in
an index to the module request array to identify the module
request, which simplifies the module linking process.

PR-URL: nodejs#59396
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/6804466
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
PR-URL: nodejs#60261
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/7017517
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Aditi Singh <aditisingh1400@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
PR-URL: nodejs#60245
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
PR-URL: nodejs#60252
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs#60260
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Our own helper classes have the advantage of using stack storage
a lot of the time, so they should always be preferred.

PR-URL: nodejs#60244
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ilyas Shabi <ilyasshabi94@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
We should be using our own helpers for this instead.

PR-URL: nodejs#60244
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ilyas Shabi <ilyasshabi94@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
This lays the initial groundwork for enabling the
use of IsolateGroups.

Every isolate in V8 is created within a group. When pointer
compression is enabled, all isolates within a single group
are limited to a 4 GB shared pointer cage. By default, all
isolates in the process share the same group, which means
that when running with pointer compression, the entire
process would be limited to a single 4 GB shared pointer
cage. But, we can create as many IsolateGroups as we want,
limited only by the amount of virtual memory available on
the machine.

PR-URL: nodejs#60254
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
This makes skipping/running these tests easier to manage with a
dedicated test runner that can be tweaked for SEA.

PR-URL: nodejs#60250
Refs: nodejs#59553
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
It's unlikely that anyone would invest in fixing them on x64 macOS
in the near future, now that x64 macOS is being phased out.
Simply skip them for now.

PR-URL: nodejs#60250
Refs: nodejs#59553
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
This seems to be a underdocumented but useful trick that only very few
people know about. Also add a pointer to the test running guide in
the test writing guide.

PR-URL: nodejs#60265
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
It seems after the recent V8 upgrade, it's no longer safe to assume
there'll be 15 ticks per 1500ms. Lower it to 10 ticks.

PR-URL: nodejs#60272
Refs: https://github.com/nodejs/reliability/blob/main/reports/2025-10-15.md
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
It previously re-einvented the pattern matching that's already
supported by test.py, and was running the tests one by one,
which can lead to time out on slower machines.
This move it to sequential and use wildcard
support in test.py to correctly parallelize the tests.

PR-URL: nodejs#60273
Fixes: nodejs#60268
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
PR-URL: nodejs#60257
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: nodejs#60257
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: nodejs#60257
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
There can be a race from eagerly shutting down the servers and
severing two pipes at the same time but for the purpose of this test,
we only care about whether the requests are initiated from the client
as expected, not how the upstream/proxy servers behave. Ignore EPIPE
errors from them.

PR-URL: nodejs#60269
Refs: nodejs#59741
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
PR-URL: nodejs#60256
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: theanarkh <theratliter@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Previously for each matching test, it would execute multiple
`node -p` commands to decide the configurations of the executable.
That means if there are 100 tests matched, it will run the Node.js
executable 4*100 times to retrieve the same configurations repeatedly.
This changes the loop order so that it only execute these commands
once and reuse the results for all matching tests.

PR-URL: nodejs#60266
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
sparist and others added 21 commits November 24, 2025 13:28
NAPI_EXPERIMENTAL had to be removed because
it caused a NAPI_VERSION definition conflict.
This exports V8 platform symbols in the Node shared library build.
nodejs#47557 removed the mark_arraybuffer_as_untransferable API, do it manually instead
Converting `node_api_nogc_finalize` to `napi_finalize` requires a reinterpret_cast in MSVC.
…system

Crypto extensions (crc32/pmull) are a baseline feature in ARMv8.1-A,
and RK3588 has Cortex-A76 (ARMv8.2-A) cores, which is new enough that these can be assumed without runtime detection.
the aligned_alloc function was not introduced to Android's C library (Bionic) until API level 28.
Refs: v8/v8@14.6.202.33...14.6.202.34
PR-URL: nodejs#62964
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
@philippe-distributive philippe-distributive self-assigned this Jun 3, 2026
@philippe-distributive philippe-distributive added the bug Something isn't working label Jun 3, 2026
@philippe-distributive

Copy link
Copy Markdown
Author

fixed upstream in libuv/libuv#5157

On Android, ART claims SIGSEGV/SIGBUS/SIGFPE/SIGILL/SIGTRAP/SIGABRT for
implicit null-checks and stack-overflow detection, routed through
libsigchain. libuv's uv__signal_unregister_handler() resets a signal to
SIG_DFL once its last watcher is removed; on Android that clobbers ART's
handler and emits an ERROR-level libsigchain stack trace on every embedded
node::FreeEnvironment() (DCP-4748).

Gated to __ANDROID__: uv__signal_register_handler() captures the previous
disposition on the no-handler -> handler transition and
uv__signal_unregister_handler() restores it instead of forcing SIG_DFL.
bionic round-trips the sigaction flags correctly, so this is safe; it is
deliberately NOT applied to other platforms (notably macOS, which drops
SA_RESETHAND in the old action -- see upstream libuv nodejs#4299, which caused
PR nodejs#4216 to be reverted). Off Android the code path and behaviour are
unchanged. The saved table is accessed only under the global signal lock.
@philippe-distributive philippe-distributive force-pushed the dcp-4748-uv-signal-restore-prev-handler branch from 208331f to dcededb Compare June 4, 2026 17:10
@philippe-distributive philippe-distributive changed the title deps: uv: restore prior signal disposition instead of SIG_DFL (DCP-4748) deps: uv: restore prior signal disposition on Android (DCP-4748) Jun 4, 2026
@philippe-distributive

Copy link
Copy Markdown
Author

It seems upstream does not want any Android-specific code...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.