Skip to content

Commit 252ed11

Browse files
authored
Fix sanitizer builds of test_minimal_runtime_hello_world. NFC (#24860)
This test updated in #24849 which caused the asan and lsan versions of the test to start failing. The reason is that prior to #24849 there was a bug that caused the test not actually to be run via the santizers since self.cflags was being assigned using `=` rather then `+=`. This was clobbering all the builtin cflags such as `-fsanitizer=address`. Once #24849 this bug was fixed but that exposed another bug in the test which is that it was not including the `minimal_runtime_exit_handling.js` file. Without this file included tests that use MINIMAL_RUNTIME and EXIT_RUNTIME would see an unhandled excpetion then the program exits (due to the `throw` of `exit(0)`).
1 parent 052cd1a commit 252ed11

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,7 @@ jobs:
557557
asan.test_minimal_runtime_global_initializer
558558
asan.test_fs_js_api_wasmfs
559559
asan.test_modularize_instance_pthreads
560+
asan.test_minimal_runtime_hello_world
560561
lsan.test_dylink_dso_needed
561562
lsan.test_stdio_locking
562563
lsan.test_dlfcn_basic

test/test_core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8788,13 +8788,14 @@ def test_no_declare_asm_module_exports(self):
87888788
@no_wasmfs('https://github.com/emscripten-core/emscripten/issues/16816')
87898789
@no_modularize_instance('MODULARIZE=instance is not compatible with MINIMAL_RUNTIME')
87908790
@parameterized({
8791-
'default': ([],),
8791+
'': ([],),
87928792
'streaming_inst': (['-sMINIMAL_RUNTIME_STREAMING_WASM_INSTANTIATION'],),
87938793
'no_export': (['-sDECLARE_ASM_MODULE_EXPORTS=0'],),
87948794
})
87958795
@requires_node # TODO: Support for non-Node.js shells under MINIMAL_RUNTIME
87968796
def test_minimal_runtime_hello_world(self, args):
87978797
self.maybe_closure()
8798+
self.cflags += ['--pre-js', test_file('minimal_runtime_exit_handling.js')]
87988799
self.do_runf('small_hello_world.c', 'hello!', cflags=['-sMINIMAL_RUNTIME'] + args)
87998800

88008801
# Test that printf() works in MINIMAL_RUNTIME=1

0 commit comments

Comments
 (0)