Re: [patch 2/3] attach-fail-reasons: Say more than ptrace: Operation not permitted.

Jan Kratochvil
2012-03-13T14:50:56Z

On Tue, 13 Mar 2012 15:34:55 +0100, Pedro Alves wrote:
> E.g., with a multi-threaded exec, the execing thread just disappears
> from /proc/TID as in reality the kernel changed the execing thread's TID, so
> it's possible we end trying to open the non-existing /proc/TID/... before handling
> the exec event. I think there were other ways for a tracee to be completely
> killed/removed behind the tracer's back, but maybe that was only with older kernels,
> if it ever was.

I do not see when exactly this race may happen.

Still I always thought /proc is racy by design, it does not have to be (not
sure if it currently is or is not).

> dynamic string growth with delete[]/new[] to reallocate (instead of std::string, not
> knowing its existence),

The difference is statistically everyone knows STL but nobody knows
GDB-specific (or Sourceware-specific) libraries/functions. This makes
learning curve of possible contributors needlessly steep.

Thanks,
Jan