We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d59518d commit 02df2b1Copy full SHA for 02df2b1
src/tools/miri/src/shims/trace/parent.rs
@@ -566,11 +566,12 @@ fn handle_segfault(
566
567
// Check if we also own the next page, and if so unprotect it in case
568
// the access spans the page boundary.
569
- if ch_pages.contains(&page_addr.strict_add(page_size)) {
570
- ptrace::write(pid, (&raw const PAGE_COUNT).cast_mut().cast(), 2).unwrap();
+ let flag = if ch_pages.contains(&page_addr.strict_add(page_size)) {
+ 2
571
} else {
572
- ptrace::write(pid, (&raw const PAGE_COUNT).cast_mut().cast(), 1).unwrap();
573
- }
+ 1
+ };
574
+ ptrace::write(pid, (&raw const PAGE_COUNT).cast_mut().cast(), flag).unwrap();
575
576
ptrace::setregs(pid, new_regs).unwrap();
577
0 commit comments