From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A757A3857735; Sat, 15 Apr 2023 03:28:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A757A3857735 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1681529285; bh=wRco13RYFL+nWlknedGU35ZSgaBT04iDKuWQM+TGQG0=; h=From:To:Subject:Date:From; b=SQwGrWYcUsMu+NpneMsn6QzTJfhaAFT8GeYrHtozjQGP8kcDBxdSdnuUAHy2VpVJu FI2H9B4/WWa5fsRRjFGbhvR39tlPBe80HJRrLQIJi6hmCPKkdQPbWsdKzAVfS14iwP N6hkm5KRg87Av8MACa+nFzesi51d/f/gaKavlLuY= From: "yangyibiao at nju dot edu.cn" To: gdb-prs@sourceware.org Subject: [Bug gdb/30357] New: Segmentation fault for the 'start' command Date: Sat, 15 Apr 2023 03:28:04 +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: 13.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: yangyibiao at nju dot edu.cn X-Bugzilla-Status: UNCONFIRMED 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 attachments.created 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=3D30357 Bug ID: 30357 Summary: Segmentation fault for the 'start' command Product: gdb Version: 13.1 Status: UNCONFIRMED Severity: critical Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: yangyibiao at nju dot edu.cn Target Milestone: --- Created attachment 14828 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D14828&action=3Ded= it triggering source code $ gcc --version gcc (GCC) 13.0.0 20221107 (experimental) Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ gdb --version GNU gdb (GDB) 13.0.50.20221107-git Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. $ cat small.c extern void abort (void); int __RTL (startwith ("vregs")) test_return_42 (void) { /* C code: return 42; */ (function "test_return_42" (insn-chain (cnote 1 NOTE_INSN_DELETED) (block 2 (edge-from entry (flags "FALLTHRU")) (cnote 3 [bb 2] NOTE_INSN_BASIC_BLOCK) (cnote 2 NOTE_INSN_FUNCTION_BEG) (cinsn 5 (set (reg:SI <0> [ _1 ]) (const_int 42)) "../../src/test-return-const.c":3) (cinsn 8 (set (reg:SI <1> [ ]) (reg:SI <0> [ _1 ])) "../../src/test-return-const.c":3) (cinsn 12 (set (reg/i:SI ax) (reg:SI <1> [ ])) "../../src/test-return-const.c":4) (cinsn 13 (use (reg/i:SI ax)) "../../src/test-return-const.c":4) (edge-to exit (flags "FALLTHRU")) ) ;; block 2 ) ;; insn-chain (crtl (return_rtx=20 (reg/i:SI ax) ) ;; return_rtx ) ;; crtl ) ;; function "test_return_42" } int __RTL (startwith ("vregs")) test_return_43 (void) { /* C code: return 43; */ (function "test_return_43" (insn-chain (cnote 1 NOTE_INSN_DELETED) (block 2 (edge-from entry (flags "FALLTHRU")) (cnote 3 [bb 2] NOTE_INSN_BASIC_BLOCK) (cnote 2 NOTE_INSN_FUNCTION_BEG) (cinsn 5 (set (reg:SI <0> [ _1 ]) (const_int 43)) "../../src/test-return-const.c":3) (cinsn 8 (set (reg:SI <1> [ ]) (reg:SI <0> [ _1 ])) "../../src/test-return-const.c":3) (cinsn 12 (set (reg/i:SI ax) (reg:SI <1> [ ])) "../../src/test-return-const.c":4) (cinsn 13 (use (reg/i:SI ax)) "../../src/test-return-const.c":4) (edge-to exit (flags "FALLTHRU")) ) ;; block 2 ) ;; insn-chain (crtl (return_rtx=20 (reg/i:SI ax) ) ;; return_rtx ) ;; crtl ) ;; function "test_return_43" } int __RTL (startwith ("vregs")) test_return_44 (void) { /* C code: return 44; */ (function "test_return_44" (insn-chain (cnote 1 NOTE_INSN_DELETED) (block 2 (edge-from entry (flags "FALLTHRU")) (cnote 3 [bb 2] NOTE_INSN_BASIC_BLOCK) (cnote 2 NOTE_INSN_FUNCTION_BEG) (cinsn 5 (set (reg:SI <0> [ _1 ]) (const_int 44)) "../../src/test-return-const.c":3) (cinsn 8 (set (reg:SI <1> [ ]) (reg:SI <0> [ _1 ])) "../../src/test-return-const.c":3) (cinsn 12 (set (reg/i:SI ax) (reg:SI <1> [ ])) "../../src/test-return-const.c":4) (cinsn 13 (use (reg/i:SI ax)) "../../src/test-return-const.c":4) (edge-to exit (flags "FALLTHRU")) ) ;; block 2 ) ;; insn-chain (crtl (return_rtx=20 (reg/i:SI ax) ) ;; return_rtx ) ;; crtl ) ;; function "test_return_44" } int main (void) { if (test_return_42 () !=3D 42) abort (); if (test_return_43 () !=3D 43) abort (); if (test_return_44 () !=3D 44) abort (); return 0; } $ gcc -O0 -g small.c $ gdb -q a.out Reading symbols from a.out... (gdb) start Fatal signal: Segmentation fault ----- Backtrace ----- 0x4d5512 gdb_internal_backtrace_1 ../../binutils-gdb/gdb/bt-utils.c:122 0x4d5512 _Z22gdb_internal_backtracev ../../binutils-gdb/gdb/bt-utils.c:168 0x5de831 handle_fatal_signal ../../binutils-gdb/gdb/event-top.c:964 0x5de974 handle_sigsegv ../../binutils-gdb/gdb/event-top.c:1037 0x7f28da99097f ??? =20=20=20=20=20=20=20 /build/glibc-CVJwZb/glibc-2.27/nptl/../sysdeps/unix/sysv/linux/x86_64/sigac= tion.c:0 0x5954ef dwarf2_start_subfile ../../binutils-gdb/gdb/dwarf2/read.c:20654 0x5c01c8 dwarf_decode_lines ../../binutils-gdb/gdb/dwarf2/read.c:20605 0x5c01c8 handle_DW_AT_stmt_list ../../binutils-gdb/gdb/dwarf2/read.c:9621 0x5c01c8 read_file_scope ../../binutils-gdb/gdb/dwarf2/read.c:9661 0x5bcbb6 process_die ../../binutils-gdb/gdb/dwarf2/read.c:8660 0x5c3dd7 process_full_comp_unit ../../binutils-gdb/gdb/dwarf2/read.c:8429 0x5c3dd7 process_queue ../../binutils-gdb/gdb/dwarf2/read.c:7675 0x5c3dd7 dw2_do_instantiate_symtab ../../binutils-gdb/gdb/dwarf2/read.c:2063 0x5c3dd7 dw2_instantiate_symtab ../../binutils-gdb/gdb/dwarf2/read.c:2085 0x5c4abb dw2_expand_symtabs_matching_one ../../binutils-gdb/gdb/dwarf2/read.c:3984 0x5c54df _ZN22cooked_index_functions23expand_symtabs_matchingEP7objfileN3gdb13functi= on_viewIFbPKcbEEEPK16lookup_name_infoNS3_IFbS5_EEENS3_IFbP15compunit_symtab= EEE10enum_flagsI24block_search_flag_valuesE11domain_enum13search_domain ../../binutils-gdb/gdb/dwarf2/read.c:18781 0x7c001d _ZN7objfile13lookup_symbolE10block_enumPKc11domain_enum ../../binutils-gdb/gdb/symfile-debug.c:276 0x7d8588 lookup_symbol_via_quick_fns ../../binutils-gdb/gdb/symtab.c:2451 0x7d8588 lookup_symbol_in_objfile ../../binutils-gdb/gdb/symtab.c:2599 0x7d878d operator() ../../binutils-gdb/gdb/symtab.c:2648 0x7d878d operator() ../../binutils-gdb/gdb/../gdbsupport/function-view.h:305 0x7d878d _FUN ../../binutils-gdb/gdb/../gdbsupport/function-view.h:299 0x793d81 _ZNK3gdb13function_viewIFbP7objfileEEclES2_ ../../binutils-gdb/gdb/../gdbsupport/function-view.h:289 0x793d81 svr4_iterate_over_objfiles_in_search_order ../../binutils-gdb/gdb/solib-svr4.c:3425 0x7d2234 lookup_global_or_static_symbol ../../binutils-gdb/gdb/symtab.c:2645 0x7d801c _Z20lookup_global_symbolPKcPK5block11domain_enum ../../binutils-gdb/gdb/symtab.c:2700 0x7d7c94 lookup_symbol_aux ../../binutils-gdb/gdb/symtab.c:2170 0x7d7df2 _Z25lookup_symbol_in_languagePKcPK5block11domain_enum8languageP20field_of_t= his_result ../../binutils-gdb/gdb/symtab.c:1962 0x545346 inspect_type ../../binutils-gdb/gdb/cp-support.c:152 0x545214 _Z27cp_canonicalize_string_fullPKcPFS0_P4typePvES3_ ../../binutils-gdb/gdb/cp-support.c:594 0x545dec _Z34cp_canonicalize_string_no_typedefsPKc ../../binutils-gdb/gdb/cp-support.c:618 0x6770db find_linespec_symbols ../../binutils-gdb/gdb/linespec.c:3811 0x67a4d7 linespec_parse_basic ../../binutils-gdb/gdb/linespec.c:1815 0x67a4d7 parse_linespec ../../binutils-gdb/gdb/linespec.c:2597 0x67af20 location_spec_to_sals ../../binutils-gdb/gdb/linespec.c:3073 0x67b2aa _Z16decode_line_fullP13location_speciP13program_spaceP6symtabiP15linespec_r= esultPKcS8_ ../../binutils-gdb/gdb/linespec.c:3149 0x4c71b9 parse_breakpoint_sals ../../binutils-gdb/gdb/breakpoint.c:8564 0x4ccdac _Z17create_breakpointP7gdbarchP13location_specPKciS4_bii6bptypei12auto_bool= eanPK14breakpoint_opsiiij ../../binutils-gdb/gdb/breakpoint.c:8843 0x4cd2cc break_command_1 ../../binutils-gdb/gdb/breakpoint.c:9027 0x645e47 run_command_1 ../../binutils-gdb/gdb/infcmd.c:427 0x505cac _Z8cmd_funcP16cmd_list_elementPKci ../../binutils-gdb/gdb/cli/cli-decode.c:2543 0x815fda _Z15execute_commandPKci ../../binutils-gdb/gdb/top.c:692 0x5df52c _Z15command_handlerPKc ../../binutils-gdb/gdb/event-top.c:616 0x5df897 _Z20command_line_handlerOSt10unique_ptrIcN3gdb13xfree_deleterIcEEE ../../binutils-gdb/gdb/event-top.c:860 0x5dfd7c gdb_rl_callback_handler ../../binutils-gdb/gdb/event-top.c:246 0x89dbb4 rl_callback_read_char ../../../binutils-gdb/readline/readline/callback.c:290 0x5dfe9d gdb_rl_callback_read_char_wrapper_noexcept ../../binutils-gdb/gdb/event-top.c:188 0x5e001c gdb_rl_callback_read_char_wrapper ../../binutils-gdb/gdb/event-top.c:221 0x5de71f stdin_event_handler ../../binutils-gdb/gdb/event-top.c:541 0x97772d gdb_wait_for_event ../../binutils-gdb/gdbsupport/event-loop.cc:716 0x977ef0 _Z16gdb_do_one_eventi ../../binutils-gdb/gdbsupport/event-loop.cc:264 0x6a91c9 start_event_loop ../../binutils-gdb/gdb/main.c:411 0x6a91c9 captured_command_loop ../../binutils-gdb/gdb/main.c:471 0x6aab34 captured_main ../../binutils-gdb/gdb/main.c:1330 0x6aab34 _Z8gdb_mainP18captured_main_args ../../binutils-gdb/gdb/main.c:1345 0x43a044 main ../../binutils-gdb/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 --=20 You are receiving this mail because: You are on the CC list for the bug.=