[PATCH] [compiler-rt] Make the ASan OS X DYLD_INSERT_LIBRARIES detection path-independent

Kuba Brecka kuba.brecka at gmail.com
Wed Nov 12 15:10:56 PST 2014


ASan on Darwin during launch reads DYLD_INSERT_LIBRARIES env. variable and if it's not set or if the ASan dylib is not present in there, it relaunches the process. The check whether the dylib is present in the variable is now trying to find a full path in there. This fails in the scenarios where we want to copy the dylib to the executable's directory or somewhere else and set the DYLD_INSERT_LIBRARIES manually, see http://reviews.llvm.org/D6018.

Let's change the search in DYLD_INSERT_LIBRARIES to only look for the filename of the dylib and not the full path.

http://reviews.llvm.org/D6238

Files:
  lib/asan/asan_mac.cc
  test/asan/TestCases/Darwin/dyld_insert_libraries_reexec.cc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6238.16119.patch
Type: text/x-patch
Size: 1612 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141112/c1e7fd0a/attachment.bin>


More information about the llvm-commits mailing list