aboutsummaryrefslogtreecommitdiff
path: root/gdb/build-id.c
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2022-07-14 08:19:00 +0200
committerTom de Vries <tdevries@suse.de>2022-07-14 08:19:00 +0200
commit14dd1080c6127e7ad7566598860a885aa244ff8d (patch)
tree778335a294f58877774d8c79af14605cab7763d2 /gdb/build-id.c
parentb35bd7d552f80518ad90e81f592b73ee2ef736d7 (diff)
downloadgdb-14dd1080c6127e7ad7566598860a885aa244ff8d.zip
gdb-14dd1080c6127e7ad7566598860a885aa244ff8d.tar.gz
gdb-14dd1080c6127e7ad7566598860a885aa244ff8d.tar.bz2
[gdb/symtab] Make per_cu->m_lang atomic
When building gdb with -fsanitize=thread and running test-case gdb.dwarf2/inlined_subroutine-inheritance.exp, we run into a data race between: ... Read of size 1 at 0x7b2000003010 by thread T4: #0 packed<language, 1ul>::operator language() const packed.h:54 #1 dwarf2_per_cu_data::set_lang(language) read.h:363 ... and: ... Previous write of size 1 at 0x7b2000003010 by main thread: #0 dwarf2_per_cu_data::set_lang(language) read.h:365 ... Fix this by making per_cu->m_lang atomic. Tested on x86_64-linux. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29286
Diffstat (limited to 'gdb/build-id.c')
0 files changed, 0 insertions, 0 deletions