This is the mail archive of the
mailing list for the glibc project.
Re: Fix race in tst-mqueue5
- From: "Tulio Magno Quites Machado Filho" <tuliom at linux dot vnet dot ibm dot com>
- To: "Paul E. Murphy" <murphyp at linux dot vnet dot ibm dot com>
- Cc: "libc-alpha\ at sourceware dot org" <libc-alpha at sourceware dot org>, Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Date: Fri, 15 Jan 2016 16:55:28 -0200
- Subject: Re: Fix race in tst-mqueue5
- Authentication-results: sourceware.org; auth=none
- References: <569552C6 dot 8050200 at linux dot vnet dot ibm dot com>
"Paul E. Murphy" <firstname.lastname@example.org> writes:
> The check is done on line 117 by a thread spawned
> from do_child(), forked from do_test(). This test
> generates a signal in the forked process.
> Either thread may handle the signal, and on ppc,
> it happens to be done on do_child, on the thread
> which is not doing the check on line 117.
> This exposes a race condition whereby the test
> incorrectly fails as the signal is caught during
> or after the check.
> This is mitigated by ensuring the signal is blocked
> in the child thread while thread is running.
Pushed as a3e5b4f.