Files
binutils-gdb/gdb/dwarf2
Tom de Vries c2ae16cc58 [gdb/symtab] Fix race condition in just_read_cus
Race condition between:
...
  Read of size 8 at 0x7b640001f2c8 by thread T1:
    #0 std::vector<dwarf2_per_cu_data*, std::allocator<dwarf2_per_cu_data*>
    >::push_back(dwarf2_per_cu_data* const&)
    /usr/include/c++/12/bits/stl_vector.h:1278 (gdb+0x888ad6)
    #1 process_full_comp_unit gdb/dwarf2/read.c:8451 (gdb+0x8397d0)
    #2 process_queue_item gdb/dwarf2/read.c:7592 (gdb+0x8359f5)
...
and:
...
  Previous write of size 8 at 0x7b640001f2c8 by main thread:
    #0 std::vector<dwarf2_per_cu_data*, std::allocator<dwarf2_per_cu_data*>
    >::push_back(dwarf2_per_cu_data* const&)
    /usr/include/c++/12/bits/stl_vector.h:1283 (gdb+0x888b52)
    #1 process_full_comp_unit gdb/dwarf2/read.c:8451 (gdb+0x8397d0)
    #2 process_queue_item gdb/dwarf2/read.c:7592 (gdb+0x8359f5)
...

Fix this by doing the just_read_cus push_back in a lock.
2022-07-21 15:06:40 +02:00
..
2022-07-12 17:12:17 +02:00
2022-04-27 22:05:03 -04:00
2022-04-21 12:18:25 -06:00