Roberto Bertolini
Roberto Bertolini
We should ensure that the process has stopped when reading memory in non-background operations, by adding a `self._ensure_process_stopped()` in these two sections: https://github.com/libdebug/libdebug/blob/4f36190765c003ff45157161540289036d979cd9/libdebug/libdebug.py#L559C1-L564C10 https://github.com/libdebug/libdebug/blob/4f36190765c003ff45157161540289036d979cd9/libdebug/libdebug.py#L580C1-L585C10 Otherwise we get a race where...
Interesting notes on a similar implementation here: https://shachaf.net/tmp/ptrace-notes.txt
Damn, this slipped through our whole test suite and went unnoticed for months
Thanks, fixing it as soon as possible
It's not clear how the new pyproject.toml build system handles CFFI modules. This library which uses CFFI just tells the wheel module to use the old setuptools system: https://github.com/indygreg/python-zstandard/blob/main/pyproject.toml
Can replicate, cannot really explain, but I have a guess: pwntools is calling waitpid on the process too, and sometimes it is able to win against our internal waitpid and...
I was able to test this theory. ```python for i in range(100): io.sendline(b'0') time.sleep(0.001) io.recv(100) print('add_pkm') ``` With a 1ms sleep in-between calls to the tube, the script works correctly.
Let's add a disclaimer about this behavior somewhere in the documentation
In the meantime I'll open an issue with pwntools and see if we get somewhere
@giampaolo Looks like this was already fixed last week in https://github.com/giampaolo/psutil/commit/357285c5ff31ef8bf1b9c347904062e8d7e818d0