public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug dap/30680] New: [gdb/dap] ThreadSanitizer: data race gdbsupport/event-pipe.h:44 in event_pipe::is_open() const
@ 2023-07-25 10:33 vries at gcc dot gnu.org
  2023-07-25 10:46 ` [Bug dap/30680] " vries at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: vries at gcc dot gnu.org @ 2023-07-25 10:33 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 30680
           Summary: [gdb/dap] ThreadSanitizer: data race
                    gdbsupport/event-pipe.h:44 in event_pipe::is_open()
                    const
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: dap
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

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

When doing a gdb build with gcc 13.1.1 and with -O2 -fno-hoist-adjacent-loads
to work around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110799, I run into:
...
WARNING: ThreadSanitizer: data race (pid=22165)
Read of size 4 at 0x00000261ca40 by thread T13:
#0 event_pipe::is_open() const
/data/vries/gdb/src/gdb/../gdbsupport/event-pipe.h:44 (gdb+0x92f381) (BuildId:
c3b5cbc2b30d2ab9521ca0586222e0001ad66898)
  ...
Previous write of size 4 at 0x00000261ca40 by main thread:
#0 event_pipe::close_pipe() /data/vries/gdb/src/gdbsupport/event-pipe.cc:62
(gdb+0x1610e2d) (BuildId: c3b5cbc2b30d2ab9521ca0586222e0001ad66898)
...

event-pipe.h:44
...
    bool is_open () const
44  { return m_fds[0] != -1; } 
...

event-pipe.cc:62:
...
    void
    event_pipe::close_pipe ()
    {
      ::close (m_fds[0]);
      ::close (m_fds[1]);
62    m_fds[0] = -1;
      m_fds[1] = -1;
    }
...

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

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

end of thread, other threads:[~2023-07-31 12:38 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-25 10:33 [Bug dap/30680] New: [gdb/dap] ThreadSanitizer: data race gdbsupport/event-pipe.h:44 in event_pipe::is_open() const vries at gcc dot gnu.org
2023-07-25 10:46 ` [Bug dap/30680] " vries at gcc dot gnu.org
2023-07-25 11:10 ` vries at gcc dot gnu.org
2023-07-25 11:51 ` vries at gcc dot gnu.org
2023-07-25 12:36 ` tromey at sourceware dot org
2023-07-26 12:12 ` vries at gcc dot gnu.org
2023-07-26 16:23 ` vries at gcc dot gnu.org
2023-07-26 16:57 ` vries at gcc dot gnu.org
2023-07-26 16:59 ` vries at gcc dot gnu.org
2023-07-28 11:01 ` vries at gcc dot gnu.org
2023-07-28 16:04 ` tromey at sourceware dot org
2023-07-28 16:20 ` vries at gcc dot gnu.org
2023-07-28 17:58 ` tromey at sourceware dot org
2023-07-28 18:10 ` tromey at sourceware dot org
2023-07-31 12:37 ` cvs-commit at gcc dot gnu.org
2023-07-31 12:38 ` tromey at sourceware dot 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).