JDevlieghere added inline comments.

================
Comment at: lldb/test/API/lldbtest.py:78
 
-        # The macOS system integrity protection (SIP) doesn't allow injecting
-        # libraries into system binaries, but this can be worked around by
-        # copying the binary into a different location.
-        if 'DYLD_INSERT_LIBRARIES' in test.config.environment and \
-                (executable.startswith('/System/') or \
-                executable.startswith('/usr/bin/')):
+        # On macOS, we can't do the DYLD_INSERT_LIBRARIES trick with a shim
+        # python binary as the ASan interceptors get loaded too late. Find the
----------------
SIP still matters here, which is why we need to copy the python binary and not 
just invoke it with the result from get_darwin_real_python.py. Can you merge 
the two comments?

I also think that we might set DYLD_INSERT_LIBRARIES unconditionally on other 
hosts. Can we guard this whole thing with a check for macOS?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79607/new/

https://reviews.llvm.org/D79607



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to