The problem is related to memory sanitizer only (thread/address works fine). Steps to reproduce (tested kernel version is 4.3.3): compile simple hello-world code with: clang++ -fPIE -fsanitize=memory ./helloworld.cc It compiles without problems, but the built binary fails with: FATAL: Code 0x55d2c994e9f0 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'. The fixed upstream bug could be found here: https://llvm.org/bugs/show_bug.cgi?id=24155 It would be great to port the bugfix to the portage because this sanitizer functionaly is completely broken at the moment (and according to the upstream the bug is present on stable gentoo kernel 4.1.12).
I don't seem to be able to connect to llvm.org right now. If the patch isn't unreasonably big, could you upload it here?
> I don't seem to be able to connect to llvm.org right now. If the patch isn't > unreasonably big, could you upload it here? I'm away from my computer now, so can do only within around another 4 hours.
(In reply to Michał Górny from comment #1) > I don't seem to be able to connect to llvm.org right now. If the patch isn't > unreasonably big, could you upload it here? patches sent via mail.
I have modified the patches to apply to 3.7.0 and I'm rebuilding LLVM now.
commit 4ea0768355d83631d0baf5c7de9b712ea2ebe12a Author: Michał Górny <mgorny@gentoo.org> Date: Sun Dec 27 23:47:38 2015 sys-devel/llvm: Backport msan fix for 4.1+ kernels, bug #569894