diff options
author | Tom de Vries <tdevries@suse.de> | 2022-07-15 18:08:50 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2022-07-21 15:06:40 +0200 |
commit | a4f4bbc3530f68e615ac5614224bdcb7c21d68dc (patch) | |
tree | 2eb2df17cde09b297e96c5743ed10deec5dc4807 /bfd | |
parent | 2f8fd1da0e52f99138ed489016c774121a33e942 (diff) | |
download | gdb-a4f4bbc3530f68e615ac5614224bdcb7c21d68dc.zip gdb-a4f4bbc3530f68e615ac5614224bdcb7c21d68dc.tar.gz gdb-a4f4bbc3530f68e615ac5614224bdcb7c21d68dc.tar.bz2 |
[gdb] Fix data race in bitfield
Data race between:
...
Write of size 4 at 0x7b8009b483f0 by thread T2:
#0 set_type_align(type*, unsigned long) /home/vries/gdb_versions/devel/src/gdb/gdbtypes.c:3751 (gdb+0x961e08)
...
and:
...
Previous read of size 1 at 0x7b8009b483f1 by thread T4:
#0 type::instance_flags() const /home/vries/gdb_versions/devel/src/gdb/gdbtypes.h:1092 (gdb+0x59e74b)
...
corresponding to:
...
unsigned align_log2 : TYPE_ALIGN_BITS;
unsigned m_instance_flags : 9;
...
Fix this by wrapping them using "struct { ... };".
For now, don't worry about size increase, we might have to address this later
using packed.
Still, is this a correct fix? Maybe the problem is modifying a type from
different thread. If so, having this patch for now may expose that problem.
Diffstat (limited to 'bfd')
0 files changed, 0 insertions, 0 deletions