Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emscripten generated abort() function causes problems with vscode #3

Open
stephen-riley opened this issue Aug 24, 2020 · 1 comment

Comments

@stephen-riley
Copy link
Owner

In VS Code's extension host, if an extension throws an unhandled exception at certain points in its lifecycle, then the abort() function generated by emscripten in libpcre2.js catches it and throws an exception that causes the extension host to die. (See line 762 of libpcre2.js).

stephen-riley added a commit that referenced this issue Aug 24, 2020
@yume-chan
Copy link

Maybe these flags should be disabled?

https://github.com/emscripten-core/emscripten/blob/ea62e5040ea156388d3f88c6c554f4470b3f8165/src/settings.js#L680-L698

// By default we handle exit() in node, by catching the Exit exception. However,
// this means we catch all process exceptions. If you disable this, then we no
// longer do that, and exceptions work normally, which can be useful for libraries
// or programs that don't need exit() to work.


// Emscripten uses an ExitStatus exception to halt when exit() is called.
// With this option, we prevent that from showing up as an unhandled
// exception.
// [link]
var NODEJS_CATCH_EXIT = 1;


// Catch unhandled rejections in node. Without this, node may print the error,
// and that this behavior will change in future node, wait a few seconds, and
// then exit with 0 (which hides the error if you don't read the log). With
// this, we catch any unhandled rejection and throw an actual error, which will
// make the process exit immediately with a non-0 return code.
// This should be fixed in Node 15+.
// [link]
var NODEJS_CATCH_REJECTION = 1;

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

No branches or pull requests

2 participants