Skip to content

Commit 0c34833

Browse files
bobrikmstange
authored andcommitted
Decompress section data prior to use
This doesn't matter for `.eh_frame`, but it does matter to dwarf data, which is often compressed. Accessing uncompressed data will result in a silent failure in `framehop`: * https://github.com/mstange/framehop/blob/v0.7.2/src/unwinder.rs#L575
1 parent 3019d24 commit 0c34833

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎samply/src/linux_shared/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ where
992992
};
993993

994994
fn section_data<'a>(section: &impl ObjectSection<'a>) -> Option<Vec<u8>> {
995-
section.data().ok().map(|data| data.to_owned())
995+
section.uncompressed_data().ok().map(|data| data.to_vec())
996996
}
997997

998998
let file = match object::File::parse(&mmap[..]) {

0 commit comments

Comments
 (0)