diff options
author | Tom de Vries <tdevries@suse.de> | 2022-07-15 16:56:56 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2022-07-21 15:06:40 +0200 |
commit | 19947698dedfb490ec4abde00fe8b659a1e6949f (patch) | |
tree | 67d13dac31c78f5462f692bad1dc5076df19dba8 /gdb/gdb-demangle.h | |
parent | 3164537f2563aaf79630f0ec690859e9f9333618 (diff) | |
download | binutils-19947698dedfb490ec4abde00fe8b659a1e6949f.zip binutils-19947698dedfb490ec4abde00fe8b659a1e6949f.tar.gz binutils-19947698dedfb490ec4abde00fe8b659a1e6949f.tar.bz2 |
[gdb/symtab] Fix data race in objstats->n_syms
Data race between:
...
Read of size 4 at 0x7b4000006dc8 by main thread:
#0 new_symbol gdb/dwarf2/read.c:20704 (gdb+0x866f3e)
#1 process_die gdb/dwarf2/read.c:8674 (gdb+0x839fa8)
#2 read_file_scope gdb/dwarf2/read.c:9610 (gdb+0x83ca7f)
#3 process_die gdb/dwarf2/read.c:8614 (gdb+0x839e41)
#4 process_full_comp_unit gdb/dwarf2/read.c:8383 (gdb+0x839480)
#5 process_queue_item gdb/dwarf2/read.c:7592 (gdb+0x83599f)
...
and:
...
Previous write of size 4 at 0x7b4000006dc8 by thread T2:
#0 new_symbol gdb/dwarf2/read.c:20704 (gdb+0x866f5d)
#1 process_die gdb/dwarf2/read.c:8674 (gdb+0x839fa8)
#2 read_file_scope gdb/dwarf2/read.c:9610 (gdb+0x83ca7f)
#3 process_die gdb/dwarf2/read.c:8614 (gdb+0x839e41)
#4 process_full_comp_unit gdb/dwarf2/read.c:8383 (gdb+0x839480)
#5 process_queue_item gdb/dwarf2/read.c:7592 (gdb+0x83599f)
...
Fix by making objstats->n_syms atomic. Likewise for n_types.
Diffstat (limited to 'gdb/gdb-demangle.h')
0 files changed, 0 insertions, 0 deletions