Skip to content

Conversation

sparkpunkd
Copy link

@sparkpunkd sparkpunkd commented Apr 6, 2021

Some Windows libraries use OutputDebugString() to log a message to a debugger. This works by throwing an exception and then a debugger being a registered exception handler. For example, th Google family of chromium-based APIs do this, including libwebrtc that is part of node-webrtc.

Unfortunately, node-segfault-handler intercepts these exceptions and reports them as SIGSEGV, printing a stack trace and marks them as handled by returning EXCEPTION_EXECUTE_HANDLER. In this case and implemented by this PR, it would be better to not handle the exception and pass it onto any other interested party with EXCEPTION_CONTINUE_SEARCH.

Also, as part of the debugging process, the code can try to set the thread name via exception. This PR also passes this exception onwards and upwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant