Skip to content

Commit 0d2f8b4

Browse files
committed
[MODULARIZE=instance] Fix growableHeap pass
This was causing `asan.test_modularize_instance_pthreads` to fail.
1 parent f531731 commit 0d2f8b4

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
@@ -9700,8 +9700,8 @@ def test_modularize_instance_hello(self):
97009700
'pthreads': (['-pthread'],),
97019701
})
97029702
def test_modularize_instance(self, args):
9703-
if self.get_setting('WASM_ESM_INTEGRATION') and '-pthread' in args:
9704-
self.skipTest('pthread is not compatible with WASM_ESM_INTEGRATION')
9703+
if args:
9704+
self.setup_node_pthreads()
97059705
create_file('library.js', '''\
97069706
addToLibrary({
97079707
$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(node, c) {
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)