[LLVMdev] radr://12777299, "potential pthread/eh bug exposed by libsanitizer"
Jack Howarth
howarth at bromo.med.uc.edu
Tue Dec 4 10:33:12 PST 2012
On Tue, Dec 04, 2012 at 09:46:09AM -0800, Alexander Potapenko wrote:
> +kledzik at apple.com
> The dynamic runtime is using dylib interposition (google for
> "__DATA,__interpose).
> If I'm understanding correctly (Nick, can you please confirm this?)
> this allows to interpose the function regardless of the two-level
> namespace.
> The support for dynamic runtime in ASan is almost there. But the new
> interposition method has revealed some issues with the allocator which
> were corked here and there before. Most of those are caused by a
> CoreFoundation dependency, which I'm trying to eliminate now.
Alexander,
Maybe Nick was thinking about iOS rather than darwin with regard to
the switchover from mach_override to mac interpose function. I see...
http://clang-developers.42468.n3.nabble.com/PATCH-ASan-Link-with-the-dynamic-ASan-library-on-iOS-td4027668.html
which suggests that that change was made for iOS but not darwin.
Jack
>
>
> On Mon, Dec 3, 2012 at 8:50 PM, Rafael EspĂndola
> <rafael.espindola at gmail.com> wrote:
> > 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?
> >
> > Cheers,
> > Rafael
>
>
>
> --
> Alexander Potapenko
> Software Engineer
> Google Moscow
More information about the llvm-dev
mailing list