From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9F8A63858009; Sun, 29 Nov 2020 10:20:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9F8A63858009 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: Sun, 29 Nov 2020 10:20:33 +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: Sun, 29 Nov 2020 10:20:33 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26614 --- Comment #10 from Tom de Vries --- I did another series with the same circumstances, but with gdb setup to generate a backtrace after running: ... diff --git a/gdb/testsuite/gdb.multi/multi-target.exp.tcl b/gdb/testsuite/gdb.multi /multi-target.exp.tcl index 8dcd413f58..e2c78214c4 100644 --- a/gdb/testsuite/gdb.multi/multi-target.exp.tcl +++ b/gdb/testsuite/gdb.multi/multi-target.exp.tcl @@ -106,11 +106,13 @@ proc cleanup_gdbservers { } { proc setup {non-stop} { global gcorefile gcore_created - global binfile + global binfile GDB cleanup_gdbservers - clean_restart ${binfile} - + save_vars GDB { + set GDB "/usr/bin/gdb -iex \"set trace-commands on\" -batch -ex run= -ex backtrace -ex quit --args $GDB" + clean_restart ${binfile} + } # multi-target depends on target running in non-stop mode. Force # it on for remote targets, until this is the default. gdb_test_no_output "maint set target-non-stop on" ... At run 28, I ran into: ... (gdb) PASS: gdb.multi/multi-target-continue.exp: continue: non-stop=3Don: inferior 2 Remote debugging from host ::1, port 42094^M Process /home/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.multi/multi-= target-continue/multi-target-continue created; pid =3D 25075^M monitor exit^M (gdb) Killing process(es): 25075^M ^M Thread 1 "gdb" received signal SIGSEGV, Segmentation fault.^M 0x00000000004aa8fd in mark_async_event_handler (async_handler_ptr=3D0x0) at /home/vries/gdb_versions/devel/src/gdb/async-event.c:269^M 269 async_handler_ptr->ready =3D 1;^M +backtrace^M #0 0x00000000004aa8fd in mark_async_event_handler (async_handler_ptr=3D0x0= ) at /home/vries/gdb_versions/devel/src/gdb/async-event.c:269^M #1 0x00000000008da4c9 in remote_async_inferior_event_handler (data=3D0x1f5= 9990) at /home/vries/gdb_versions/devel/src/gdb/remote.c:14179^M #2 0x00000000004aa95e in check_async_event_handlers () at /home/vries/gdb_versions/devel/src/gdb/async-event.c:295^M #3 0x0000000000d0ead1 in gdb_do_one_event () at /home/vries/gdb_versions/devel/src/gdbsupport/event-loop.cc:194^M #4 0x0000000000795ec7 in start_event_loop () at /home/vries/gdb_versions/devel/src/gdb/main.c:356^M #5 0x0000000000795fe7 in captured_command_loop () at /home/vries/gdb_versions/devel/src/gdb/main.c:416^M #6 0x0000000000797662 in captured_main (data=3D0x7fffffffd310) at /home/vries/gdb_versions/devel/src/gdb/main.c:1253^M ... --=20 You are receiving this mail because: You are on the CC list for the bug.=