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

Consider not logging an error when emscripten_unwind_to_js_event_loop is called when using -sASSERTIONS=1 #19036

Closed
lambdageek opened this issue Mar 22, 2023 · 1 comment · Fixed by #19048

Comments

@lambdageek
Copy link
Contributor

Please include the following in your bug report:

Version of emscripten/emsdk:

emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.30 (cfe2bdfe2692457cb5f5770672f6e5ccb3ffc2f2)
clang version 16.0.0 (https://github.com/llvm/llvm-project 800f0f1546b2352ba42a4777149afb13cb874fcd)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /Users/alklig/work/dotnet-runtime/runtime/src/mono/wasm/emsdk/upstream/bin

Failing command line in full:
N/A

Full link command and output with -v appended:
N/A


We build our product with -s ASSERTIONS=1 in some circumstances because some of the assertions are valuable.

However, when using pthreads, these lines log a scary message to the console whenever emscripten_unwind_to_js_event_loop is used. But this is not an error, it's just the expected way that function is supposed to work. Is it reasonable to just remove the error? If it's used for some tests in Emscripten, is there some other way to validate the expected behavior?

emscripten/src/worker.js

Lines 252 to 254 in 13b1f81

#if ASSERTIONS
err('Pthread 0x' + Module['_pthread_self']().toString(16) + ' completed its main entry point with an `unwind`, keeping the worker alive for asynchronous operation.');
#endif

@sbc100
Copy link
Collaborator

sbc100 commented Mar 22, 2023

Yes, at least it should not be err but dbg (which doesn't generate errors in the console).

In fact perhaps it we should use #if RUNTIME_DEBUG and dbg.. that should be good.

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 a pull request may close this issue.

2 participants