[llvm-dev] Memory Sanitizer crashes after it calls mmap

Nathan Schagen via llvm-dev llvm-dev at lists.llvm.org
Mon Apr 4 02:30:14 PDT 2016


Hi there,

I'm trying to use the memory sanitizer of LLVM 3.3. It's crashing during
MSan initialization (__msan::InitShadow). Here's the strace output.

mmap(0x400000000000, 35184372088831, PROT_NONE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0x400000000000
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_ACCERR, si_addr=0x55edf4b36720}
---
+++ killed by SIGSEGV (core dumped) +++

Because of the -fsanitize=memory option, clang maps all segments in
the 0x5555555????? range which is zero'ed out by this mmap. According to
the Memory Sanitizer paper, the application is expected between
0x600000000000 and 0x7fffffffffff. Why aren't the application segments
mapped there?

Can anyone shed some light on this?

I would like to stick with 3.3 if that's possible.

Thanks alot,
Nathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160404/222addf7/attachment.html>


More information about the llvm-dev mailing list