Skip to content

Commit ef24bd3

Browse files
committed
hard-bounded range
1 parent f17c0ce commit ef24bd3

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

src/shims/native_lib/mod.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,21 @@ pub struct MemEvents {
4242
#[cfg_attr(target_os = "linux", derive(serde::Serialize, serde::Deserialize))]
4343
#[derive(Debug)]
4444
pub enum AccessEvent {
45-
/// A read may have occurred on no more than the specified address range.
45+
/// A read occurred on this memory range.
4646
Read(AccessRange),
47-
/// A write may have occurred on no more than the specified address range.
47+
/// A read occurred on this memory range.
4848
Write(AccessRange),
4949
}
5050

51-
/// The actual size of a performed access, bounded by size.
51+
/// The memory touched by a given access.
5252
#[allow(dead_code)]
5353
#[cfg_attr(target_os = "linux", derive(serde::Serialize, serde::Deserialize))]
5454
#[derive(Clone, Debug)]
5555
pub struct AccessRange {
5656
/// The base address in memory where an access occurred.
5757
pub addr: usize,
58-
/// The smallest size this access could have been.
59-
pub min_size: usize,
60-
/// The largest size this access could have been.
61-
pub max_size: usize,
58+
/// The number of bytes affected from the base.
59+
pub size: usize,
6260
}
6361

6462
impl<'tcx> EvalContextExtPriv<'tcx> for crate::MiriInterpCx<'tcx> {}

src/shims/native_lib/trace/parent.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,8 +410,7 @@ fn handle_segfault(
410410
arch::x86::X86OperandType::Mem(_) => {
411411
let push = AccessRange {
412412
addr,
413-
min_size: x86_operand.size.into(),
414-
max_size: x86_operand.size.into(),
413+
size: x86_operand.size.into(),
415414
};
416415
// It's called a "RegAccessType" but it also applies to memory
417416
let acc_ty = x86_operand.access.unwrap();

0 commit comments

Comments
 (0)