[LLVMdev] radr://12777299, "potential pthread/eh bug exposed by libsanitizer"
rafael.espindola at gmail.com
Mon Dec 3 20:50:16 PST 2012
On 30 November 2012 13:32, Alexander Potapenko <glider at google.com> wrote:
> No, we are not going to use mach_inject. This isn't portable and may
> be even harder to set up than mach_override.
> The new ASan runtime will use the dylib interposition and will in fact
> require DYLD_INSERT_LIBRARIES to work. However ASan already handles it
> correctly itself: if the corresponding env var is missing the app is
> just re-execed.
> Dylib interposition is supported by Apple and should work on iOS as
> well as Mac OS. It will also probably simplify hooking the memory
> allocations in ASan, which is now very tricky.
This is interesting! I had some difficulties with mach_override myself
in firefox. Don't you have to disable the two-level namespace to be
able to override the functions you want? What currently blocks using
DYLD_INSERT_LIBRARIES instead of mach_override?
More information about the llvm-dev