Skip to content

Commit deddade

Browse files
committed
Disable lsan.test_asyncify_during_exit. NFC
This test leaks allocates the asyncify stack during the exit handlers and its never freed. Interestingly enough this leak was not caught prior to #14280. I did some investigation and found that prior to #14280 this chunk was bring detected a reachable via the conservative stack scan here: https://github.com/emscripten-core/emscripten/blob/98a8cbf5032f8d369be636a59180a59f1eb8833f/system/lib/compiler-rt/lib/lsan/lsan_common_emscripten.cpp#L141-L153 If I comment out this stack scan then this leak will be detected even before #14280 Also, add `--profiling` to asan and lsan builds to make error reports more useful. See #14360
1 parent 1647d14 commit deddade

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/test_core.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7591,6 +7591,8 @@ def test_asyncify_assertions(self):
75917591
self.set_setting('ASSERTIONS')
75927592
self.do_core_test('asyncify_assertions.cpp')
75937593

7594+
@no_lsan('leaks asyncify stack during exit')
7595+
@no_asan('leaks asyncify stack during exit')
75947596
def test_asyncify_during_exit(self):
75957597
self.set_setting('ASYNCIFY')
75967598
self.set_setting('ASSERTIONS')
@@ -8679,9 +8681,9 @@ def setUp(self):
86798681
# Add DEFAULT_TO_CXX=0
86808682
strict = make_run('strict', emcc_args=[], settings={'STRICT': 1})
86818683

8682-
lsan = make_run('lsan', emcc_args=['-fsanitize=leak', '-O2'], settings={'ALLOW_MEMORY_GROWTH': 1})
8683-
asan = make_run('asan', emcc_args=['-fsanitize=address', '-O2'], settings={'ALLOW_MEMORY_GROWTH': 1, 'INITIAL_MEMORY': '500mb'})
8684-
asani = make_run('asani', emcc_args=['-fsanitize=address', '-O2', '--pre-js', os.path.join(os.path.dirname(__file__), 'asan-no-leak.js')],
8684+
lsan = make_run('lsan', emcc_args=['-fsanitize=leak', '--profiling', '-O2'], settings={'ALLOW_MEMORY_GROWTH': 1})
8685+
asan = make_run('asan', emcc_args=['-fsanitize=address', '--profiling', '-O2'], settings={'ALLOW_MEMORY_GROWTH': 1, 'INITIAL_MEMORY': '500mb'})
8686+
asani = make_run('asani', emcc_args=['-fsanitize=address', '--profiling', '-O2', '--pre-js', os.path.join(os.path.dirname(__file__), 'asan-no-leak.js')],
86858687
settings={'ALLOW_MEMORY_GROWTH': 1, 'INITIAL_MEMORY': '500mb'})
86868688

86878689
# Experimental modes (not tested by CI)

0 commit comments

Comments
 (0)