> And Unix has had ptrace(2) for a very long time too
A flaw in the Linux implementation, though, prevents one to run ptrace on a process that is using ptrace itself.
As more programs use ptrace, this flaw is becoming quite annoying.
A flaw in the Linux implementation, though, prevents one to run ptrace on a process that is using ptrace itself.
As more programs use ptrace, this flaw is becoming quite annoying.
> that Win32 has already this kind of feature since ages: Process access routines such as OpenProcess() [1] coupled with ReadProcessMemory() [2]
And Unix has had ptrace(2) for a very long time too, which will accomplish the same thing. Also you can read another process's memory through /proc. So there are multiple paths.
Also keep in mind, the most "legit" use case for this stuff is for writing a debugger. If you have used a debugger you are already relying on this functionality being there.
Edit: I am not aware of a win32 equivalent of this thing that lets you easily handle another thread's page faults in user mode though. That seems a little wacky. You can use debugger APIs to handle "STATUS_IN_PAGE_ERROR" and "STATUS_ACCESS_VIOLATION", which might get you there.