From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2D52F3858C39; Tue, 7 Mar 2023 19:16:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2D52F3858C39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1678216585; bh=s6jmx9Ysc/N53nEiom1gxHmcQZrLyQ2wXBp0V/Iopqk=; h=From:To:Subject:Date:From; b=yzR/c56YkuUivjm5bBybzjxZiQrV/JqQn/6S8oEB7qYN8uO0FTlv/X0iUG5ubHfWW U3ZHCBCpabKNVrMxBZSsxrBYu/d+7wPorB0lIE1TyT/JzauxSuyiiN89vQGoew7fuG qqzmiLGflOq7VIfSrvbKKeIJKcdbjRuxp8ZOoltg= From: "sourceware at vorpal dot se" To: gdb-prs@sourceware.org Subject: [Bug rust/30211] New: Crash on tab completing while debugging rust program Date: Tue, 07 Mar 2023 19:16:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: rust X-Bugzilla-Version: 13.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sourceware at vorpal dot se 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=3D30211 Bug ID: 30211 Summary: Crash on tab completing while debugging rust program Product: gdb Version: 13.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: rust Assignee: unassigned at sourceware dot org Reporter: sourceware at vorpal dot se Target Milestone: --- I first thought this was a rust-gdb bug, but it happens with plain gdb on r= ust programs too, so I'm opening a bug here too. The original rust-bug can be found at https://github.com/rust-lang/rust/issues/108876 Steps to reproduce: 1. Create a simple rust program (cargo new dummy). 2. Build it (cargo build) 3. Debug it:=20 =E2=9D=AF gdb --nh target/debug/dummy GNU gdb (GDB) 13.1 Copyright (C) 2023 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. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from target/debug/dummy... (gdb) break i This will crash at this point: terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_replace Fatal signal: Aborted ----- Backtrace ----- 0x564f2970dd7b ??? 0x564f2981c218 ??? 0x7fd5dd051f4f ??? 0x7fd5dd0a08ec ??? 0x7fd5dd051ea7 ??? 0x7fd5dd03b53c ??? 0x7fd5dd29a832 _ZN9__gnu_cxx27__verbose_terminate_handlerEv /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/vterminate.cc:95 0x7fd5dd2a6d0b _ZN10__cxxabiv111__terminateEPFvvE /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:48 0x7fd5dd2a5cc9 __cxa_call_terminate /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_call.cc:54 0x7fd5dd2a6449 __gxx_personality_v0 /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_personality.cc:688 0x7fd5dd9da6e3 _Unwind_RaiseException_Phase2 /usr/src/debug/gcc/gcc/libgcc/unwind.inc:64 0x7fd5dd9db15c _Unwind_Resume /usr/src/debug/gcc/gcc/libgcc/unwind.inc:242 0x564f29655fa5 ??? 0x564f29769239 ??? 0x564f2976c189 ??? 0x564f2976e9ab ??? 0x7fd5ddc931a9 ??? 0x7fd5ddc98f9c ??? 0x7fd5ddc9042f ??? 0x7fd5ddc91247 ??? 0x7fd5ddcb1405 ??? 0x564f2981f183 ??? 0x564f2981f303 ??? 0x564f2982092f ??? 0x564f29ba1e2d ??? 0x564f29bf35c9 ??? 0x564f2991e4d4 ??? 0x564f29679654 ??? 0x7fd5dd03c78f ??? 0x7fd5dd03c849 ??? 0x564f29680ab4 ??? 0xffffffffffffffff ??? --------------------- 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: . zsh: IOT instruction (core dumped) rust-gdb --nh target/debug/dummy Running gdb on gdb itself gives me this backtrace: #0 __pthread_kill_implementation (threadid=3D, signo=3Dsigno@entry=3D6, no_tid=3Dno_tid@entry=3D0) at pthread_kill.c:44 #1 0x00007ffff70a0953 in __pthread_kill_internal (signo=3D6, threadid=3D) at pthread_kill.c:78 #2 0x00007ffff7051ea8 in __GI_raise (sig=3Dsig@entry=3D6) at ../sysdeps/posix/raise.c:26 #3 0x00007ffff703b53d in __GI_abort () at abort.c:79 #4 0x00007ffff729a833 in __gnu_cxx::__verbose_terminate_handler () at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/vterminate.cc:95 #5 0x00007ffff72a6d0c in __cxxabiv1::__terminate (handler=3D) at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:48 #6 0x00007ffff72a5cca in __cxa_call_terminate (ue_header=3D0x55555616efb0)= at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_call.cc:54 #7 0x00007ffff72a644a in __cxxabiv1::__gxx_personality_v0 (version=3D, actions=3D6, exception_class=3D5138137972254386944, ue_header=3D, context=3D0x7fffffffc910) at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_personality.cc:688 #8 0x00007ffff7a216e4 in _Unwind_RaiseException_Phase2 (exc=3Dexc@entry=3D0x55555616efb0, context=3Dcontext@entry=3D0x7fffffffc910, frames_p=3Dframes_p@entry=3D0x7fffffffc818) at /usr/src/debug/gcc/gcc/libgcc/unwind.inc:64 #9 0x00007ffff7a2215d in _Unwind_Resume (exc=3Dexc@entry=3D0x55555616efb0)= at /usr/src/debug/gcc/gcc/libgcc/unwind.inc:242 #10 0x000055555560ffa6 in location_completer (ignore=3D, tracker=3D..., text=3D) at ../../gdb/completer.c:766 #11 0x000055555572323a in complete_line_internal_1 (tracker=3D..., text=3D, line_buffer=3D, point=3D, reason=3D) at ../../gdb/completer.c:1438 #12 0x000055555572618a in complete_line_internal (tracker=3D..., text=3D, line_buffer=3D, point=3D, reason=3D) at ../../gdb/completer.c:1457 #13 0x00005555557289ac in gdb_completion_word_break_characters_throw () at ../../gdb/completer.c:1907 #14 gdb_completion_word_break_characters () at ../../gdb/completer.c:1945 #15 0x00007ffff7d921aa in _rl_find_completion_word (fp=3Dfp@entry=3D0x7ffff= fffce18, dp=3Ddp@entry=3D0x7fffffffce1c) at ../complete.c:1091 #16 0x00007ffff7d97f9d in rl_complete_internal (what_to_do=3D9) at ../complete.c:2027 #17 0x00007ffff7d8f430 in _rl_dispatch_subseq (key=3D9, map=3D, got_subseq=3D0) at ../readline.c:916 #18 0x00007ffff7d8f9c6 in _rl_dispatch (key=3D, map=3D) at ../readline.c:860 #19 0x00007ffff7d90248 in readline_internal_char () at ../readline.c:675 #20 0x00007ffff7db0406 in rl_callback_read_char () at ../callback.c:272 #21 0x00005555557d9184 in gdb_rl_callback_read_char_wrapper_noexcept () at ../../gdb/event-top.c:188 #22 0x00005555557d9304 in gdb_rl_callback_read_char_wrapper (client_data=3D) at ../../gdb/event-top.c:221 #23 0x00005555557da930 in stdin_event_handler (error=3D, client_data=3D0x555555f2c2f0) at ../../gdb/event-top.c:541 #24 0x0000555555b5be2e in gdb_wait_for_event (block=3D) at ../gdbsupport/../../gdbsupport/event-loop.cc:716 #25 0x0000555555bad5ca in gdb_do_one_event(int) [clone .constprop.0] (mstimeout=3D-1) at ../gdbsupport/../../gdbsupport/event-loop.cc:264 #26 0x00005555558d84d5 in start_event_loop () at ../../gdb/main.c:411 #27 captured_command_loop () at ../../gdb/main.c:471 #28 0x0000555555633655 in captured_main (data=3D0x7fffffffd070) at ../../gdb/main.c:1330 #29 gdb_main (args=3D0x7fffffffd070) at ../../gdb/main.c:1345 #30 main (argc=3D, argv=3D) at ../../gdb/gdb.= c:32 $ rustc --version --verbose: rustc 1.67.1 (d5a82bbd2 2023-02-07) binary: rustc commit-hash: d5a82bbd26e1ad8b7401f6a718a9c57c96905483 commit-date: 2023-02-07 host: x86_64-unknown-linux-gnu release: 1.67.1 LLVM version: 15.0.6 This also happens with nightly though! $ gdb --version=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 GNU gdb (GDB) 13.1 Copyright (C) 2023 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. GDB is from the Arch Linux package. Debuginfod is enabled using the Arch Li= nux debuginfod server (not sure if that is relevant). --=20 You are receiving this mail because: You are on the CC list for the bug.=