From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 40BC1385E44C; Sat, 9 Mar 2024 00:27:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 40BC1385E44C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1709944062; bh=TLwo53DkfQIIfqjO99/yYApGovusStjUYHSqjAq2tGQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hUjlDS3PJm3dEKlGw9443fsskuU9FwrtDctRtcF7b8e2f0cHGbbGDBXuBYrJDwTlT WLBunI2hGvzwaHe5QEwU7b4hVss1mmBal15ooyC/dCyuKY6JTph+LiyetSbUIQb1dc vDj0ib7aT/2l3hhPy2wD1/TpHkiLvI+UDJTpyXQk= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/31262] [gdb] ThreadSanitizer: data raceindex-cache.c:76 in index_cache::enable() Date: Sat, 09 Mar 2024 00:27:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: tromey at sourceware dot org X-Bugzilla-Target-Milestone: 15.1 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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=3D31262 --- Comment #5 from Sourceware Commits --- The master branch has been updated by Tom Tromey : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Ded29a346be43= 9466ff2a5ce33e715e02c49fbdac commit ed29a346be439466ff2a5ce33e715e02c49fbdac Author: Tom Tromey Date: Sun Jan 28 09:14:04 2024 -0700 Avoid race when writing to index cache The background DWARF reader changes introduced a race when writing to the index cache. The problem here is that constructing the index_cache_store_context object should only happen on the main thread, to ensure that the various value captures do not race. This patch adds an assert to the construct to that effect, and then arranges for this object to be constructed by the cooked_index_worker constructor -- which is only invoked on the main thread. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31262 --=20 You are receiving this mail because: You are on the CC list for the bug.=