Skip to content

Fix sanitizer builds of test_minimal_runtime_hello_world. NFC #24860

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

Merged
merged 1 commit into from
Aug 5, 2025

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Aug 5, 2025

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)).

@sbc100 sbc100 requested review from brendandahl and kripken August 5, 2025 16:11
This test updated in emscripten-core#24849 which caused the asan and lsan versions of
the test to start failing.  The reason is that prior to emscripten-core#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 emscripten-core#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)`).
@sbc100 sbc100 changed the title Fix sanitizer builds of test_minimal_runtime_hello_world_streaming. NFC Fix sanitizer builds of test_minimal_runtime_hello_world. NFC Aug 5, 2025
@sbc100 sbc100 merged commit 252ed11 into emscripten-core:main Aug 5, 2025
5 of 14 checks passed
@sbc100 sbc100 deleted the fix_test branch August 5, 2025 16:44
sbc100 added a commit to sbc100/emscripten that referenced this pull request Aug 5, 2025
- Avoid assignment (prefer mutation) to self.cflags (see emscripten-core#24860 for why
  this is better).
- Parameterize test_wasm_intrinsics_simd and remove unneeded arguments.
- Use inline cflags where it improves test readability.
- Remove use of EMSCRIPTEN_KEEPALIVE with `main` function.
@sbc100 sbc100 mentioned this pull request Aug 5, 2025
sbc100 added a commit to sbc100/emscripten that referenced this pull request Aug 5, 2025
- Avoid assignment (prefer mutation) to self.cflags (see emscripten-core#24860 for why
  this is better).
- Parameterize test_wasm_intrinsics_simd and remove unneeded arguments.
- Use inline cflags where it improves test readability.
- Remove use of EMSCRIPTEN_KEEPALIVE with `main` function.
sbc100 added a commit to sbc100/emscripten that referenced this pull request Aug 5, 2025
- Avoid assignment (prefer mutation) to self.cflags (see emscripten-core#24860 for why
  this is better).
- Parameterize test_wasm_intrinsics_simd and remove unneeded arguments.
- Use inline cflags where it improves test readability.
- Remove use of EMSCRIPTEN_KEEPALIVE with `main` function.
sbc100 added a commit that referenced this pull request Aug 5, 2025
- Avoid assignment (prefer mutation) to self.cflags (see #24860 for why
this is better).
- Parameterize test_wasm_intrinsics_simd and remove unneeded arguments.
- Use inline cflags where it improves test readability.
- Remove use of EMSCRIPTEN_KEEPALIVE with `main` function.
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 this pull request may close these issues.

2 participants