-
Notifications
You must be signed in to change notification settings - Fork 997
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
Shadow memory range interleaves with an existing memory mapping. ASan cannot proceed correctly. ABORTING #820
Comments
Your executable's global variables occupy 298M of memory. This takes too much virtual space and prevents ASan from functioning properly. You could try running on x64 or refactoring your test to not use so much static data. |
Also, this is not PIE, is it?
Try building with -fPIE -pie, it should get loaded at higher addresses and
may avoid overlapping with the asan shadow.
…On Fri, Jun 9, 2017 at 12:42 PM, Yury Gribov ***@***.***> wrote:
0x08048000-0x19c7e000 /home/llt/test/utproj
Your executable's global variables occupy 298M of memory. This takes too
much virtual space and prevents ASan from functioning properly.
You could try running on x64 or refactoring your test to not use so much
static data.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#820 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAZuSpDGK1a-IUumIXOVZX30m0Ps8dH3ks5sCaA5gaJpZM4N0_O4>
.
|
@yugr,Thanks! |
@eugenis , |
so,how did you solve this problem? |
I am writing this for everyone who are trying to find a solution to the problem of running sanitizer on Linux and arrive at this thread from googling. The root of the problem is ASLR randomizing address when ASAN required fixed address as you can see here. As you might infers from this problem, you have to disable ASLR on Linux via "nokaslr" option to be able to run sanitizer, but that put you at a potential security risk, so what I would recommends is to do the followings:
|
What distro did you use? |
Arch Linux on a host machine, I use Hardened Linux Kernel with my own configured SELinux policies. (I write SELinux policies to secure the machine the best I can.) Also the instructions above are old, but mostly the same, just any Distro would work as long as it is on virtualized guest machine since it seems ASLR isn't running there and ASAN could work fine there. |
I am using gcc 6.3.0, and link ASAN statically by adding link option -static-libasan.
==15947==Shadow memory range interleaves with an existing memory mapping. ASan cannot proceed correctly. ABORTING.
==15947==ASan shadow was supposed to be located in the [0x1ffff000-0x3fffffff] range.
==15947==Process memory map follows:
0x08048000-0x19c7e000 /home/llt/test/utproj
0x19c7e000-0x212cf000 /home/llt/test/utproj
0x212cf000-0x23773000
0xf733c000-0xf74e8000
0xf74e8000-0xf7695000 /lib/i386-linux-gnu/libc-2.17.so
0xf7695000-0xf7697000 /lib/i386-linux-gnu/libc-2.17.so
0xf7697000-0xf7698000 /lib/i386-linux-gnu/libc-2.17.so
0xf7698000-0xf769b000
0xf769b000-0xf76b2000 /lib/i386-linux-gnu/libpthread-2.17.so
0xf76b2000-0xf76b3000 /lib/i386-linux-gnu/libpthread-2.17.so
0xf76b3000-0xf76b4000 /lib/i386-linux-gnu/libpthread-2.17.so
0xf76b4000-0xf76b6000
0xf76b6000-0xf76b9000 /lib/i386-linux-gnu/libdl-2.17.so
0xf76b9000-0xf76ba000 /lib/i386-linux-gnu/libdl-2.17.so
0xf76ba000-0xf76bb000 /lib/i386-linux-gnu/libdl-2.17.so
0xf76bb000-0xf76c2000 /lib/i386-linux-gnu/librt-2.17.so
0xf76c2000-0xf76c3000 /lib/i386-linux-gnu/librt-2.17.so
0xf76c3000-0xf76c4000 /lib/i386-linux-gnu/librt-2.17.so
0xf76c4000-0xf7705000 /lib/i386-linux-gnu/libm-2.17.so
0xf7705000-0xf7706000 /lib/i386-linux-gnu/libm-2.17.so
0xf7706000-0xf7707000 /lib/i386-linux-gnu/libm-2.17.so
0xf7707000-0xf7708000 /lib32/libachk.so
0xf7708000-0xf7709000 /lib32/libachk.so
0xf771f000-0xf7729000
0xf7729000-0xf772a000 [vdso]
0xf772a000-0xf774a000 /lib/i386-linux-gnu/ld-2.17.so
0xf774a000-0xf774b000 /lib/i386-linux-gnu/ld-2.17.so
0xf774b000-0xf774c000 /lib/i386-linux-gnu/ld-2.17.so
0xffcd7000-0xffcf8000 [stack]
==15947==End of process memory map.
The text was updated successfully, but these errors were encountered: