Skip to content

Commit 6f75eac

Browse files
authored
Require names when using STACK_OVERFLOW_CHECK=2 (#26878)
This change is needed so that WebAssembly/binaryen#8679 can roll in. The combination will then fix #24964
1 parent 42c5cea commit 6f75eac

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

test/test_other.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3192,6 +3192,7 @@ def test_dwarf_sourcemap_names(self):
31923192
(['-Oz', '-gsource-map'], False, True, False),
31933193
(['-gsource-map', '-sERROR_ON_WASM_CHANGES_AFTER_LINK'], False, True, False),
31943194
(['-gsource-map', '-Og', '-sERROR_ON_WASM_CHANGES_AFTER_LINK'], False, True, False),
3195+
(['-sSTACK_OVERFLOW_CHECK=2'], False, False, False),
31953196
]:
31963197
print(flags, expect_dwarf, expect_sourcemap, expect_names)
31973198
self.emcc(test_file(source_file), flags + ['-o', js_file])

tools/emscripten.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,9 @@ def finalize_wasm(infile, outfile, js_syms):
541541
args.append('--side-module')
542542
if settings.STACK_OVERFLOW_CHECK >= 2:
543543
args.append('--check-stack-overflow')
544+
# The check-stack pass in binaryen needs to be able to locate `__stack_pointer` by name.
544545
modify_wasm = True
546+
need_name_section = True
545547
if settings.STANDALONE_WASM:
546548
args.append('--standalone-wasm')
547549

0 commit comments

Comments
 (0)