You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a bug in Node that crashes the process when attempting to trigger an uncaughtException with napi_fatal_exception from the context of an error domain.
Since Node-API implicitly wraps napi_threadsafe_function callbacks in an error domain and threadsafe functions are the backing provider of Channel::send, panicking in a neon::event::Channel::send callback crashes the process on all current versions of Node.
Possible Mitigations
Disable uncaughtException triggering which trades a crash for a silent error
Try to trigger the exception from outside an error domain. Possibly with setImmediate?
Wait for a fix from Node
The text was updated successfully, but these errors were encountered:
Repro
Expected
As of Neon
0.10
, panicking in aChannel::send
closure will trigger in anuncaughtException
.Actual
The process crashes with a C++ error.
Explanation
There is a bug in Node that crashes the process when attempting to trigger an
uncaughtException
withnapi_fatal_exception
from the context of an error domain.Since Node-API implicitly wraps
napi_threadsafe_function
callbacks in an error domain and threadsafe functions are the backing provider ofChannel::send
, panicking in aneon::event::Channel::send
callback crashes the process on all current versions of Node.Possible Mitigations
uncaughtException
triggering which trades a crash for a silent errorsetImmediate
?The text was updated successfully, but these errors were encountered: