public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "nils at os dot inf.tu-dresden.de" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug backtrace/29298] New: Internal error when debugging Rust programs Date: Wed, 29 Jun 2022 14:10:40 +0000 [thread overview] Message-ID: <bug-29298-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=29298 Bug ID: 29298 Summary: Internal error when debugging Rust programs Product: gdb Version: 12.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: backtrace Assignee: unassigned at sourceware dot org Reporter: nils at os dot inf.tu-dresden.de Target Milestone: --- With some Rust programs, generating a backtrace leads to an internal error in GDB: $ gdb target/debug/test GNU gdb (GDB) 12.1 Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> 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: <https://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from target/debug/test... warning: Missing auto-load script at offset 0 in section .debug_gdb_scripts of file /home/hrniels/test/foo/target/debug/test. Use `info auto-load python-scripts [REGEXP]' to list them. (gdb) b main Breakpoint 1 at 0x9530 (gdb) run Starting program: /home/hrniels/test/foo/target/debug/test This GDB supports auto-downloading debuginfo from the following URLs: https://debuginfod.archlinux.org Enable debuginfod for this session? (y or [n]) n Debuginfod has been disabled. To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit. [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". Breakpoint 1, 0x000055555555d530 in main () (gdb) bt ../../gdb/frame.c:2434: internal-error: inside_main_func: Assertion `block != nullptr' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. ----- Backtrace ----- 0x563c6fccbb6b ??? 0x563c70009d44 ??? 0x563c700ccce3 ??? 0x563c6fde3fa2 ??? 0x563c6fef057d ??? 0x563c6fef283d ??? 0x563c6fdc2615 ??? 0x563c6ff7ace7 ??? 0x563c6fd01d74 ??? 0x563c6ffd1812 ??? 0x563c6fdc7bfc ??? 0x563c6fdc7c9d ??? 0x563c6fdb901f ??? 0x7fcb3b36c9df ??? 0x563c6fdbca3b ??? 0x563c6fdbcc23 ??? 0x563c6fdc7b2f ??? 0x563c700cd955 ??? 0x563c700cdd39 ??? 0x563c6fe8bd24 ??? 0x563c6fc37c04 ??? 0x7fcb3a22928f ??? 0x7fcb3a229349 ??? 0x563c6fc3e1e4 ??? 0xffffffffffffffff ??? --------------------- ../../gdb/frame.c:2434: internal-error: inside_main_func: Assertion `block != nullptr' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) n I'm not exactly sure what the cause is, but the following Rust program can (hopefully) be used to reproduce the behavior: fn main() { println!("{}", std::env::var("RUST_LOG").unwrap_or_else(|_| "error".to_string())); } Note also that the problem goes away if I use `unwrap_or("error".to_string())` instead of `unwrap_or_else(|_| "error".to_string())`. So, maybe the closure plays a role here? In case it matters, I'm using Rust 1.61.0 (a028ae4 2022-04-29). -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2022-06-29 14:10 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-29 14:10 nils at os dot inf.tu-dresden.de [this message] 2022-07-06 16:07 ` [Bug backtrace/29298] " tromey at sourceware dot org 2022-07-06 18:15 ` nils at os dot inf.tu-dresden.de 2022-08-05 14:29 ` tromey at sourceware dot org 2023-03-22 10:51 ` e11911636 at student dot tuwien.ac.at 2023-03-22 16:10 ` tromey at sourceware dot org 2023-03-22 16:46 ` e11911636 at student dot tuwien.ac.at 2023-03-22 20:30 ` tromey at sourceware dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-29298-4717@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).