From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6BBEC3858D33; Thu, 18 Jan 2024 04:57:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6BBEC3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1705553826; bh=psMFinCZblaWMMyn0lxpOWPPNAu1ltZZ/BaLT97YHPs=; h=From:To:Subject:Date:From; b=o3nd9VGDX4eciUNuSwlCofWUti+gi2sEPyCDPMmhMCmDmaGkGNhjDqIHFyL4TVTSn Hnx38Phuai5I0gnl3mu36MbYqMlMnpViGtrxY06Q9h8oKi7kfnD9u2SMKqcozxXWIF 429hz0mzbb+geiF5W87uehLqppoT3IzDxJyrsbIc= From: "sam at gentoo dot org" To: gdb-prs@sourceware.org Subject: [Bug gdb/31256] New: [14 regression] Crash with basic 'list .' Date: Thu, 18 Jan 2024 04:57:05 +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: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sam at gentoo dot 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 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=3D31256 Bug ID: 31256 Summary: [14 regression] Crash with basic 'list .' Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: sam at gentoo dot org Target Milestone: --- Originally reported downstream in Gentoo at https://bugs.gentoo.org/922336. Quoting the reproduction instructions which also trigger it for me: """ Test program: ``` int main() {} ``` Steps to reproduce: 1. emerge -1 =3Ddev-debug/gdb-14.1 2. Compile test program (gcc/clang main.c) 3. gdb ./a.out 4. Set a breakpoint on main, `b main` 5. `run` 6. `list .` and the segfault should occur Tested with: GCC 14, GCC 13, Clang 17 and all three resulted in a segmentat= ion fault. The test program was compiled with GCC and Clang as well. """ ``` $ gdb ./main Reading symbols from ./main... (No debugging symbols found in ./main) (gdb) b main Breakpoint 1 at 0x1161 (gdb) r Starting program: /tmp/main [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib64/libthread_db.so.1". Breakpoint 1, 0x0000555555555161 in main () (gdb) list . Fatal signal: Segmentation fault ----- Backtrace ----- 0x56033a65d5aa gdb_internal_backtrace_1 /usr/src/debug/dev-debug/gdb-14.1/gdb-14.1/gdb/bt-utils.c:122 0x56033a65d5aa _Z22gdb_internal_backtracev /usr/src/debug/dev-debug/gdb-14.1/gdb-14.1/gdb/bt-utils.c:168 0x56033a65d5aa _Z22gdb_internal_backtracev /usr/src/debug/dev-debug/gdb-14.1/gdb-14.1/gdb/bt-utils.c:154 0x56033a7d2704 handle_fatal_signal /usr/src/debug/dev-debug/gdb-14.1/gdb-14.1/gdb/event-top.c:889 0x56033a7d2902 handle_sigsegv /usr/src/debug/dev-debug/gdb-14.1/gdb-14.1/gdb/event-top.c:962 0x7f9c1ed8780f ??? 0x56033abeadd4 _Z18symtab_to_fullnameP6symtab /usr/src/debug/dev-debug/gdb-14.1/gdb-14.1/gdb/source.c:1239 0x56033b3022bd _ZN12source_cache6ensureEP6symtab.constprop.0 /usr/src/debug/dev-debug/gdb-14.1/gdb-14.1/gdb/source-cache.c:199 0x56033abebf59 _ZN12source_cache16get_source_linesEP6symtabiiPNSt7__cxx1112basic_stringIcS= t11char_traitsIcESaIcEEE /usr/src/debug/dev-debug/gdb-14.1/gdb-14.1/gdb/source-cache.c:364 0x56033abebf59 print_source_lines_base /usr/src/debug/dev-debug/gdb-14.1/gdb-14.1/gdb/source.c:1381 0x56033a6a401c _Z18print_source_linesP6symtab18source_lines_range10enum_flagsI23print_sour= ce_lines_flagE /usr/src/debug/dev-debug/gdb-14.1/gdb-14.1/gdb/source.c:1477 0x56033a6a401c list_around_line cli/cli-cmds.c:1222 0x56033a6a401c list_command cli/cli-cmds.c:1294 0x56033a6a34b4 _Z8cmd_funcP16cmd_list_elementPKci cli/cli-decode.c:2735 0x56033acea8c1 _Z15execute_commandPKci /usr/src/debug/dev-debug/gdb-14.1/gdb-14.1/gdb/top.c:575 0x56033a7e243e _Z15command_handlerPKc /usr/src/debug/dev-debug/gdb-14.1/gdb-14.1/gdb/event-top.c:552 0x56033ad0429e _Z20command_line_handlerOSt10unique_ptrIcN3gdb13xfree_deleterIcEEE /usr/src/debug/dev-debug/gdb-14.1/gdb-14.1/gdb/event-top.c:788 0x56033ad0429e tui_command_line_handler tui/tui-interp.c:104 0x56033a7d240a gdb_rl_callback_handler /usr/src/debug/dev-debug/gdb-14.1/gdb-14.1/gdb/event-top.c:259 0x7f9c1fc5be3c rl_callback_read_char /usr/src/debug/sys-libs/readline-8.2_p10/readline-8.2/callback.c:302 0x56033a7dbadb gdb_rl_callback_read_char_wrapper_noexcept /usr/src/debug/dev-debug/gdb-14.1/gdb-14.1/gdb/event-top.c:195 0x56033a7dbc1b gdb_rl_callback_read_char_wrapper /usr/src/debug/dev-debug/gdb-14.1/gdb-14.1/gdb/event-top.c:234 0x56033ad3301f stdin_event_handler /usr/src/debug/dev-debug/gdb-14.1/gdb-14.1/gdb/ui.c:155 0x56033b26af05 gdb_wait_for_event ../gdbsupport/event-loop.cc:716 0x56033b2fbe88 _Z16gdb_do_one_eventi.constprop.0 ../gdbsupport/event-loop.cc:264 0x56033a96eb84 start_event_loop /usr/src/debug/dev-debug/gdb-14.1/gdb-14.1/gdb/main.c:407 0x56033a96eb84 captured_command_loop /usr/src/debug/dev-debug/gdb-14.1/gdb-14.1/gdb/main.c:471 0x56033a503214 captured_main /usr/src/debug/dev-debug/gdb-14.1/gdb-14.1/gdb/main.c:1324 0x56033a503214 _Z8gdb_mainP18captured_main_args /usr/src/debug/dev-debug/gdb-14.1/gdb-14.1/gdb/main.c:1343 0x56033a503214 main /usr/src/debug/dev-debug/gdb-14.1/gdb-14.1/gdb/gdb.c:39 --------------------- 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: . ^C Segmentation fault (core dumped) ``` --=20 You are receiving this mail because: You are on the CC list for the bug.=