Skip to content

Commit

Permalink
Remove unsound Clone implementation for VmData.
Browse files Browse the repository at this point in the history
This Clone implementation was garbage. This type has a raw pointer in it and frees it during drop.
If we wanted to implement Clone on it, we would have to do it manually.
  • Loading branch information
mstange committed Feb 7, 2024
1 parent 06902c2 commit 120f04e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions samply/src/mac/proc_maps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ fn do_stackwalk(
}
}

#[derive(Debug, Clone)]
#[derive(Debug)]
pub struct ForeignMemory {
task: mach_port_t,
data: Vec<VmData>,
Expand Down Expand Up @@ -652,7 +652,7 @@ impl Deref for VmSubData {
}
}

#[derive(Debug, Clone)]
#[derive(Debug)]
pub struct VmData {
address_range: std::ops::Range<u64>,
data: *mut u8,
Expand Down

0 comments on commit 120f04e

Please sign in to comment.