Skip to content

Commit 8e2e10e

Browse files
committed
Add coredump for 3.4.5 with complex test backtrace
1 parent 87923b8 commit 8e2e10e

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed
6.96 MB
Binary file not shown.

src/lib.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ pub fn coredump_with_classes_3_3_0() -> CoreDump {
7474
load_coredump("ruby-coredump-with-classes-3.3.0.gz").unwrap()
7575
}
7676

77+
pub fn coredump_complex_3_4_5() -> CoreDump {
78+
load_coredump("ruby-coredump-complex-3.4.5.gz").unwrap()
79+
}
80+
7781
/// Allows testing offline with a core dump of a Ruby process.
7882
pub struct CoreDump {
7983
raw_memory: Vec<u8>,
@@ -215,5 +219,14 @@ mod tests {
215219
buf,
216220
&[16, 115, 177, 241, 196, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
217221
);
222+
223+
let coredump = load_coredump("ruby-coredump-complex-3.4.5.gz").unwrap();
224+
assert_eq!(coredump.elf_section_headers.len(), 152);
225+
let buf = &mut [0u8; 16];
226+
coredump.read(0x7f271feb5390, buf).expect("read failed");
227+
assert_eq!(
228+
buf,
229+
&[16, 19, 104, 91, 119, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
230+
);
218231
}
219232
}

0 commit comments

Comments
 (0)