================
@@ -1289,6 +1289,46 @@ def requireThreadSupport(func):
     )(func)
 
 
+def _can_disable_aslr():
+    original_persona = None
+    GET_CURRENT_PERSONA = 0xFFFFFFFF
+    ADDR_NO_RANDOMIZE = 0x0040000
+    ERR = -1
+
+    libc = ctypes.CDLL(None)
+    personality = libc.personality
+    personality.argtypes = [ctypes.c_ulong]
+    personality.restype = ctypes.c_int
+
+    try:
----------------
DavidSpickett wrote:

This is basically a context manager but I don't have to make a class for it.

https://github.com/llvm/llvm-project/pull/218883
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to