Created attachment 15457 [details] gdb.log I did a run with fedora asahi 39 and -fsanitize=thread, and ran into a issues I haven't seen before in test-case gdb.rust/dwindex.exp: ... SUMMARY: ThreadSanitizer: data race bfd.h:2449 in bfd_get_section_limit_octets SUMMARY: ThreadSanitizer: data race /home/vries/gdb/src/bfd/bfdio.c:514 in bfd_seek ... Rust compiler version: ... $ rustc --version rustc 1.77.0 (aedd173a2 2024-03-17) (Fedora 1.77.0-1.fc39) ...
Both load_auto_scripts_for_objfile and gdb_bfd_map_section call bfd_get_full_section_contents, which might seek/read. The BFD threading approach is that really only one thread can use a BFD at a time, so in this case we probably need the locking in gdb.