diff options
author | Tom de Vries <tdevries@suse.de> | 2022-07-14 08:19:00 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2022-07-14 08:19:00 +0200 |
commit | b35bd7d552f80518ad90e81f592b73ee2ef736d7 (patch) | |
tree | 5e6e89287d05742cc65f54c10e4aa90d45c4522b /elfcpp/tilegx.h | |
parent | 4f92e10cda142fd1f213e01a53ca687e38cddf22 (diff) | |
download | gdb-b35bd7d552f80518ad90e81f592b73ee2ef736d7.zip gdb-b35bd7d552f80518ad90e81f592b73ee2ef736d7.tar.gz gdb-b35bd7d552f80518ad90e81f592b73ee2ef736d7.tar.bz2 |
[gdb/symtab] Make per_cu->unit_type atomic
With gdb with -fsanitize=thread and test-case gdb.ada/array_bounds.exp, I run
into a data race between:
...
Read of size 1 at 0x7b2000025f0f by main thread:
#0 packed<dwarf_unit_type, 1ul>::operator dwarf_unit_type() const packed.h:54
#1 dwarf2_per_cu_data::set_unit_type(dwarf_unit_type) read.h:339
...
and:
...
Previous write of size 1 at 0x7b2000025f0f by thread T3:
#0 dwarf2_per_cu_data::set_unit_type(dwarf_unit_type) read.h:341
...
Fix this by making per_cu->unit_type atomic.
Tested on x86_64-linux.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29286
Diffstat (limited to 'elfcpp/tilegx.h')
0 files changed, 0 insertions, 0 deletions