[ASan] Fix https://code.google.com/p/address-sanitizer/issues/detail?id=159
MaybeReexec() does now a tricky job to manage DYLD_INSERT_LIBRARIES in a safe way. Because we're using library interposition, it's critical for an instrumented app to be executed with the runtime library present in DYLD_INSERT_LIBRARIES list. Therefore if it's initially missing in that list, we append the runtime library name to the value of DYLD_INSERT_LIBRARIES and then exec() ourselves. On the other hand, some of the apps exec()ed by our program may not want to have ASan runtime library preloaded, so we remove the runtime library from the DYLD_INSERT_LIBRARIES if it's already there. Users may want to preload other libraries using DYLD_INSERT_LIBRARIES, so we preserve those. llvm-svn: 175276
Loading
Please register or sign in to comment