You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix handling duplicate symbols when libraries dlopen Python
When libraries like `llvmlite` `dlopen` the Python binary, it creates
duplicate mappings of the binary in the process memory. This caused
PyStack to use the wrong address for `_PyRuntime`, leading to
"Invalid address in remote process" errors.
The fix ensures we ignore any symbols which aren't actually located
within the mapped memory region. This works because when llvmlite makes
the call into `ffi_closure_alloc`, it doesn't map a full copy of the
interpreter, but only the portion of the text segment that it needs for
its trampoline, and so we can recognize that the mapping can't possibly
contain the symbol we're looking for.
Signed-off-by: Pablo Galindo Salgado <pablogsal@gmail.com>
Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
Fix handling of duplicate ``_PyRuntime`` symbols when libraries like llvmlite dlopen the Python binary, which would cause "Invalid address in remote process" errors.
0 commit comments