From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0CD8F386F01F; Thu, 7 Jan 2021 12:27:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0CD8F386F01F From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug remote/26614] AddressSanitizer: heap-use-after-free of extended_remote_target in remote_async_inferior_event_handler Date: Thu, 07 Jan 2021 12:27:02 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: remote 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: 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 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2021 12:27:03 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26614 --- Comment #22 from Tom de Vries --- (In reply to Tom de Vries from comment #14) > (In reply to Simon Marchi from comment #12) > > I did write this patch below to make it so inferior_event_handler is al= ways > > called through remote_async_inferior_event_handler, that automatically > > triggers the bug in the simplest cases (the inferior exits with "target > > remote"). It makes it so remote_async_serial_handler doesn't call > > remote_async_inferior_event_handler anymore, but just marks the remote > > target's async handler. > >=20 >=20 > Yep, works for me to trigger the problem. Using this patch, I trigger the > original failure with -m32: > ... > Running src/gdb/testsuite/gdb.multi/multi-target-continue.exp ... > ERROR: GDB process no longer exists > ... > and this one with -m64: > ... > Running src/gdb/testsuite/gdb.multi/multi-target-no-resumed.exp ... > ERROR: GDB process no longer exists > ... > when running gdb.multi/*.exp. >=20 > > What I like from this patch is that there's now a single path from the > > remote target to inferior_event_handler, so less variations to consider, > > more determinism. >=20 > Agreed, that's a good thing :) Using the trigger patch on trunk no longer works. I've bisected this to commit 79952e69634 "Make scoped_restore_current_threa= d's cdtors exception free (RFC)". --=20 You are receiving this mail because: You are on the CC list for the bug.=