FatalException handler SIGABRT from throw with .stack getter error #25718
Copy link
Copy link
Closed
Labels
confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.processIssues and PRs related to the process subsystem.Issues and PRs related to the process subsystem.
Description
node -e "throw { get stack() { throw new Error('weird throw but ok') } }"
FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.
...
As discovered in #25715 but not strictly related to.
This is the line in question from the abort:
Line 211 in f40778e
| env->stack_string()).ToLocalChecked(); |
Basically, node::FatalException doesn't handle deep errors from .stack getters.
This is a pretty messy problem to fully deal with. It is possible to have a situation of infinitely recursing .stack getter errors, theoretically at least.
That being said... I doubt that any significant number of people will ever actually run into the more problematic cases, or maybe even the simple case.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.processIssues and PRs related to the process subsystem.Issues and PRs related to the process subsystem.
Activity
devsnek commentedon Jan 26, 2019
I think it would be reasonable to recurse until the c++ stack blows.
src: handle errors while printing error objects
src: handle errors while printing error objects
src: handle errors while printing error objects