@@ -6755,6 +6755,10 @@ def test_demangle_stacks(self, extra_args):
6755
6755
# ensure function names are preserved
6756
6756
self .emcc_args += ['--profiling-funcs' ]
6757
6757
self .do_core_test ('test_demangle_stacks.cpp' , assert_returncode = NON_ZERO )
6758
+
6759
+ # there should be a name section in the file
6760
+ self .assertTrue (webassembly .Module ('test_demangle_stacks.wasm' ).has_name_section ())
6761
+
6758
6762
print ('without assertions, the stack is not printed, but a message suggesting assertions is' )
6759
6763
self .set_setting ('ASSERTIONS' , 0 )
6760
6764
self .do_core_test ('test_demangle_stacks_noassert.cpp' , assert_returncode = NON_ZERO )
@@ -7598,14 +7602,12 @@ def test_asyncify_unused(self):
7598
7602
'onlylist_a' : (['-sASYNCIFY_ONLY=["main","__original_main","foo(int, double)","baz()","c_baz","Structy::funcy()","bar()"]' ], True ),
7599
7603
'onlylist_b' : (['-sASYNCIFY_ONLY=["main","__original_main","foo(int, double)","baz()","c_baz","Structy::funcy()"]' ], True ),
7600
7604
'onlylist_c' : (['-sASYNCIFY_ONLY=["main","__original_main","foo(int, double)","baz()","c_baz"]' ], False ),
7601
- 'onlylist_d' : (['-sASYNCIFY_ONLY=["foo(int, double)","baz()","c_baz","Structy::funcy()"]' ], False , None , True ),
7605
+ 'onlylist_d' : (['-sASYNCIFY_ONLY=["foo(int, double)","baz()","c_baz","Structy::funcy()"]' ], False ),
7602
7606
'onlylist_b_response' : ([], True , '["main","__original_main","foo(int, double)","baz()","c_baz","Structy::funcy()"]' ),
7603
7607
'onlylist_c_response' : ([], False , '["main","__original_main","foo(int, double)","baz()","c_baz"]' ),
7604
7608
})
7605
7609
@no_memory64 ('TODO: asyncify for wasm64' )
7606
- def test_asyncify_lists (self , args , should_pass , response = None , no_san = False ):
7607
- if no_san and is_sanitizing (self .emcc_args ):
7608
- self .skipTest ('remaining asyncify+sanitizer TODO' )
7610
+ def test_asyncify_lists (self , args , should_pass , response = None ):
7609
7611
if response is not None :
7610
7612
create_file ('response.file' , response )
7611
7613
self .set_setting ('ASYNCIFY_ONLY' , '@response.file' )
@@ -7619,15 +7621,15 @@ def test_asyncify_lists(self, args, should_pass, response=None, no_san=False):
7619
7621
7620
7622
# use of ASYNCIFY_* options may require intermediate debug info. that should
7621
7623
# not end up emitted in the final binary
7622
- # (note that we can't check this if sanitizers run, as they include a lot of
7623
- # static strings that would match the search)
7624
- if self .is_wasm () and not is_sanitizing (self .emcc_args ):
7625
- binary = read_binary ('test_asyncify_lists.wasm' )
7626
- # there should be no name section
7627
- self .assertFalse (b'name' in binary )
7624
+ if self .is_wasm ():
7625
+ filename = 'test_asyncify_lists.wasm'
7626
+ # there should be no name section. sanitizers, however, always enable that
7627
+ if not is_sanitizing (self .emcc_args ):
7628
+ self .assertFalse (webassembly .Module (filename ).has_name_section ())
7628
7629
# in a fully-optimized build, imports and exports are minified too and we
7629
7630
# can verify that our function names appear nowhere
7630
7631
if '-O3' in self .emcc_args :
7632
+ binary = read_binary (filename )
7631
7633
self .assertFalse (b'main' in binary )
7632
7634
7633
7635
@parameterized ({
0 commit comments