binutils-gdb/gdb/dwarf2
Tom Tromey ed29a346be Avoid race when writing to index cache
The background DWARF reader changes introduced a race when writing to
the index cache.  The problem here is that constructing the
index_cache_store_context object should only happen on the main
thread, to ensure that the various value captures do not race.

This patch adds an assert to the construct to that effect, and then
arranges for this object to be constructed by the cooked_index_worker
constructor -- which is only invoked on the main thread.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31262
2024-03-08 17:25:50 -07:00
..
abbrev-cache.c
abbrev-cache.h
abbrev.c
abbrev.h
ada-imported.c
aranges.c
aranges.h
attribute.c
attribute.h
call-site.h
comp-unit-head.c
comp-unit-head.h
cooked-index.c Avoid race when writing to index cache 2024-03-08 17:25:50 -07:00
cooked-index.h Avoid race when writing to index cache 2024-03-08 17:25:50 -07:00
cu.c
cu.h
die.c
die.h
dwz.c Avoid race when reading dwz file 2024-03-08 07:15:08 -07:00
dwz.h
expr.c
expr.h
file-and-dir.h
frame-tailcall.c
frame-tailcall.h
frame.c
frame.h
index-cache.c Avoid race when writing to index cache 2024-03-08 17:25:50 -07:00
index-cache.h Move the 'store' method to index_cache_store_context 2024-03-08 17:25:50 -07:00
index-common.c
index-common.h
index-write.c
index-write.h
leb.c
leb.h
line-header.c
line-header.h
loc.c
loc.h
macro.c
macro.h
mapped-index.h
public.h
read-debug-names.c
read-debug-names.h
read-gdb-index.c
read-gdb-index.h
read.c Avoid race when reading dwz file 2024-03-08 07:15:08 -07:00
read.h
sect-names.h
section.c
section.h
stringify.c
stringify.h
tag.h
types.h