[Bug other/55441] New: ThreadSanitizer: handle bitfields

dvyukov at google dot com gcc-bugzilla@gcc.gnu.org
Thu Nov 22 07:58:00 GMT 2012


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: unassigned@gcc.gnu.org
        ReportedBy: dvyukov@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.



More information about the Gcc-bugs mailing list