This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix sporadic failure in g++.dg/tsan/aligned_vs_unaligned_race.C
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Mike Stump <mikestump at comcast dot net>
- Cc: Bernd Edlinger <bernd dot edlinger at hotmail dot de>, "H.J. Lu" <hjl dot tools at gmail dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Dmitry Vyukov <dvyukov at google dot com>
- Date: Thu, 8 Jan 2015 22:27:26 +0100
- Subject: Re: [PATCH] Fix sporadic failure in g++.dg/tsan/aligned_vs_unaligned_race.C
- Authentication-results: sourceware.org; auth=none
- References: <DUB118-W189C82F5D792A3B997EED5E4460 at phx dot gbl> <20150107082339 dot GN1667 at tucnak dot redhat dot com> <887DE6D6-D1D2-4432-B6F8-D55707BA2387 at comcast dot net> <20150107170027 dot GV1667 at tucnak dot redhat dot com> <DUB118-W3640B7ADB7473323625ED2E4460 at phx dot gbl> <20150107183216 dot GW1667 at tucnak dot redhat dot com> <DUB118-W50B35996E4A58F0727A81CE4460 at phx dot gbl> <6E94E5C6-78C3-41E8-9B1B-ADF20347412B at comcast dot net> <20150108192916 dot GM1405 at tucnak dot redhat dot com> <D8CBEA02-294F-461E-BE7F-AC38195CCB15 at comcast dot net>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Jan 08, 2015 at 01:07:02PM -0800, Mike Stump wrote:
> On Jan 8, 2015, at 11:29 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> > I disagree. Busy waiting of this kind is not appropriate for the test suite,
>
> What busy waiting, there is none in the last version of the patch?
It was still while (... != i - 1), wasn't it?
While pthread_barrier_wait/futex would typically only wake you up when
needed.
> > tsan can't intercept the calls that you do through dlsym, because you
> > explicitly bypass tsan in that case.
>
> Ah, yes, right, I had pthread_barrier_wait on the brain, sorry. The direct use of it would be problematic. The dlopen use of it, is safe.
>
> So, that removes the objection I had to his patch. Jakub, since he has a complete solution to the problem submitted with all the test cases fixed, I think it should go in.
>
> Any objections to approving it now?
LGTM.
Jakub