From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6A4963858C66; Tue, 25 Jul 2023 10:33:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6A4963858C66 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1690281203; bh=yIBzMVOmrzqFC9obRGwhg1iDlsi40QZmWwsJ1v2If5I=; h=From:To:Subject:Date:From; b=ZSoFCvA1oADIkHHrBmd4HuHG82r9J5rLtKJILIBWObWcQv5w9kDyzn/gYDQB3X/Tl RlvSLPelluEJmFoW0R87DTuila8zYGc5pVv98ox4zeXAPjdnQwXlS2rzudL96Dn6dV 2lqSos6zv91z/XV11V1jl6gP5n4Rmo1HpA55Aqlk= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug dap/30680] New: [gdb/dap] ThreadSanitizer: data race gdbsupport/event-pipe.h:44 in event_pipe::is_open() const Date: Tue, 25 Jul 2023 10:33:22 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: dap X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30680 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=3D15010&action=3Ded= it gdb.log When doing a gdb build with gcc 13.1.1 and with -O2 -fno-hoist-adjacent-loa= ds to work around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110799, I run= into: ... WARNING: ThreadSanitizer: data race (pid=3D22165) 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) (Build= Id: 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] !=3D -1; }=20 ... event-pipe.cc:62: ... void event_pipe::close_pipe () { ::close (m_fds[0]); ::close (m_fds[1]); 62 m_fds[0] =3D -1; m_fds[1] =3D -1; } ... --=20 You are receiving this mail because: You are on the CC list for the bug.=