[LLVMdev] [PATCH] Add the disable_aslr option that will disable the address space layout randomization under AddressSanitizer on 10.6
kcc at google.com
Fri Dec 9 14:54:03 PST 2011
On Fri, Dec 9, 2011 at 2:04 PM, Eric Christopher <echristo at apple.com> wrote:
> On Dec 9, 2011, at 11:46 AM, Alexander Potapenko wrote:
> >> Link time is of course better.
> >> But if there is a syscall (like the one used by setarch) we could call
> >> and reexec.
> >> Using setenv("DYLD_NO_PIE")+reexec looks gross to me.
> > There's posix_spawnattr_setflags() that can do the job
> > (
> > but the necessary flag appeared only in Lion.
> > To the best of my knowledge, there's no link-time option that disables
> > ASLR but keeps PIE on Snow Leopard or Lion.
> > At the moment we're using DYLD_NO_PIE with Chromium binaries to
> > disable ASLR at runtime.
> One bit that may make sense is to support the newest (Lion) style and give
> a descriptive error message for the other two cases? I.e. if we notice that
> MH_PIE is set in the executable, but we're not on Lion and we don't have
> DYLD_NO_PIE set in the environment give an error?
> Or some combination of this.
Yea, something like this will be simpler to maintain.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev