Skip to content

Commit 6e34946

Browse files
authored
[MODULARIZE=instance] Fix growableHeap pass (#24429)
This was causing `asan.test_modularize_instance_pthreads` to fail.
1 parent a7cdef6 commit 6e34946

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
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_pthread_run_on_main_thread
558558
asan.test_minimal_runtime_global_initializer
559559
asan.test_fs_js_api_wasmfs
560+
asan.test_modularize_instance_pthreads
560561
lsan.test_dylink_dso_needed
561562
lsan.test_stdio_locking
562563
lsan.test_dlfcn_basic

test/test_core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9717,8 +9717,8 @@ def test_modularize_instance_hello(self):
97179717
'pthreads': (['-pthread'],),
97189718
})
97199719
def test_modularize_instance(self, args):
9720-
if self.get_setting('WASM_ESM_INTEGRATION') and '-pthread' in args:
9721-
self.skipTest('pthread is not compatible with WASM_ESM_INTEGRATION')
9720+
if args:
9721+
self.setup_node_pthreads()
97229722
create_file('library.js', '''\
97239723
addToLibrary({
97249724
$baz: () => console.log('baz'),

tools/acorn-optimizer.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,6 +1174,9 @@ function littleEndianHeap(ast) {
11741174
// in each access), see #8365.
11751175
function growableHeap(ast) {
11761176
recursiveWalk(ast, {
1177+
ExportNamedDeclaration() {
1178+
// Do not recurse export statements since we don't want to rewrite, for example, `export { HEAP32 }`
1179+
},
11771180
FunctionDeclaration(node, c) {
11781181
// Do not recurse into the helper function itself.
11791182
if (

0 commit comments

Comments
 (0)