File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/shims/native_lib/trace Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -389,7 +389,13 @@ fn capstone_find_events(
389
389
// FIXME: This could be made certain; either determine all cases where
390
390
// only reads happen, or have an intermediate mempr_* function to first
391
391
// 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.
393
399
acc_events. push ( AccessEvent :: Write ( push, !acc_ty. is_readable ( ) ) ) ;
394
400
}
395
401
You can’t perform that action at this time.
0 commit comments