This is the mail archive of the
mailing list for the Archer project.
Re: ptrace improvement: PTRACE_O_INHERIT
> > unless it uses multiple threads where one thread calls wait*
> > while another thread calls ptrace. In that case, the debugger's wait*
> > thread could see a stop result that appears to be after its other thread
> > detached the same tracee. (That is already true now with PTRACE_DETACH.)
> > If the debugger's own wait* call is strictly ordered after its detaching
> > ptrace call, there can be no such confusion.
> Could you spell please?
Say a debugger has two threads.
Thread A calls wait*.
Thread B calls PTRACE_DETACH.
Thread A can perceive a wait result from tracee T to be simultaneous with,
or after, thread B has detached from T.
The debugger has to do some work to be sure it doesn't get confused in its
own bookkeeping of what tracees it thinks are attached.