https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147
--- Comment #10 from Maxim Ostapenko <chefmax at gcc dot gnu.org> --- Created attachment 37310 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37310&action=edit Proposed fix. « El Capitan » is OS X 10.11, right? So, this is my vision of the problem: In OS X 10.11+ or iOS 9.0+, dyld will interpose even if DYLD_INSERT_LIBRARIES is not set. This means, that it's not safe to use "setenv" function to set DYLD_INSERT_LIBRARIES in MaybeReexec, because ASan interceptors already established and we can easily end up with something like this: AsanInitInternal -> MaybeReexec -> setenv -> some intercepted function (say, memmove) -> BOOM. In fact, there is no need to reexec at all on such platforms, because we already have working interceptors. Upstream ASan already has the fix, attaching adapted cherry-picked commit. Could you try it?