public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug symtab/30672] New: [gdb/symtab] data race in cooked_index_shard::do_finalize() / cooked_index_entry::write_scope
Date: Mon, 24 Jul 2023 08:23:21 +0000	[thread overview]
Message-ID: <bug-30672-4717@http.sourceware.org/bugzilla/> (raw)

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.

             reply	other threads:[~2023-07-24  8:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-24  8:23 vries at gcc dot gnu.org [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-30672-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).