Skip to content

Commit b9e4399

Browse files
committed
doc for certain write
1 parent 0d08f96 commit b9e4399

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/shims/native_lib/trace/parent.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,13 @@ fn capstone_find_events(
389389
// FIXME: This could be made certain; either determine all cases where
390390
// only reads happen, or have an intermediate mempr_* function to first
391391
// map the page(s) as readonly and check if a segfault occurred.
392-
// If this did a read as well, it's possible the write didn't happen.
392+
393+
// Per https://docs.rs/iced-x86/latest/iced_x86/enum.OpAccess.html,
394+
// we know that the possible access types are Read, CondRead, Write,
395+
// CondWrite, ReadWrite, and ReadCondWrite. Since we got a segfault
396+
// we know some kind of access happened so Cond{Read, Write}s are
397+
// certain reads and writes; the only uncertaintly is with an RW op
398+
// as it might be a ReadCondWrite with the write condition unmet.
393399
acc_events.push(AccessEvent::Write(push, !acc_ty.is_readable()));
394400
}
395401

0 commit comments

Comments
 (0)