[PATCH] Fix sporadic failure in g++.dg/tsan/aligned_vs_unaligned_race.C

Dmitry Vyukov dvyukov@google.com
Mon Jan 19 08:53:00 GMT 2015


Long story short. Tsan has a logical data race the core of data race
detection algorithm. The race is not a bug, but a deliberate design
decision that makes tsan considerably faster. So ironically, if the
race memory accesses happen almost simultaneously, tsan can miss the
race.
Thus we have sleeps.
Sleeps vs barrier is being discussed in the "Fix parameters of
__tsan_vptr_update" thread.
I would really like to keep llvm and gcc tests in sync as much as possible.



On Fri, Jan 9, 2015 at 6:36 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Fri, Jan 09, 2015 at 04:32:47PM +0100, Bernd Edlinger wrote:
>> Hi,
>>
>> On Thu, 8 Jan 2015 22:27:26, Jakub Jelinek wrote:
>> >> Any objections to approving it now?
>> >
>> > LGTM.
>> >
>> > Jakub
>>
>> would it be OK to apply this patch also to the 4.9 testsuite,
>> except for c-c++-common/tsan/bitfield_race.c and
>> g++.dg/tsan/aligned_vs_unaligned_race.C of course?
>
> Yes, but please give Dmitry some time to respond.
>
>         Jakub



More information about the Gcc-patches mailing list