-
Notifications
You must be signed in to change notification settings - Fork 11.6k
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
Crash with memory sanitizer on Linux 6.5.0-25 #85013
Comments
A possibly related issue is https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2056762, since this is about the Ubuntu HWE kernel, and the problem I saw was with ThreadSanitizer falling over, due to "unexpected memory mapping". I am suspecting that Ubuntu's 6.5.0-21 -> 6.5.0-25 update changed something in the way memory mappings work (for ASLR or otherwise), that trips up some internal assertions in the sanitizers. |
Also, google/sanitizers#1716, which seems to indicate a kernel change to be the culprit. |
I have confirmed that it does not occur on Ubuntu 24.04.
The following combination occurs: The following combination does not occur: |
This is because a similar fix as for TSan got merged into llvm-project's 18.x branch: I'm not sure at what version that was, but apparently 18.1.3 has it! :) |
Thank you. Since the issue seems to have been resolved, I will close it. |
Reproduction Steps:
The following commands reproduce with more than 50% probability.
$ echo 'int main(void) {return 0;}'|clang -fsanitize=memory -fPIE -pie -x c -;./a.out
FATAL: Code 0x62437d12e410 is out of application range. Non-PIE build?
FATAL: MemorySanitizer can not mmap the shadow memory.
FATAL: Make sure to compile with -fPIE and to link with -pie.
FATAL: Disabling ASLR is known to cause this error.
FATAL: If running under GDB, try 'set disable-randomization off'.
==10691==Process memory map follows:
Environment:
Linux PC-20240312A024 6.5.0-25-generic #25~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Feb 20 16:09:15 UTC 2 x86_64 x86_64
x86_64 GNU/Linux
Ubuntu clang version 14.0.0-1ubuntu1.1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
It does not occur when reverting to 6.5.0-21-generic
The text was updated successfully, but these errors were encountered: