Zach Riggle added the comment:
Neat, though that's not in the standard library.
The current logic for getting a handle to libc could also be simplified via
ctypes.util.find_library
(https://docs.python.org/3/library/ctypes.html#finding-shared-libraries).
Darwin:
>>> impo
Zach Riggle added the comment:
Of note, there's no need to actually cause a SIGSEGV to generate the signal.
The tests might be more clear to replace:
libc.printf(ctypes.c_char_p(0xdeadbeef))
with
os.kill(os.getpid(), signal.SI
Zach Riggle added the comment:
To further clarify the report:
When the attached proof-of-concept is executed, a RuntimeException is raised,
which has a comment "Should never happen".
The issue isn't due to SIGCHLD, but rather following a waitpid() call. The
code attempts t
New submission from Zach Riggle:
The attached script hits some "This should never happen" code in the subprocess
module.
These lines here:
https://github.com/python/cpython/blob/2.7/Lib/subprocess.py#L1036-L1038
The root cause is a lack of checking WIFSTOPPED and WSTOPSIG in t