This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/55441] New: ThreadSanitizer: handle bitfields
- From: "dvyukov at google dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 22 Nov 2012 07:58:03 +0000
- Subject: [Bug other/55441] New: ThreadSanitizer: handle bitfields
- Auto-submitted: auto-generated
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.