diff --git a/src/library.js b/src/library.js index 12cbc8cbab9dc..25f53feb2a30d 100644 --- a/src/library.js +++ b/src/library.js @@ -85,6 +85,7 @@ addToLibrary({ #endif #if PTHREADS '$exitOnMainThread', + '_emscripten_thread_cleanup', #endif #if PTHREADS_DEBUG '$runtimeKeepaliveCounter', @@ -111,6 +112,17 @@ addToLibrary({ // The pthread may have decided not to exit its own runtime, for example // because it runs a main loop, but that doesn't affect the main thread. exitOnMainThread(status); +#if !EXIT_RUNTIME + // When EXIT_RUNTIME is enabled the main thread will take care of shutting + // down the runtime, and killing all the workers/threads. + // However when EXIT_RUNTIME is no enabled we don't want the existance + // of this running thread to prevent node from exiting, do we use + // `__emscripten_thread_cleanup` to take outselves out of the list of + // running threads, but without making outselves joinable. + if (!keepRuntimeAlive()) { + __emscripten_thread_cleanup(_pthread_self()) + } +#endif throw 'unwind'; } #if PTHREADS_DEBUG @@ -127,7 +139,7 @@ addToLibrary({ #if ASSERTIONS // if exit() was called explicitly, warn the user if the runtime isn't actually being shut down if (keepRuntimeAlive() && !implicit) { - var msg = `program exited (with status: ${status}), but keepRuntimeAlive() is set (counter=${runtimeKeepaliveCounter}) due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)`; + var msg = `program exited (with status: ${status}), but keepRuntimeAlive() is set (counter=${runtimeKeepaliveCounter}), so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)`; #if MODULARIZE readyPromiseReject(msg); #endif // MODULARIZE @@ -2207,7 +2219,7 @@ addToLibrary({ } #endif #if RUNTIME_DEBUG - dbg(`maybeExit: user callback done: runtimeKeepaliveCounter=${runtimeKeepaliveCounter}`); + dbg(`maybeExit: runtimeKeepaliveCounter=${runtimeKeepaliveCounter}`); #endif if (!keepRuntimeAlive()) { #if RUNTIME_DEBUG diff --git a/src/library_pthread.js b/src/library_pthread.js index d6784b354f1a1..eb83ee44dc672 100644 --- a/src/library_pthread.js +++ b/src/library_pthread.js @@ -582,6 +582,7 @@ var LibraryPThread = { #if PTHREADS_DEBUG dbg(`cleanupThread: ${ptrToString(pthread_ptr)}`) #endif + if (!PThread.pthreads[pthread_ptr]) return; #if ASSERTIONS assert(!ENVIRONMENT_IS_PTHREAD, 'Internal Error! cleanupThread() can only ever be called from main application thread!'); assert(pthread_ptr, 'Internal Error! Null pthread_ptr in cleanupThread!'); @@ -1138,11 +1139,8 @@ var LibraryPThread = { // emscripten_unwind_to_js_event_loop() in the pthread body. __emscripten_thread_exit(result); #else - if (keepRuntimeAlive()) { - EXITSTATUS = result; - } else { - __emscripten_thread_exit(result); - } + EXITSTATUS = result; + maybeExit(); #endif } #if ASYNCIFY == 2 diff --git a/src/preamble.js b/src/preamble.js index dd1429ed52f19..b1d73df573bcb 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -553,7 +553,7 @@ function makeAbortWrapper(original) { || e === Infinity // EXCEPTION_STACK_TRACES=0 will throw Infinity #endif // EXCEPTION_STACK_TRACES #endif - || e === 'unwind' + || (e instanceof ExitStatus || e == 'unwind') ) { throw e; } diff --git a/src/runtime_pthread.js b/src/runtime_pthread.js index 00cf3af11c898..05261b706b79b 100644 --- a/src/runtime_pthread.js +++ b/src/runtime_pthread.js @@ -216,7 +216,7 @@ if (ENVIRONMENT_IS_PTHREAD) { throw ex; } #if RUNTIME_DEBUG - dbg(`worker: Pthread 0x${_pthread_self().toString(16)} completed its main entry point with an 'unwind', keeping the worker alive for asynchronous operation.`); + dbg(`worker: pthread completed its main entry point with an 'unwind'`); #endif } } else if (cmd === 'cancel') { // Main thread is asking for a pthread_cancel() on this thread. diff --git a/test/other/codesize/test_codesize_minimal_pthreads.gzsize b/test/other/codesize/test_codesize_minimal_pthreads.gzsize index fda9a197604e3..5d8510af30292 100644 --- a/test/other/codesize/test_codesize_minimal_pthreads.gzsize +++ b/test/other/codesize/test_codesize_minimal_pthreads.gzsize @@ -1 +1 @@ -5103 +5118 diff --git a/test/other/codesize/test_codesize_minimal_pthreads.jssize b/test/other/codesize/test_codesize_minimal_pthreads.jssize index 3bb9859861b32..890cec0f17a29 100644 --- a/test/other/codesize/test_codesize_minimal_pthreads.jssize +++ b/test/other/codesize/test_codesize_minimal_pthreads.jssize @@ -1 +1 @@ -11028 +11064 diff --git a/test/other/test_unoptimized_code_size.js.size b/test/other/test_unoptimized_code_size.js.size index c0c713cb8ad67..0e7fd8dc7085e 100644 --- a/test/other/test_unoptimized_code_size.js.size +++ b/test/other/test_unoptimized_code_size.js.size @@ -1 +1 @@ -54682 +54656 diff --git a/test/other/test_unoptimized_code_size_strict.js.size b/test/other/test_unoptimized_code_size_strict.js.size index 5eb55fe6e3338..188dffc0c5e91 100644 --- a/test/other/test_unoptimized_code_size_strict.js.size +++ b/test/other/test_unoptimized_code_size_strict.js.size @@ -1 +1 @@ -53633 +53607 diff --git a/test/test_core.py b/test/test_core.py index 896f3c27eddad..42a6af389d8e8 100644 --- a/test/test_core.py +++ b/test/test_core.py @@ -388,7 +388,6 @@ def test_hello_argc(self): @node_pthreads def test_hello_argc_pthreads(self): self.set_setting('PROXY_TO_PTHREAD') - self.set_setting('EXIT_RUNTIME') self.do_core_test('test_hello_argc.c', args=['hello', 'world']) @only_wasm2js('test shifts etc. on 64-bit integers') @@ -1300,7 +1299,8 @@ def test_exceptions_uncaught_2(self): def test_exceptions_typed(self): # Depends on static destructors running self.set_setting('EXIT_RUNTIME') - self.clear_setting('SAFE_HEAP') # Throwing null will cause an ignorable null pointer access. + if self.get_setting('SAFE_HEAP'): + self.skipTest('Throwing null will cause an ignorable null pointer access') self.do_core_test('test_exceptions_typed.cpp') @with_all_eh_sjlj @@ -1318,7 +1318,8 @@ def test_exceptions_multi(self): @with_all_eh_sjlj def test_exceptions_std(self): - self.clear_setting('SAFE_HEAP') + if self.get_setting('SAFE_HEAP'): + self.skipTest('Fails under SAFE_HEAP') self.do_core_test('test_exceptions_std.cpp') @with_all_eh_sjlj @@ -1871,7 +1872,7 @@ def test_em_asm_2(self): # they will also get tested in MAIN_THREAD_EM_ASM form. @parameterized({ '': ([],), - 'pthread': (['-pthread', '-sPROXY_TO_PTHREAD', '-sEXIT_RUNTIME'],), + 'pthread': (['-pthread', '-sPROXY_TO_PTHREAD'],), }) def test_main_thread_em_asm(self, args): if args: @@ -1933,8 +1934,8 @@ def test_em_asm_side_module(self): @parameterized({ '': ([], False), - 'pthreads': (['-pthread', '-sPROXY_TO_PTHREAD', '-sEXIT_RUNTIME'], False), - 'pthreads_dylink': (['-pthread', '-sPROXY_TO_PTHREAD', '-sEXIT_RUNTIME', '-sMAIN_MODULE=2', '-Wno-experimental'], False), + 'pthreads': (['-pthread', '-sPROXY_TO_PTHREAD'], False), + 'pthreads_dylink': (['-pthread', '-sPROXY_TO_PTHREAD', '-sMAIN_MODULE=2', '-Wno-experimental'], False), 'c': ([], True), 'dylink': (['-sMAIN_MODULE=2'], False), 'dylink_c': (['-sMAIN_MODULE=2'], True), @@ -2500,7 +2501,6 @@ def test_pthread_proxying_canceled_work(self): @node_pthreads @flaky('https://github.com/emscripten-core/emscripten/issues/19795') def test_pthread_proxying_refcount(self): - self.set_setting('EXIT_RUNTIME') self.set_setting('PTHREAD_POOL_SIZE=1') self.set_setting('ASSERTIONS=0') self.do_run_in_out_file_test('pthread/test_pthread_proxying_refcount.c') @@ -2524,7 +2524,6 @@ def test_pthread_nested_work_queue(self): @node_pthreads def test_pthread_thread_local_storage(self): self.set_setting('PROXY_TO_PTHREAD') - self.set_setting('EXIT_RUNTIME') if not self.has_changed_setting('INITIAL_MEMORY'): self.set_setting('INITIAL_MEMORY', '300mb') self.do_run_in_out_file_test('pthread/test_pthread_thread_local_storage.cpp') @@ -2574,7 +2573,6 @@ def test_pthread_abort_interrupt(self): def test_pthread_emmalloc(self): self.emcc_args += ['-fno-builtin'] self.set_setting('PROXY_TO_PTHREAD') - self.set_setting('EXIT_RUNTIME') self.set_setting('ASSERTIONS', 2) self.set_setting('MALLOC', 'emmalloc') self.do_core_test('test_emmalloc.c') @@ -2589,7 +2587,6 @@ def test_pthread_stdout_after_main(self): @node_pthreads def test_pthread_proxy_to_pthread(self): self.set_setting('PROXY_TO_PTHREAD') - self.set_setting('EXIT_RUNTIME') self.do_run_in_out_file_test('pthread/test_pthread_proxy_to_pthread.c') @node_pthreads @@ -2606,7 +2603,6 @@ def test_pthread_run_script(self): # Run the test again with PROXY_TO_PTHREAD self.setup_node_pthreads() self.set_setting('PROXY_TO_PTHREAD') - self.set_setting('EXIT_RUNTIME') self.do_runf('pthread/test_pthread_run_script.c') @node_pthreads @@ -2903,7 +2899,7 @@ def test_dlfcn_missing(self): @needs_dylink @parameterized({ '': ([],), - 'pthreads': (['-pthread', '-sEXIT_RUNTIME', '-sPROXY_TO_PTHREAD', '-Wno-experimental'],), + 'pthreads': (['-pthread', '-sPROXY_TO_PTHREAD', '-Wno-experimental'],), }) def test_dlfcn_basic(self, args): if args: @@ -6470,7 +6466,6 @@ def test_mmap_anon_pthreads(self): # Same test with threading enabled so give is some basic sanity # checks of the locking on the internal data structures. self.set_setting('PROXY_TO_PTHREAD') - self.set_setting('EXIT_RUNTIME') if not self.has_changed_setting('INITIAL_MEMORY'): self.set_setting('INITIAL_MEMORY', '64mb') self.do_core_test('test_mmap_anon.c') @@ -7363,7 +7358,7 @@ def test_embind_2(self): self.emcc_args += [ '-lembind', '--post-js', 'post.js', # for extra coverage, test using pthreads - '-pthread', '-sPROXY_TO_PTHREAD', '-sEXIT_RUNTIME' + '-pthread', '-sPROXY_TO_PTHREAD' ] create_file('post.js', ''' function printLerp() { @@ -8313,7 +8308,6 @@ def test_pthread_join_and_asyncify(self): self.require_jspi() self.do_runf('core/test_pthread_join_and_asyncify.c', 'joining thread!\njoined thread!', emcc_args=['-sJSPI_EXPORTS=run_thread', - '-sEXIT_RUNTIME=1', '-pthread', '-sPROXY_TO_PTHREAD']) @no_asan('asyncify stack operations confuse asan') @@ -9118,7 +9112,7 @@ def test_pthread_create(self): @parameterized({ '': ([],), 'pooled': (['-sPTHREAD_POOL_SIZE=1'],), - 'proxied': (['-sPROXY_TO_PTHREAD', '-sEXIT_RUNTIME'],), + 'proxied': (['-sPROXY_TO_PTHREAD'],), }) def test_pthread_c11_threads(self, args): self.emcc_args += args @@ -9164,7 +9158,6 @@ def test_pthread_create_pool(self): def test_pthread_create_proxy(self): # with PROXY_TO_PTHREAD, we can synchronously depend on workers being available self.set_setting('PROXY_TO_PTHREAD') - self.set_setting('EXIT_RUNTIME') self.emcc_args += ['-DALLOW_SYNC'] self.do_run_in_out_file_test('core/pthread/create.c') @@ -9215,7 +9208,6 @@ def test_pthread_unhandledrejection(self): @no_wasm2js('wasm2js does not support PROXY_TO_PTHREAD (custom section support)') def test_pthread_offset_converter(self): self.set_setting('PROXY_TO_PTHREAD') - self.set_setting('EXIT_RUNTIME') self.set_setting('USE_OFFSET_CONVERTER') if '-g' in self.emcc_args: self.emcc_args += ['-DDEBUG'] @@ -9225,7 +9217,6 @@ def test_pthread_offset_converter(self): @no_wasm2js('wasm2js does not support PROXY_TO_PTHREAD (custom section support)') def test_pthread_offset_converter_modularize(self): self.set_setting('PROXY_TO_PTHREAD') - self.set_setting('EXIT_RUNTIME') self.set_setting('USE_OFFSET_CONVERTER') self.set_setting('MODULARIZE') self.set_setting('EXPORT_NAME', 'foo') @@ -9259,7 +9250,6 @@ def test_stdio_locking(self): def test_pthread_dylink_basics(self): self.emcc_args.append('-Wno-experimental') self.set_setting('PROXY_TO_PTHREAD') - self.set_setting('EXIT_RUNTIME') self.do_basic_dylink_test() @needs_dylink @@ -9302,6 +9292,7 @@ def test_pthread_dlopen(self): self.emcc_args += ['--embed-file', 'liblib.so@libside.so'] self.prep_dlfcn_main() + # Test depends on atexit() self.set_setting('EXIT_RUNTIME') self.set_setting('PROXY_TO_PTHREAD') self.do_runf('core/pthread/test_pthread_dlopen.c', @@ -9321,6 +9312,7 @@ def test_pthread_dlopen_many(self): shutil.copyfile('liblib.so', f'liblib{i}.so') self.prep_dlfcn_main() + # Test depends on atexit() self.set_setting('EXIT_RUNTIME') self.set_setting('PROXY_TO_PTHREAD') self.set_setting('DEFAULT_LIBRARY_FUNCS_TO_INCLUDE', 'jslib_func') @@ -9343,7 +9335,6 @@ def test_pthread_dlsym(self): self.build_dlfcn_lib(test_file('core/pthread/test_pthread_dlsym_side.c')) self.prep_dlfcn_main() - self.set_setting('EXIT_RUNTIME') self.set_setting('PROXY_TO_PTHREAD') self.do_runf('core/pthread/test_pthread_dlsym.c') @@ -9370,7 +9361,7 @@ def test_pthread_dylink_main_module_1(self): @parameterized({ '': ([],), - 'pthreads': (['-sPROXY_TO_PTHREAD', '-sEXIT_RUNTIME', '-pthread', '-Wno-experimental'],) + 'pthreads': (['-sPROXY_TO_PTHREAD', '-pthread', '-Wno-experimental'],) }) @with_dylink_reversed def test_Module_dynamicLibraries(self, args): @@ -9532,7 +9523,6 @@ def test_abort_on_exceptions_main(self): def test_abort_on_exceptions_pthreads(self): self.set_setting('ABORT_ON_WASM_EXCEPTIONS') self.set_setting('PROXY_TO_PTHREAD') - self.set_setting('EXIT_RUNTIME') self.do_core_test('test_hello_world.c') @needs_dylink diff --git a/test/test_other.py b/test/test_other.py index ecf1315053f31..15291bdf5d358 100644 --- a/test/test_other.py +++ b/test/test_other.py @@ -366,7 +366,7 @@ def test_emcc_output_worker_mjs(self, args): create_file('extern-post.js', 'if (!isPthread) await Module();') os.mkdir('subdir') self.run_process([EMCC, '-o', 'subdir/hello_world.mjs', - '-sEXIT_RUNTIME', '-sPROXY_TO_PTHREAD', '-pthread', '-O1', + '-sPROXY_TO_PTHREAD', '-pthread', '-O1', '--extern-post-js', 'extern-post.js', test_file('hello_world.c')] + args) src = read_file('subdir/hello_world.mjs') @@ -2175,7 +2175,6 @@ def test_dylink_pthread_static_data(self): emcc_args=[ '-pthread', '-Wno-experimental', '-sPROXY_TO_PTHREAD', - '-sEXIT_RUNTIME', '-sMAIN_MODULE=2', 'side.wasm', ]) @@ -2262,7 +2261,6 @@ def test_dylink_pthread_comdat(self, flipped): emcc_args=[ '-pthread', '-Wno-experimental', '-sPROXY_TO_PTHREAD', - '-sEXIT_RUNTIME', '-sMAIN_MODULE=2', 'libside.wasm', ]) @@ -4503,7 +4501,7 @@ def test_js_lib_proxying(self): printf("done\n"); } ''') - self.do_runf('src.c', 'main\ndone\n', emcc_args=['-sEXIT_RUNTIME', '-pthread', '-sPROXY_TO_PTHREAD', '--js-library', 'lib.js']) + self.do_runf('src.c', 'main\ndone\n', emcc_args=['-pthread', '-sPROXY_TO_PTHREAD', '--js-library', 'lib.js']) def test_js_lib_method_syntax(self): create_file('lib.js', r''' @@ -5460,7 +5458,7 @@ def test_returncode(self, no_exit): continue print(code, call_exit, async_compile, engine) proc = self.run_process(engine + ['a.out.js'], stderr=PIPE, check=False) - msg = 'but keepRuntimeAlive() is set (counter=0) due to an async operation, so halting execution but not exiting the runtime' + msg = 'but keepRuntimeAlive() is set (counter=0), so halting execution but not exiting the runtime' if no_exit and call_exit: self.assertContained(msg, proc.stderr) else: @@ -6617,7 +6615,6 @@ def test_modularize_incoming(self, args): def test_pthread_print_override_modularize(self): self.set_setting('EXPORT_NAME', 'Test') self.set_setting('PROXY_TO_PTHREAD') - self.set_setting('EXIT_RUNTIME') self.set_setting('MODULARIZE') create_file('main.c', ''' #include @@ -7101,7 +7098,7 @@ def test_RUNTIME_LINKED_LIBS(self): @parameterized({ '': ([],), - 'pthread': (['-g', '-pthread', '-Wno-experimental', '-sPROXY_TO_PTHREAD', '-sEXIT_RUNTIME'],), + 'pthread': (['-g', '-pthread', '-Wno-experimental', '-sPROXY_TO_PTHREAD'],), }) def test_ld_library_path(self, args): if args: @@ -11418,7 +11415,7 @@ def test_proxy_to_pthread_stack(self): ['success'], emcc_args=['-pthread', '-sPROXY_TO_PTHREAD', '-sDEFAULT_PTHREAD_STACK_SIZE=64kb', - '-sSTACK_SIZE=128kb', '-sEXIT_RUNTIME', + '-sSTACK_SIZE=128kb', '--profiling-funcs']) @parameterized({ @@ -12023,9 +12020,7 @@ def test_main_pthread_join_detach(self): @node_pthreads def test_proxy_pthread_join_detach(self): # Verify that we're unable to detach or join the proxied main thread - self.set_setting('PROXY_TO_PTHREAD') - self.set_setting('EXIT_RUNTIME') - self.do_run_in_out_file_test('other/test_pthread_self_join_detach.c') + self.do_run_in_out_file_test('other/test_pthread_self_join_detach.c', emcc_args=['-sPROXY_TO_PTHREAD']) @node_pthreads def test_pthread_asyncify(self): @@ -12559,7 +12554,7 @@ def test_SUPPORT_LONGJMP_wasm(self): 'trusted': [['-sTRUSTED_TYPES']] }) def test_pthread_export_es6(self, args): - self.run_process([EMCC, test_file('hello_world.c'), '-o', 'out.mjs', '-pthread', '-sPROXY_TO_PTHREAD', '-sEXIT_RUNTIME'] + args) + self.run_process([EMCC, test_file('hello_world.c'), '-o', 'out.mjs', '-pthread', '-sPROXY_TO_PTHREAD'] + args) create_file('runner.mjs', ''' import Hello from "./out.mjs"; Hello(); @@ -13243,7 +13238,6 @@ def test_override_system_js_lib_symbol(self): @node_pthreads def test_pthread_lsan_no_leak(self): self.set_setting('PROXY_TO_PTHREAD') - self.set_setting('EXIT_RUNTIME') self.emcc_args += ['-gsource-map', '-pthread'] self.do_run_in_out_file_test('pthread/test_pthread_lsan_no_leak.cpp', emcc_args=['-fsanitize=leak']) self.do_run_in_out_file_test('pthread/test_pthread_lsan_no_leak.cpp', emcc_args=['-fsanitize=address']) @@ -13251,7 +13245,6 @@ def test_pthread_lsan_no_leak(self): @node_pthreads def test_pthread_lsan_leak(self): self.set_setting('PROXY_TO_PTHREAD') - self.set_setting('EXIT_RUNTIME') self.add_pre_run("Module['LSAN_OPTIONS'] = 'exitcode=0'") self.emcc_args += ['-gsource-map', '-pthread'] expected = [ @@ -13279,7 +13272,6 @@ def test_pthread_js_exception(self): # to exit with an error. self.emcc_args.append('-pthread') self.set_setting('PROXY_TO_PTHREAD') - self.set_setting('EXIT_RUNTIME') self.build(test_file('other/test_pthread_js_exception.c')) err = self.run_js('test_pthread_js_exception.js', assert_returncode=NON_ZERO) self.assertContained('missing is not defined', err) @@ -13355,7 +13347,7 @@ def test_emscripten_set_immediate_loop(self): @parameterized({ '': ([],), - 'pthreads': (['-pthread', '-sPROXY_TO_PTHREAD', '-sEXIT_RUNTIME'],), + 'pthreads': (['-pthread', '-sPROXY_TO_PTHREAD'],), }) def test_emscripten_main_loop(self, args): self.do_runf('test_emscripten_main_loop.c', emcc_args=args) @@ -13374,7 +13366,6 @@ def test_pthread_trap(self): # TODO(https://github.com/emscripten-core/emscripten/issues/15161): # Make this work without PROXY_TO_PTHREAD self.set_setting('PROXY_TO_PTHREAD') - self.set_setting('EXIT_RUNTIME') self.emcc_args += ['--profiling-funcs', '-pthread'] output = self.do_runf('pthread/test_pthread_trap.c', assert_returncode=NON_ZERO) self.assertContained('sent an error!', output) @@ -13412,7 +13403,6 @@ def test_windows_batch_script_workaround(self): @node_pthreads def test_pthread_out_err(self): self.set_setting('PROXY_TO_PTHREAD') - self.set_setting('EXIT_RUNTIME') self.emcc_args.append('-pthread') self.do_other_test('test_pthread_out_err.c') @@ -13420,7 +13410,6 @@ def test_pthread_out_err(self): def test_pthread_icu(self): self.set_setting('USE_ICU') self.set_setting('PROXY_TO_PTHREAD') - self.set_setting('EXIT_RUNTIME') self.emcc_args.append('-pthread') self.do_other_test('test_pthread_icu.cpp') @@ -14236,7 +14225,6 @@ def test_itimer_standalone(self): @flaky('https://github.com/emscripten-core/emscripten/issues/20125') def test_itimer_proxy_to_pthread(self): self.set_setting('PROXY_TO_PTHREAD') - self.set_setting('EXIT_RUNTIME') self.do_other_test('test_itimer.c') @node_pthreads @@ -14330,7 +14318,6 @@ def test_USE_PTHREADS(self): self.emcc_args.remove('-pthread') self.set_setting('USE_PTHREADS') self.set_setting('PROXY_TO_PTHREAD') - self.set_setting('EXIT_RUNTIME') self.do_runf('pthread/test_pthread_create.c') def test_cpp_module(self): @@ -14601,7 +14588,7 @@ def test_add_js_function_bigint(self, memory64, wasm_function): @parameterized({ '': ([],), - 'pthread': (['-g', '-pthread', '-Wno-experimental', '-sPROXY_TO_PTHREAD', '-sEXIT_RUNTIME'],), + 'pthread': (['-g', '-pthread', '-Wno-experimental', '-sPROXY_TO_PTHREAD'],), }) def test_preload_module(self, args): if args: diff --git a/test/test_posixtest.py b/test/test_posixtest.py index bdf75927c32ee..8e12124e91491 100644 --- a/test/test_posixtest.py +++ b/test/test_posixtest.py @@ -168,7 +168,6 @@ def f(self): '-Wno-int-conversion', '-Wno-format', '-pthread', - '-sEXIT_RUNTIME', '-sTOTAL_MEMORY=256mb', '-sPTHREAD_POOL_SIZE=40'] if browser: