http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55441



             Bug #: 55441

           Summary: ThreadSanitizer: handle bitfields

    Classification: Unclassified

           Product: gcc

           Version: unknown

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: other

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: dvyu...@google.com





Currently gcc/tsan.c handles only bitfield accesses that are byte-aligned and

has byte-granularity:



+  if (bitpos % (size * BITS_PER_UNIT)

+      || bitsize != size * BITS_PER_UNIT)

+    return false;



It must be fixed to handle all bitfield access by extending access to the whole

bitfiled. I.e. an access to an uint64 bitfield touches the whole uint64.

Reply via email to