-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
ASYNCIFY_DEBUG causes stack overflow for empty program #23333
Comments
Woops! Looks like this only effect |
I had the same infinite loop with ASYNCIFY=1, an empty program
…On Wed, Jan 8, 2025, 03:13 Sam Clegg ***@***.***> wrote:
Woops!
Looks like this only effect -sASYNCIFY_DEBUG=2 so -sASYNCIFY_DEBUG should
still work until we can land a fix.
—
Reply to this email directly, view it on GitHub
<#23333 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQJKYXIQDNIBSETDG3RUDT2JSCVBAVCNFSM6AAAAABUY4EI3GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNZWGU3DOOBUGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I see, there is a second issue. The syntax error is only present with |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Create an empty C++ module and create an ES6 module.
Compile options for target Dummy: -fexceptions;-pthread;-matomics;-mbulk-memory;-msimd128;-O0;-g3
Compile definitions for target Dummy: COMPILE_DEFINITIONS-NOTFOUND
Include directories for target Dummy: INCLUDE_DIRECTORIES-NOTFOUND
Link libraries for target Dummy: Threads::Threads
Link options for target Dummy: -sASSERTIONS=2;-sERROR_ON_UNDEFINED_SYMBOLS=1;-sDISABLE_EXCEPTION_CATCHING=0;-sALLOW_BLOCKING_ON_MAIN_THREAD=0;-lembind;-sNO_EXIT_RUNTIME=1;-sMODULARIZE=1;-sEXPORT_ES6=1;-sINCLUDE_FULL_LIBRARY;-sALLOW_TABLE_GROWTH=1;-sEXPORT_NAME=loadDummyTestModule;-sINITIAL_MEMORY=1GB;-sALLOW_MEMORY_GROWTH=0;-sENVIRONMENT=node,worker;-pthread;-flto;--enable-bulk-memory;-sUSE_PTHREADS=1;-sSTACK_SIZE=1048576;-sPTHREAD_POOL_SIZE=2;-sPTHREAD_POOL_SIZE_STRICT=16;-sSHARED_MEMORY=1;-sWASM=1;-sASYNCIFY_STACK_SIZE=81920;-sASYNCIFY=1;-sASYNCIFY_DEBUG=2;-sEXPORTED_RUNTIME_METHODS=['ENV','FS','addFunction','removeFunction','wasmTable','ccall','cwrap','stringToNewUTF8','spawnThread'];-sEXPORTED_FUNCTIONS=['_free','_malloc'];-sASYNCIFY_IMPORTS=[];-O0;-g3
-- Configuring done (0.3s)
-- Generating done (0.0s)
-- Build files have been written to: /home/jmh/git/vtkEmbinding/build
[ 0%] Built target Dummy_copy_run_Dummy.js
[100%] Linking CXX executable Dummy.js
error: library_async.js: failure to execute js library "library_async.js":
error: library_async.js: use -sVERBOSE to see more details
Internal compiler error in src/compiler.mjs!
Please create a bug report at https://github.com/emscripten-core/emscripten/issues/
with a log of the build and the input files used to run. Exception message: "library_async.preprocessed.js:73
dbg(
ASYNCIFY: ${' '.repeat(Asyncify.exportCallStack.length} try ${x}
);^^^^^^
SyntaxError: missing ) after argument list
at new Script (node:vm:117:7)
at createScript (node:vm:269:10)
at Module.runInContext (node:vm:300:10)
at runInMacroContext (file:///home/jmh/github/emsdk/upstream/emscripten/src/utility.mjs:333:13)
at Object.load (file:///home/jmh/github/emsdk/upstream/emscripten/src/modules.mjs:248:9)
at Module.runJSify (file:///home/jmh/github/emsdk/upstream/emscripten/src/jsifier.mjs:169:18)
at file:///home/jmh/github/emsdk/upstream/emscripten/src/compiler.mjs:89:11
em++: error: '/home/jmh/github/emsdk/node/20.18.0_64bit/bin/node /home/jmh/github/emsdk/upstream/emscripten/src/compiler.mjs /tmp/tmpj8etiry9.json --symbols-only' failed (returned 1)
I discovered another issue. The generated code..
Causes a stack overflow during the early initialization. I patched the generated code and removed
dbg
and reinserted after the module was fully initialize. The issue only occurs if you use-sASYNCIFY_DEBUG
.I use the latest release 3.1.74
Thanks in advance
The text was updated successfully, but these errors were encountered: