This revision was automatically updated to reflect the committed changes.
Closed by commit rG8cb86ead7741: [lldb/test][Darwin] Ask dyld where the real
python is (authored by vsk).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79607/new/
JDevlieghere accepted this revision.
JDevlieghere added a comment.
This revision is now accepted and ready to land.
LGTM!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79607/new/
https://reviews.llvm.org/D79607
vsk updated this revision to Diff 262799.
vsk added a comment.
- Reinstated comment about SIP to explain why we copy python
- Added a platform check
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79607/new/
https://reviews.llvm.org/D79607
Files:
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
vsk updated this revision to Diff 262792.
vsk added a comment.
Query dyld while running within the right python process.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79607/new/
https://reviews.llvm.org/D79607
Files:
JDevlieghere added a comment.
Thanks Vedant for coming up with a structural solution to this problem!
Comment at: lldb/test/API/lldbtest.py:36
+# a Homebrew python3 binary, which also appears to be some kind of shim.
+def getDarwinRealPythonExecutable():
+import ctypes
vsk created this revision.
vsk added a reviewer: JDevlieghere.
Herald added a project: LLDB.
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
"real" python binary, copy it, and invoke it.
Hopefully this makes