[PATCH] Instrument bit field and unaligned accesses for TSAN

Dmitry Vyukov dvyukov@google.com
Wed Jan 14 16:58:00 GMT 2015


Cool! Thanks.
Gcc is again ahead of clang :)



On Sat, Jan 3, 2015 at 1:11 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Fri, Jan 02, 2015 at 11:01:56PM +0100, Bernd Edlinger wrote:
>> gcc/ChangeLog:
>> 2015-01-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
>>
>>       Instrument bit field and unaligned accesses for TSAN.
>>       * sanitizer.def (BUILT_IN_TSAN_READ_RANGE): New built-in function.
>>       (BUILT_IN_TSAN_WRITE_RANGE): New built-in function.
>>       * tsan.c (instrument_expr): Handle COMPONENT_REF and BIT_FIELD_REF.
>>       Use BUILT_IN_TSAN_READ_RANGE and BUILT_IN_TSAN_WRITE_RANGE for
>>       unaligned memory regions.
>>
>> testsuite/ChangeLog:
>> 2015-01-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
>>
>>       * c-c++-common/tsan/bitfield_race.c: New testcase.
>>       * g++.dg/tsan/aligned_vs_unaligned_race.C: Fixed.
>
> Ok for trunk.
>
>         Jakub



More information about the Gcc-patches mailing list