[PATCH] Crash on thread id wrap around

Mark Kettenis mark.kettenis@xs4all.nl
Thu Mar 26 13:05:00 GMT 2015


> From: Pedro Alves <palves@redhat.com>
> Date: Thu, 26 Mar 2015 12:45:50 +0000
> 
> I managed to come up with a test that reliably reproduces this.  It
> relies on pids wrapping around though, so could potentially take a
> while.  On my box that's 4 seconds; on gcc110, a PPC box which has
> max_pid set to 65536, it's over 10 seconds.  So I made the test
> compute how long that would take, and cap the time waited if that
> would be too long.

You can't really count on thread IDs wrapping on systems that
randomize them.  There is still a chance that you'll reuse on of
course.  Not much you can do about this, but folks should be aware
that this may cause non-reproducable test results on some systems.



More information about the Gdb-patches mailing list