public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/30672] New: [gdb/symtab] data race in cooked_index_shard::do_finalize() / cooked_index_entry::write_scope
@ 2023-07-24  8:23 vries at gcc dot gnu.org
  2023-07-24  9:56 ` [Bug symtab/30672] " vries at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: vries at gcc dot gnu.org @ 2023-07-24  8:23 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30672

            Bug ID: 30672
           Summary: [gdb/symtab] data race in
                    cooked_index_shard::do_finalize() /
                    cooked_index_entry::write_scope
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: symtab
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

Created attachment 15002
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15002&action=edit
gdb.log

I build gdb with -O2 -fsanitize=thread and gcc 13.1.1, at commit 8a9da63e407
("gdb: two changes to linux_nat_debug_printf calls in linux-nat.c"), and ran
into:
...
(gdb) file
/data/vries/gdb/tw/build/gdb/testsuite/outputs/gdb.rust/dwindex/dwindex^M
Reading symbols from
/data/vries/gdb/tw/build/gdb/testsuite/outputs/gdb.rust/dwindex/dwindex...^M
warning: ==================^M
^[[1m^[[31mWARNING: ThreadSanitizer: data race (pid=16737)^M
^[[1m^[[0m^[[1m^[[34m  Write of size 8 at 0x7b80000b0018 by thread T2:^M
^[[1m^[[0m    #0 cooked_index_shard::do_finalize()
/data/vries/gdb/src/gdb/dwarf2/cooked-index.c:391 (gdb+0x714ad2) (BuildId:
f6fc8a5c2c3b42f3e3a24e54b8b2df127faee329)^M
  ...
^[[1m^[[34m  Previous read of size 8 at 0x7b80000b0018 by main thread:^M
^[[1m^[[0m    #0 cooked_index_entry::write_scope(obstack*, char const*, bool)
const /data/vries/gdb/src/gdb/dwarf2/cooked-index.c:224 (gdb+0x71290d)
(BuildId: f6fc8a5c2c3b42f3e3a24e54b8b2df127faee329)^M
...

391:
...
        entry->canonical = entry->name;
...

224:
...
  const char *local_name = for_main ? name : canonical;
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-07-25  7:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-24  8:23 [Bug symtab/30672] New: [gdb/symtab] data race in cooked_index_shard::do_finalize() / cooked_index_entry::write_scope vries at gcc dot gnu.org
2023-07-24  9:56 ` [Bug symtab/30672] " vries at gcc dot gnu.org
2023-07-24 13:12 ` vries at gcc dot gnu.org
2023-07-24 14:28 ` tromey at sourceware dot org
2023-07-24 15:58 ` vries at gcc dot gnu.org
2023-07-24 16:00 ` vries at gcc dot gnu.org
2023-07-24 23:18 ` vries at gcc dot gnu.org
2023-07-25  7:06 ` vries at gcc dot gnu.org
2023-07-25  7:16 ` vries at gcc dot gnu.org
2023-07-25  7:22 ` vries at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).