From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BFF803856944; Thu, 15 Jun 2023 18:33:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BFF803856944 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1686853987; bh=CHpVVu97f8AvqQFsM6bY1HwAiP2Uispj/JRZTrz23Zw=; h=From:To:Subject:Date:From; b=bJ++R1LIkb7qizKZuY+dBzwXHfqfChWIqE1UeWIiY/H5ceHLa0odFvXnyKdPAeCp4 m0UILsyBoJbKfSA0SaQv9JKf9zjGKfU1mgEYIND6PL4b1oatNjTjFp1ju4HzRushbk 0SFoz+NdP1J90qXzNcH85hbBuozH7JLATbQvPVNA= From: "zwelf at strct dot cc" To: gdb-prs@sourceware.org Subject: [Bug cli/30557] New: Exception after pressing tab to autocomplete in location_completer gdb/completer.c:766 Date: Thu, 15 Jun 2023 18:33:06 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: cli X-Bugzilla-Version: 13.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: zwelf at strct dot cc 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 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=3D30557 Bug ID: 30557 Summary: Exception after pressing tab to autocomplete in location_completer gdb/completer.c:766 Product: gdb Version: 13.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: cli Assignee: unassigned at sourceware dot org Reporter: zwelf at strct dot cc Target Milestone: --- I encountered a crash. Here is the stack trace. Using `GNU gdb (GDB) 13.1` = from arch repros. ``` (gdb) bt #0 __pthread_kill_implementation (threadid=3D, signo=3Dsigno@entry=3D6, no_tid=3Dno_tid@entry=3D0) at pthread_kill.c:44 #1 0x00007f2a81bb22d3 in __pthread_kill_internal (signo=3D6, threadid=3D) at pthread_kill.c:78 #2 0x00007f2a81b62a08 in __GI_raise (sig=3D6) at ../sysdeps/posix/raise.c:= 26 #3 0x00005611e8d3519a in handle_fatal_signal (sig=3D6) at ../../gdb/event-top.c:979 #4 #5 __pthread_kill_implementation (threadid=3D, signo=3Dsigno@entry=3D6, no_tid=3Dno_tid@entry=3D0) at pthread_kill.c:44 #6 0x00007f2a81bb22d3 in __pthread_kill_internal (signo=3D6, threadid=3D) at pthread_kill.c:78 #7 0x00007f2a81b62a08 in __GI_raise (sig=3Dsig@entry=3D6) at ../sysdeps/posix/raise.c:26 #8 0x00007f2a81b4b538 in __GI_abort () at abort.c:79 #9 0x00007f2a81e9ca6f in __gnu_cxx::__verbose_terminate_handler () at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/vterminate.cc:95 #10 0x00007f2a81eb011c in __cxxabiv1::__terminate (handler=3D) at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:48 #11 0x00007f2a81eaf0aa in __cxa_call_terminate (ue_header=3D0x5611eade2000)= at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_call.cc:54 #12 0x00007f2a81eaf82a in __cxxabiv1::__gxx_personality_v0 (version=3D, actions=3D6, exception_class=3D5138137972254386944, ue_header=3D, context=3D0x7ffcee55fe10) at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_personality.cc:688 #13 0x00007f2a8287458a in _Unwind_RaiseException_Phase2 (exc=3Dexc@entry=3D0x5611eade2000, context=3Dcontext@entry=3D0x7ffcee55fe10, frames_p=3Dframes_p@entry=3D0x7ffcee55fd18) at /usr/src/debug/gcc/gcc/libgcc/unwind.inc:64 #14 0x00007f2a8287508d in _Unwind_Resume (exc=3Dexc@entry=3D0x5611eade2000)= at /usr/src/debug/gcc/gcc/libgcc/unwind.inc:242 #15 0x00005611e8b6efa6 in location_completer (ignore=3D, tracker=3D..., text=3D) at ../../gdb/completer.c:766 #16 0x00005611e8c821ba in complete_line_internal_1 (tracker=3D..., text=3D, line_buffer=3D, point=3D, reason=3D) at ../../gdb/completer.c:1438 #17 0x00005611e8c8510a in complete_line_internal (tracker=3D..., text=3D, line_buffer=3D, point=3D, reason=3D) at ../../gdb/completer.c:1457 #18 0x00005611e8c8792c in gdb_completion_word_break_characters_throw () at ../../gdb/completer.c:1907 #19 gdb_completion_word_break_characters () at ../../gdb/completer.c:1945 #20 0x00007f2a82b341aa in _rl_find_completion_word (fp=3Dfp@entry=3D0x7ffce= e560328, dp=3Ddp@entry=3D0x7ffcee56032c) at ../complete.c:1091 #21 0x00007f2a82b39f9d in rl_complete_internal (what_to_do=3D9) at ../complete.c:2027 #22 0x00007f2a82b31430 in _rl_dispatch_subseq (key=3D9, map=3D, got_subseq=3D0) at ../readline.c:916 #23 0x00007f2a82b319c6 in _rl_dispatch (key=3D, map=3D) at ../readline.c:860 #24 0x00007f2a82b32248 in readline_internal_char () at ../readline.c:675 #25 0x00007f2a82b52406 in rl_callback_read_char () at ../callback.c:272 #26 0x00005611e8d38154 in gdb_rl_callback_read_char_wrapper_noexcept () at ../../gdb/event-top.c:188 #27 0x00005611e8d382d4 in gdb_rl_callback_read_char_wrapper (client_data=3D) at ../../gdb/event-top.c:221 #28 0x00005611e8d39900 in stdin_event_handler (error=3D, client_data=3D0x5611ea3086f0) at ../../gdb/event-top.c:541 #29 0x00005611e90bad5e in gdb_wait_for_event (block=3D) at ../gdbsupport/../../gdbsupport/event-loop.cc:716 #30 0x00005611e910c4fa in gdb_do_one_event(int) [clone .constprop.0] (mstimeout=3D-1) at ../gdbsupport/../../gdbsupport/event-loop.cc:264 #31 0x00005611e8e374a5 in start_event_loop () at ../../gdb/main.c:411 #32 captured_command_loop () at ../../gdb/main.c:471 #33 0x00005611e8b92665 in captured_main (data=3D0x7ffcee560580) at ../../gdb/main.c:1330 #34 gdb_main (args=3D0x7ffcee560580) at ../../gdb/main.c:1345 #35 main (argc=3D, argv=3D) at ../../gdb/gdb.= c:32 ``` ``` (gdb) bt full #0 __pthread_kill_implementation (threadid=3D, signo=3Dsigno@entry=3D6, no_tid=3Dno_tid@entry=3D0) at pthread_kill.c:44 tid =3D ret =3D 0 pd =3D old_mask =3D {__val =3D {18446744073709551576}} ret =3D #1 0x00007f2a81bb22d3 in __pthread_kill_internal (signo=3D6, threadid=3D) at pthread_kill.c:78 No locals. #2 0x00007f2a81b62a08 in __GI_raise (sig=3D6) at ../sysdeps/posix/raise.c:= 26 ret =3D #3 0x00005611e8d3519a in handle_fatal_signal (sig=3D6) at ../../gdb/event-top.c:979 sig_write =3D #4 No locals. #5 __pthread_kill_implementation (threadid=3D, signo=3Dsigno@entry=3D6, no_tid=3Dno_tid@entry=3D0) at pthread_kill.c:44 tid =3D ret =3D 0 pd =3D old_mask =3D {__val =3D {139820545026096}} ret =3D #6 0x00007f2a81bb22d3 in __pthread_kill_internal (signo=3D6, threadid=3D) at pthread_kill.c:78 No locals. #7 0x00007f2a81b62a08 in __GI_raise (sig=3Dsig@entry=3D6) at ../sysdeps/posix/raise.c:26 ret =3D #8 0x00007f2a81b4b538 in __GI_abort () at abort.c:79 save_stage =3D 1 act =3D {__sigaction_handler =3D {sa_handler =3D 0x20, sa_sigaction= =3D 0x20}, sa_mask =3D {__val =3D {139820543268419, 2664, 139820541832100, 24, 1, 10, 139820505722624, 140724307098576, 139820555296896, 4, 139820541839449,=20 139820543268288, 139820541840627, 139820543268288, 10, 139820505722624}}, sa_flags =3D -2118501110, sa_restorer =3D 0x7f2a81d05780 } #9 0x00007f2a81e9ca6f in __gnu_cxx::__verbose_terminate_handler () at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/vterminate.cc:95 terminating =3D true t =3D #10 0x00007f2a81eb011c in __cxxabiv1::__terminate (handler=3D) at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:48 No locals. #11 0x00007f2a81eaf0aa in __cxa_call_terminate (ue_header=3D0x5611eade2000)= at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_call.cc:54 xh =3D 0x5611eade1fb0 #12 0x00007f2a81eaf82a in __cxxabiv1::__gxx_personality_v0 (version=3D, actions=3D6, exception_class=3D5138137972254386944, ue_header=3D, context=3D0x7ffcee55fe10) at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_personality.cc:688 found_something =3D install_context =3D found_nothing =3D found_nothing found_terminate =3D found_terminate found_cleanup =3D found_cleanup found_handler =3D found_handler found_type =3D info =3D {Start =3D 94634926438868, LPStart =3D 94634926438889, tty= pe_base =3D 4, TType =3D 0x5611e92938f9 "\f\a\b\220\001", action_table =3D 0x7ffcee55fe= 10 "\b\377U\356\374\177", ttype_encoding =3D 157 '\235', call_site_encoding = =3D 54 '6'} language_specific_data =3D action_record =3D p =3D landing_pad =3D ip =3D handler_switch_value =3D thrown_ptr =3D 0x0 foreign_exception =3D ip_before_insn =3D 0 xh =3D #13 0x00007f2a8287458a in _Unwind_RaiseException_Phase2 (exc=3Dexc@entry=3D0x5611eade2000, context=3Dcontext@entry=3D0x7ffcee55fe10, frames_p=3Dframes_p@entry=3D0x7ffcee55fd18) at /usr/src/debug/gcc/gcc/libgcc/unwind.inc:64 fs =3D {regs =3D {reg =3D {{loc =3D {reg =3D 0, offset =3D 0, exp = =3D 0x0}}, {loc =3D {reg =3D 140724307099472, offset =3D 140724307099472, exp =3D 0x7ffcee55ff5= 0 ""}}, {loc =3D {reg =3D 18446744073709551544, offset =3D -72,=20 exp =3D 0xffffffffffffffb8 }}, {loc =3D {reg =3D 18446744073709551592, offs= et =3D -24,=20 exp =3D 0xffffffffffffffe8 }}, {loc =3D {reg =3D 140724307098856, offset =3D 140724307098856, exp =3D 0x7ffcee55fce8 " \375U\356\374\177"}}, {loc =3D { reg =3D 18446744073709551560, offset =3D -56, exp =3D 0xffffffffffffffc8 }}, {loc =3D {reg =3D 18446744073709551600, offset =3D -= 16,=20 exp =3D 0xfffffffffffffff0 }}, {loc =3D {reg =3D 140724307099416, offset =3D 140724307099416, exp =3D 0x7ffcee55ff18 ""}}, {loc =3D {reg =3D 18446744073= 709551600,=20 offset =3D -16, exp =3D 0xfffffffffffffff0 }}, {loc =3D {reg =3D 0, offset =3D 0,= exp =3D 0x0}}, {loc =3D {reg =3D 140724307099424, offset =3D 140724307099424,=20 exp =3D 0x7ffcee55ff20 "\250\377U\356\374\177"}}, {loc = =3D {reg =3D 140724307098328, offset =3D 140724307098328, exp =3D 0x7ffcee55fad8 ""}}, {= loc =3D {reg =3D 18446744073709551584, offset =3D -32,=20 exp =3D 0xffffffffffffffe0 }}, {loc =3D {reg =3D 18446744073709551592, offs= et =3D -24,=20 exp =3D 0xffffffffffffffe8 }}, {loc =3D {reg =3D 18446744073709551600, offs= et =3D -16,=20 exp =3D 0xfffffffffffffff0 }}, {loc =3D {reg =3D 18446744073709551600, offs= et =3D -16,=20 exp =3D 0xfffffffffffffff0 }}, {loc =3D {reg =3D 18446744073709551608, offs= et =3D -8,=20 exp =3D 0xfffffffffffffff8 }}, {loc =3D {reg =3D 18446744073709551592, offs= et =3D -24,=20 exp =3D 0xffffffffffffffe8 }}}, how =3D "\000\000\000\001\000\000\001\000\000\000\000\000\000\000\000\000\001", cfa= _how =3D CFA_REG_OFFSET, prev =3D 0x0,=20 cfa_offset =3D 96, cfa_reg =3D 7, cfa_exp =3D 0x0}, pc =3D 0x56= 11e8d38258 ,=20 personality =3D 0x7f2a81eaf790 <__cxxabiv1::__gxx_personality_v0(= int, _Unwind_Action, _Unwind_Exception_Class, _Unwind_Exception*, _Unwind_Context*)>, data_align =3D -8, code_align =3D 1, retaddr_column =3D= 16,=20 fde_encoding =3D 27 '\033', lsda_encoding =3D 27 '\033', saw_z = =3D 1 '\001', signal_frame =3D 0 '\000', eh_ptr =3D 0x0} match_handler =3D code =3D frames =3D 10 #14 0x00007f2a8287508d in _Unwind_Resume (exc=3Dexc@entry=3D0x5611eade2000)= at /usr/src/debug/gcc/gcc/libgcc/unwind.inc:242 this_context =3D {reg =3D {0x7ffcee55ff08, 0x7ffcee55ff10, 0x0, 0x7ffcee55ff18, 0x0, 0x0, 0x7ffcee55ff40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7ffcee55ff20, 0x7ffcee55ff28, 0x7ffcee55ff30, 0x7ffcee55ff38, 0x7ffcee55f= f48, 0x0},=20 cfa =3D 0x7ffcee55ff50, ra =3D 0x5611e8b6efa6 , lsda =3D 0x0, bases =3D {tbase =3D 0x0, dbase =3D 0x74c,= =20 func =3D 0x7f2a82874f60 <_Unwind_Resume>}, flags =3D 4611686018427387904, version =3D 0, args_size =3D 0, by_value =3D '\000' } cur_context =3D {reg =3D {0x7ffcee55ff08, 0x7ffcee55ff10, 0x0, 0x7ffcee560410, 0x0, 0x0, 0x7ffcee560418, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7ffcee560420, 0x7ffcee560428, 0x7ffcee560430, 0x7ffcee5603d0, 0x7ffcee560= 438, 0x0},=20 cfa =3D 0x7ffcee560440, ra =3D 0x5611e8d38154 , lsda =3D 0x5611e9351569, bases =3D {tbase =3D 0x0, dbase =3D 0x1dfcc, func =3D 0x5611e8d380d0 },=20 flags =3D 4611686018427387904, version =3D 0, args_size =3D 0, by= _value =3D '\000' } code =3D frames =3D 140724307100102 #15 0x00005611e8b6efa6 in location_completer (ignore=3D, tracker=3D..., text=3D) at ../../gdb/completer.c:766 found_probe_option =3D -1 option_text =3D saved_word_point =3D 6 copy =3D 0x7ffcee5601c6 "en" completion_info =3D {last_option =3D 0x0, quoted_arg_start =3D 0x0, quoted_arg_end =3D 0x0, saw_explicit_location_spec_option =3D false} locspec =3D std::unique_ptr =3D {get() =3D 0x0} #16 0x00005611e8c821ba in complete_line_internal_1 (tracker=3D..., text=3D, line_buffer=3D, point=3D, reason=3D) at ../../gdb/completer.c:1438 tmp_command =3D 0x7ffcee5601c0 "break en" p =3D 0x7ffcee5601c6 "en" ignore_help_classes =3D 1 word =3D c =3D result_list =3D 0x5611ea3dc210 __func__ =3D #17 0x00005611e8c8510a in complete_line_internal (tracker=3D..., text=3D, line_buffer=3D, point=3D, reason=3D) at ../../gdb/completer.c:1457 No locals. #18 0x00005611e8c8792c in gdb_completion_word_break_characters_throw () at ../../gdb/completer.c:1907 tracker =3D @0x5611ea599420: {m_completion_match_result =3D {match = =3D {m_match =3D 0x7f2a58013300 "core::str::::encode_utf16::hf07f819e7d513362", m_storage =3D ""}, match_for_lcd = =3D { m_match =3D 0x7f2a58013317 "encode_utf16::hf07f819e7d513362", m_ignored_ranges =3D std::vector of length 1, capacity 1 =3D {{first =3D 0x7f2a5801330b "::encode_utf16::hf07f819e7d513362",=20 second =3D 0x7f2a58013315 "::encode_utf16::hf07f819e7d513362"}}, m_finished_storage =3D ""}}, m_entries_hash =3D std::unique_ptr =3D {get() =3D 0x5611eae38e40}, m_= quote_char =3D 0, m_use_custom_word_point =3D true,=20 m_custom_word_point =3D 6, m_suppress_append_ws =3D false, m_lowest_common_denominator =3D 0x0, m_lowest_common_denominator_unique =3D= false, m_lowest_common_denominator_valid =3D false, m_lowest_common_denominator_max_length =3D 227} tracker =3D __func__ =3D #19 gdb_completion_word_break_characters () at ../../gdb/completer.c:1945 No locals. #20 0x00007f2a82b341aa in _rl_find_completion_word (fp=3Dfp@entry=3D0x7ffce= e560328, dp=3Ddp@entry=3D0x7ffcee56032c) at ../complete.c:1091 scan =3D end =3D 8 found_quote =3D 0 delimiter =3D 0 pass_next =3D isbrk =3D quote_char =3D 0 '\000' brkchars =3D 0x0 #21 0x00007f2a82b39f9d in rl_complete_internal (what_to_do=3D9) at ../complete.c:2027 matches =3D 0x0 our_func =3D 0x7f2a82b38730 start =3D end =3D 8 delimiter =3D 0 found_quote =3D 0 i =3D nontrivial_lcd =3D text =3D saved_line_buffer =3D 0x5611eaa7bfe0 "break en" quote_char =3D 0 '\000' tlen =3D mlen =3D saved_last_completion_failed =3D 0 #22 0x00007f2a82b31430 in _rl_dispatch_subseq (key=3D9, map=3D, got_subseq=3D0) at ../readline.c:916 r =3D 0 newkey =3D macro =3D func =3D cxt =3D #23 0x00007f2a82b319c6 in _rl_dispatch (key=3D, map=3D) at ../readline.c:860 No locals. #24 0x00007f2a82b32248 in readline_internal_char () at ../readline.c:675 c =3D code =3D lk =3D 0 r =3D lastc =3D 9 eof_found =3D #25 0x00007f2a82b52406 in rl_callback_read_char () at ../callback.c:272 line =3D eof =3D jcode =3D olevel =3D {{__jmpbuf =3D {140724307100832, 2377292934506987412, 139820558370696, 94634928112640, 139820560609280, 94634927104632, 2400716111975137172, 2377292984838373268}, __mask_was_saved =3D 0, __saved_= mask =3D {__val =3D { 0 }}}} #26 0x00005611e8d38154 in gdb_rl_callback_read_char_wrapper_noexcept () at ../../gdb/event-top.c:188 gdb_expt =3D {reason =3D 0, error =3D GDB_NO_ERROR, message =3D std::shared_ptr, std::allocator >> (empty) =3D {get() =3D 0x0}} #27 0x00005611e8d382d4 in gdb_rl_callback_read_char_wrapper (client_data=3D) at ../../gdb/event-top.c:221 gdb_expt =3D {reason =3D 0, error =3D GDB_NO_ERROR, message =3D std::shared_ptr, std::allocator >> (empty) =3D {get() =3D 0x0}} #28 0x00005611e8d39900 in stdin_event_handler (error=3D, client_data=3D0x5611ea3086f0) at ../../gdb/event-top.c:541 ui =3D 0x5611ea3086f0 #29 0x00005611e90bad5e in gdb_wait_for_event (block=3D) at ../gdbsupport/../../gdbsupport/event-loop.cc:716 mask =3D file_ptr =3D num_found =3D __func__ =3D #30 0x00005611e910c4fa in gdb_do_one_event(int) [clone .constprop.0] (mstimeout=3D-1) at ../gdbsupport/../../gdbsupport/event-loop.cc:264 number_of_sources =3D 3 current =3D timer_id =3D scope_exit_251 =3D event_source_head =3D #31 0x00005611e8e374a5 in start_event_loop () at ../../gdb/main.c:411 result =3D 0 #32 captured_command_loop () at ../../gdb/main.c:471 ui =3D 0x5611ea3086f0 #33 0x00005611e8b92665 in captured_main (data=3D0x7ffcee560580) at ../../gdb/main.c:1330 context =3D 0x7ffcee560580 context =3D ex =3D #34 gdb_main (args=3D0x7ffcee560580) at ../../gdb/main.c:1345 No locals. #35 main (argc=3D, argv=3D) at ../../gdb/gdb.= c:32 args =3D {argc =3D 4, argv =3D 0x7ffcee5606c8, interpreter_p =3D 0x= 5611e914b004 "console"} ``` --=20 You are receiving this mail because: You are on the CC list for the bug.=