diff --git a/src/linux/libunwind/mod.rs b/src/linux/libunwind/mod.rs index 5f34e60..33986a2 100644 --- a/src/linux/libunwind/mod.rs +++ b/src/linux/libunwind/mod.rs @@ -45,13 +45,13 @@ impl Unwinder { pub fn cursor(&self, thread: &crate::Thread) -> Result { unsafe { let upt = _UPT_create(thread.id()? as _); - let mut cursor = std::mem::MaybeUninit::uninit().assume_init(); - let ret = init_remote(&mut cursor, self.addr_space, upt); + let mut cursor = std::mem::MaybeUninit::uninit(); + let ret = init_remote(cursor.as_mut_ptr(), self.addr_space, upt); if ret != 0 { return Err(crate::Error::LibunwindError(Error::from(-ret))); } Ok(Cursor { - cursor, + cursor: cursor.assume_init(), upt, initial_frame: true, }) @@ -106,7 +106,7 @@ impl Cursor { unsafe { let mut name = vec![0_u8 as c_char; 128]; let cursor = &self.cursor as *const _ as *mut _; - let mut raw_offset = std::mem::MaybeUninit::uninit().assume_init(); + let mut raw_offset = 0; loop { match get_proc_name(cursor, name.as_mut_ptr(), name.len(), &mut raw_offset) {