-
Notifications
You must be signed in to change notification settings - Fork 835
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
LeakSanitizer leads to the program exiting with an error code with no output when leaks are present #3589
Comments
Same issue here. On PC with older WSL I have same issue as in #121 (which is still not fixed, but dirty workaround with ptrace_scope helps). |
Could you please provide the earlier part of the trace so we can get more info on this? Thanks in advance! |
FWIW I tried reproducing this on my work PC that has Windows 1803 (build 17134.345) and I couldn't reproduce it - leak sanitizer worked correctly. However, this was on Ubuntu Xenial (16.04). I think the system I reported the bug from originally may have been using Bionic (18.04). I'll update this bug with more precise version information and full strace dump. |
[But you already know that.] Since I'm here (and only since)...
You do not. Or rather, if you are still seeing |
True, I've oversimplified. I didn't mean problem with "CHECK failed", but the fact that "ASAN doesn't work" that can be worked-around with setting ptrace_scope=0 as zeux pointed. I understand there are/were various reasons for broken ASAN there. |
Here's the full strace dump: You can also generate it yourself as @therealkenc suggested above. The bug happens in the following setup: Windows 10 version 1809 (OS Build 17763.55) uname -a: lsb_release -a: |
This should be resolved as of Build 18305. |
This shipped in 1903. |
In Windows October 2018 update (1809, build 17763.1) leak sanitizer no longer produces a visible error in the output (#3053). However, if the program has any leaks, the program exits with code 1 but doesn't produce any output.
I suspect that in a successful execution (with no leaks), leak sanitizer still fails to run correctly, but the output is suppressed. I may be wrong since it's hard to analyze the behavior considering that leak sanitizer doesn't guarantee that it works under strace.
STR:
Compile the following code with
clang++ -fsanitize=address
and run:Running the program produces no output, but the exit code is 1. strace gives the following result:
I suspect that the root cause is that wait4 on the pid that was set as ptracer fails.
The text was updated successfully, but these errors were encountered: