Skip to content

Disable lsan.test_asyncify_during_exit. NFC #14364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 3, 2021
Merged

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Jun 3, 2021

This test allocates the asyncify stack during the exit handlers and
it's 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:

if (flags()->use_stacks) {
LOG_THREADS("Stack at %p-%p.\n", stack_begin, stack_end);
// We can't get the SP for other threads to narrow down the range, but we
// we can for the current thread.
if (tctx->tid == GetCurrentThread()) {
uptr sp = (uptr) __builtin_frame_address(0);
CHECK(stack_begin <= sp && sp < stack_end);
stack_begin = sp;
}
ScanRangeForPointers(stack_begin, stack_end, frontier, "STACK", kReachable);
}

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

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
@sbc100 sbc100 requested review from aheejin and kripken June 3, 2021 19:07
@sbc100 sbc100 enabled auto-merge (squash) June 3, 2021 20:15
@sbc100 sbc100 merged commit 5934fb6 into main Jun 3, 2021
@sbc100 sbc100 deleted the disable_leaky_test branch June 3, 2021 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants