-
Notifications
You must be signed in to change notification settings - Fork 844
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
[WSL1] LeakSanitizer always encounters fatal error on exit with any cpp compiled with g++. #6304
Comments
Thank-you for the concise report and strace log. Cannot reproduce on WSL1 20270: There were improvements with respect to the sanitizer in #3589 that were assumed to make 1903 (aka 18363) but maybe it didn't. Call this fixed in WSL2 out of an abundance of caution. If it is fixed in WSL1 19042, so much the better ("that too"). |
Hi. I upgraded my machine to Windows 20.10 (Build 19042.685), did a clean install of Ubuntu 20.10 from https://cloud-images.ubuntu.com/groovy/current/groovy-server-cloudimg-arm64-wsl.rootfs.tar.gz with WSL 1 and retried with both g++-10 and g++-9 and the problem seems to persist.
A signal 11 is still caught. Here is the strace: Some additional info:
Cpu Model: I would be happy to dive deeper into debugging the issue myself, however, I am at a loss when it comes to how LSAN works, how WSL might cause an issue with LSAN and what in general could be the cause of such a problem. Any resources which I could learn from in order to debug this issue would also be appreciated. Switching my Ubuntu installation to WSL2 solves the issue. So this is a WSL1 issue somehow. (I currently prefer to stay with WSL1 due to faster Windows FS performance.) Switching to WSL1 once again results, as one would expect, in a signal 11 being caught. |
Environment
Steps to reproduce
Compile & execute main.cpp with contents
int main() {return 0;}
with-fsanitize=leak
using the following commands:Expected behavior
No errors are expected since this is the simplest possible empty cpp file.
Actual behavior
LeakSanitizer encounters a fatal error on every .cpp I have tried when compiling with -fsanitize=leak.
The command exits with non-zero status and has the following output:
I believe signal 11 stands for segmentation fault. Trying to debug with gdb and
LSAN_OPTIONS=verbosity=1:log_threads=1:abort_on_error=1
results in an abort with the following call stack:The error seems to happen after main() is finished and the program is doing final cleanup.
Compiling with clang++ 11.0.0-2 on my machine on WSL1 results in the exact same output.
However, compiling with g++ 10.2 on ubuntu 20.10 on an actual linux machine does not result in this issue. That is why I suspect this might have something to do with WSL.
The strace can be found here:
https://gist.github.com/hbirler/37f84102cbd1dbfa519a98c9bcf9cadf
Compiling and running without -fsanitize results in no errors and the program exits with code 0.
The text was updated successfully, but these errors were encountered: