This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Crash on thread id wrap around
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: palves at redhat dot com
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 26 Mar 2015 14:05:10 +0100 (CET)
- Subject: Re: [PATCH] Crash on thread id wrap around
- Authentication-results: sourceware.org; auth=none
- References: <1427373950-30952-1-git-send-email-palves at redhat dot com>
> 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.