Skip to content

Commit dc1098d

Browse files
committed
fix addr filter size
1 parent 9ad19f6 commit dc1098d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/libafl_intelpt/src/linux.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,13 @@ impl IntelPT {
119119
/// Set filters based on Instruction Pointer (IP)
120120
///
121121
/// Only instructions in `filters` ranges will be traced.
122+
/// NOTE: only filters of type `AddrFilterType::FILTER` are supported.
122123
fn set_ip_filters(&mut self, filters: &AddrFilters) -> Result<(), Error> {
123124
let str_filter = filters
124125
.iter()
125126
.filter(|f| f.filter_type == AddrFilterType::FILTER)
126127
.map(|filter| {
127-
let size = filter.to - filter.from;
128+
let size = filter.to - filter.from + 1;
128129
format!("filter {:#016x}/{:#016x} ", filter.from, size)
129130
})
130131
.reduce(|acc, s| acc + &s)

0 commit comments

Comments
 (0)