From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 217A23857367; Wed, 22 Jun 2022 18:58:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 217A23857367 From: "pedro at palves dot net" To: gdb-prs@sourceware.org Subject: [Bug gdb/29275] New: core-file -> detach -> crash Date: Wed, 22 Jun 2022 18:58:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pedro at palves dot net 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 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 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: Wed, 22 Jun 2022 18:58:54 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29275 Bug ID: 29275 Summary: core-file -> detach -> crash Product: gdb Version: unknown Status: NEW Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: pedro at palves dot net Target Milestone: --- Loading a core file under gdb, and then using "detach" to unload it, result= s in GDB crashing. It crashes in the same way on current master and in the gdb = 11 & 12 branches. $ gdb -c ./core GNU gdb (GDB) 13.0.50.20220622-git ... Core was generated by `(... snip ...)'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007fcce92ba2ab in ?? () [Current thread is 1 (LWP 3566803)] (gdb) detach No core file now. Fatal signal: Segmentation fault ----- Backtrace ----- 0x55e3dc868a6d gdb_internal_backtrace_1 ../../src/gdb/bt-utils.c:122 0x55e3dc868b26 _Z22gdb_internal_backtracev ../../src/gdb/bt-utils.c:168 0x55e3dca7965a handle_fatal_signal ../../src/gdb/event-top.c:946 0x55e3dca79800 handle_sigsegv ../../src/gdb/event-top.c:1019 0x7f44863be41f ??? =20=20=20=20=20=20=20 /build/glibc-SzIz7B/glibc-2.31/nptl/../sysdeps/unix/sysv/linux/x86_64/sigac= tion.c:0 0x55e3dcb432bf maybe_set_commit_resumed_all_targets ../../src/gdb/infrun.c:2899 0x55e3dcb438be _ZN29scoped_disable_commit_resumed5resetEv ../../src/gdb/infrun.c:3023 0x55e3dcb43a0b _ZN29scoped_disable_commit_resumed16reset_and_commitEv ../../src/gdb/infrun.c:3049 0x55e3dcb329cc _Z14detach_commandPKci ../../src/gdb/infcmd.c:2791 0x55e3dc8caa45 do_simple_func ../../src/gdb/cli/cli-decode.c:95 0x55e3dc8d02af _Z8cmd_funcP16cmd_list_elementPKci ../../src/gdb/cli/cli-decode.c:2514 0x55e3dce32b1e _Z15execute_commandPKci ../../src/gdb/top.c:699 0x55e3dca78dc1 _Z15command_handlerPKc ../../src/gdb/event-top.c:598 0x55e3dca792ee _Z20command_line_handlerOSt10unique_ptrIcN3gdb13xfree_deleterIcEEE ../../src/gdb/event-top.c:842 0x55e3dce6362d tui_command_line_handler ../../src/gdb/tui/tui-interp.c:278 0x55e3dca7848a gdb_rl_callback_handler ../../src/gdb/event-top.c:230 0x55e3dcf5a37b rl_callback_read_char ../../../src/readline/readline/callback.c:290 0x55e3dca782a6 gdb_rl_callback_read_char_wrapper_noexcept ../../src/gdb/event-top.c:188 0x55e3dca78354 gdb_rl_callback_read_char_wrapper ../../src/gdb/event-top.c:205 0x55e3dca78bc1 _Z19stdin_event_handleriPv ../../src/gdb/event-top.c:525 0x55e3dd09616b handle_file_event ../../src/gdbsupport/event-loop.cc:549 0x55e3dd09671d gdb_wait_for_event ../../src/gdbsupport/event-loop.cc:670 0x55e3dd095461 _Z16gdb_do_one_eventv ../../src/gdbsupport/event-loop.cc:210 0x55e3dcbc9b8b start_event_loop ../../src/gdb/main.c:413 0x55e3dcbc9cd6 captured_command_loop ../../src/gdb/main.c:473 0x55e3dcbcb759 captured_main ../../src/gdb/main.c:1335 0x55e3dcbcb7cb _Z8gdb_mainP18captured_main_args ../../src/gdb/main.c:1350 0x55e3dc74b6a5 main ../../src/gdb/gdb.c:32 --------------------- A fatal error internal to GDB has been detected, further debugging is not possible. GDB will now terminate. This is a bug, please report it. For instructions, see: . Segmentation fault (core dumped) --=20 You are receiving this mail because: You are on the CC list for the bug.=