Skip to content

Commit 80e6662

Browse files
authored
Fix strict.test_wasm_worker_futex_wait_pthreads. NFC (#26870)
This test was exiting without explicitly keeping the runtime alive. The reason this was working for all other test modes but not for `strict` is pretty subtle. Basically I came down to the `noExitRuntime` symbols no been linked in the strict mode. Fixes: #26866
1 parent eabff6e commit 80e6662

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,7 @@ jobs:
786786
omitexports0.test_emscripten_api
787787
strict.test_no_declare_asm_module_exports
788788
strict.test_dylink_global_inits_reversed
789+
strict.test_wasm_worker_futex_wait_pthreads
789790
"
790791
test-modularize-instance:
791792
executor: ubuntu-lts

src/lib/libwasi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var WasiLibrary = {
2222
throw `exit(${code})`;
2323
#else
2424
#if RUNTIME_DEBUG
25-
dbg(`proc_exit: ${code}`);
25+
dbg(`proc_exit: ${code} (keepRuntimeAlive=${keepRuntimeAlive()})`);
2626
#endif
2727
EXITSTATUS = code;
2828
if (!keepRuntimeAlive()) {

test/wasm_worker/wasm_worker_futex_wait.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,5 @@ void worker_main() {
4949

5050
int main() {
5151
emscripten_wasm_worker_post_function_v(emscripten_malloc_wasm_worker(4096), worker_main);
52+
emscripten_exit_with_live_runtime();
5253
}

0 commit comments

Comments
 (0)