[Bug 2077601] [NEW] GDB 9.2 freezes when inspecting applications built by rustc
Zixing Liu
2077601 at bugs.launchpad.net
Thu Aug 22 07:26:58 UTC 2024
Public bug reported:
GDB 9.2 on Focal freezes when inspecting applications built by rustc.
Example program:
---
static mut B: bool = false;
static mut I: isize = -1;
static mut C: char = 'a';
static mut I8: i8 = 68;
static mut I16: i16 = -16;
static mut I32: i32 = -32;
static mut I64: i64 = -64;
static mut U: usize = 1;
static mut U8: u8 = 100;
static mut U16: u16 = 16;
static mut U32: u32 = 32;
static mut U64: u64 = 64;
static mut F32: f32 = 2.5;
static mut F64: f64 = 3.5;
fn main() {
_zzz(); // #break
let a = unsafe { (B, I, C, I8, I16, I32, I64, U, U8, U16, U32, U64, F32, F64) };
}
fn _zzz() {()}
---
When built by Rust 1.79 using:
rustc-1.79 -Clto -g test1.rs -o test1
... and run using GDB and set a breakpoint on the //#break line, GDB
will freeze and consume 100% CPU on a single core.
The issue was fixed in GDB 11 in https://sourceware.org/git/?p=binutils-
gdb.git;a=commit;h=8457e5ecc45295bc9550c4f705a276d5ca90d908 but not
backported to GDB 9.x series.
** Affects: gdb (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gdb in Ubuntu.
https://bugs.launchpad.net/bugs/2077601
Title:
GDB 9.2 freezes when inspecting applications built by rustc
Status in gdb package in Ubuntu:
New
Bug description:
GDB 9.2 on Focal freezes when inspecting applications built by rustc.
Example program:
---
static mut B: bool = false;
static mut I: isize = -1;
static mut C: char = 'a';
static mut I8: i8 = 68;
static mut I16: i16 = -16;
static mut I32: i32 = -32;
static mut I64: i64 = -64;
static mut U: usize = 1;
static mut U8: u8 = 100;
static mut U16: u16 = 16;
static mut U32: u32 = 32;
static mut U64: u64 = 64;
static mut F32: f32 = 2.5;
static mut F64: f64 = 3.5;
fn main() {
_zzz(); // #break
let a = unsafe { (B, I, C, I8, I16, I32, I64, U, U8, U16, U32, U64, F32, F64) };
}
fn _zzz() {()}
---
When built by Rust 1.79 using:
rustc-1.79 -Clto -g test1.rs -o test1
... and run using GDB and set a breakpoint on the //#break line, GDB
will freeze and consume 100% CPU on a single core.
The issue was fixed in GDB 11 in
https://sourceware.org/git/?p=binutils-
gdb.git;a=commit;h=8457e5ecc45295bc9550c4f705a276d5ca90d908 but not
backported to GDB 9.x series.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/2077601/+subscriptions
More information about the foundations-bugs
mailing list