diff options
author | Tom Tromey <tom@tromey.com> | 2023-10-17 14:32:26 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-10-19 16:51:29 -0600 |
commit | 379435351c807e5399ec3e9227d3019597ca2143 (patch) | |
tree | e4d34dbff6f69ed61deeeddd91f0d66f02f01b69 /libctf/testsuite/libctf-writable/error-propagation.c | |
parent | 1b1b9bc05f8f6cde3956fb4d08f734de438f02a7 (diff) | |
download | binutils-379435351c807e5399ec3e9227d3019597ca2143.zip binutils-379435351c807e5399ec3e9227d3019597ca2143.tar.gz binutils-379435351c807e5399ec3e9227d3019597ca2143.tar.bz2 |
Fix race in DWARF reader
The recent change to record the DWARF language in the per-CU data
yielded a race warning in my testing:
ThreadSanitizer: data race ../../binutils-gdb/gdb/dwarf2/read.c:21779 in prepare_one_comp_unit
This patch fixes the bug by applying the same style of fix that was
done for the ordinary (gdb) language.
I wonder if this code could be improved. Requiring an atomic for the
language in particular seems unfortunate, as it is often consulted
during index finalization. However, I haven't investigated this.
Regression tested on x86-64 Fedora 38.
Reviewed-by: Tom de Vries <tdevries@suse.de>
Diffstat (limited to 'libctf/testsuite/libctf-writable/error-propagation.c')
0 files changed, 0 insertions, 0 deletions