[llvm-commits] [PATCH] Add the disable_aslr option that will disable the address space layout randomization under AddressSanitizer on 10.6

Alexander Potapenko glider at google.com
Fri Dec 9 04:28:36 PST 2011


The attached patch introduces the disable_aslr option (off by default)
and the corresponding AsanDisableAslr function that should disable the
address space randomization.
This is now implemented for Mac OS 10.6 only.
In order to do this we add DYLD_NO_PIE=1 to the env and restart the program.

Next steps to be done are:
 -- check for MH_PIE bit -- if it is 0, we don't need to disable anything;
 -- use posix_spawnattr_setflags() to set the _POSIX_SPAWN_DISABLE_ASLR on 10.7
 -- disable ASLR on Linux, if needed.

-- 
Alexander Potapenko
Software Engineer
Google Moscow
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asan_aslr_mac.patch
Type: text/x-patch
Size: 5010 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111209/7032eb3f/attachment.bin>


More information about the llvm-commits mailing list