fix: workaround for possible V8 bug fixes #4266#4299
Closed
skilledDeveloper wants to merge 1 commit into
Closed
Conversation
workaround for possible V8 bug (due to the use of .ToHandleChecked() in deps/v8/src/api.cc) @bnoordhuis please review
Member
|
A couple of comments:
|
Member
|
Forgot to mention: please add regression tests. |
Author
|
OK. I'll create a new PR for this. |
Author
|
@bnoordhuis |
Member
|
Yes, you're welcome to steal tests from the master branch. They'll probably need some adjusting though. |
philippe-distributive
pushed a commit
to Distributive-Network/node
that referenced
this pull request
Jun 4, 2026
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
workaround for possible V8 bug (due to the use of .ToHandleChecked() in deps/v8/src/api.cc)
Original issue: #4266
@bnoordhuis please review