Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions test/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -14663,6 +14663,13 @@ def test_stack_overflow(self):
cflags=['-O1', '--profiling-funcs'],
assert_returncode=NON_ZERO)

# BINARYEN_PASS_DEBUG validates after each binaryen pass, which catches
# invalid IR from the stack-check pass that STACK_OVERFLOW_CHECK=2 runs.
@with_env_modify({'BINARYEN_PASS_DEBUG': '1'})
def test_stack_overflow_check_pass_debug(self):
self.set_setting('STACK_OVERFLOW_CHECK', 2)
self.do_runf('hello_world.c', 'Hello, world!\n')

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the binaryen fix looks good, but I'm not sure we need to add tests like this (basically a test of binaryen) here in the emscripten repo? This seems like something that should be tested in binaryen. Having said that I guess it could make sense for emscripten to be tested with BINARYEN_PASS_DEBUG in some cases?

@kripken WDYT?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggested making this PR because otherwise we don't have an end-to-end regression test for the user-visible bug. The new test in this PR currently fails, and it will be good to see that it passes after the Binaryen change rolls in. Actually landing this PR is another matter; I would be satisfied just seeing the test go from passing to failing on CI without landing it.

@sbc100 sbc100 Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough.. i don't feel too strongly either way.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sgtm too to verify the test goes from red to green. No need to land the test itself. The Binaryen side has enough coverage.


@also_with_wasm64
@parameterized({
'': ([],),
Expand Down
Loading