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 079ce3d commit 13e351fCopy full SHA for 13e351f
src/shims/trace/parent.rs
@@ -582,11 +582,12 @@ fn handle_segfault(
582
583
// Check if we also own the next page, and if so unprotect it in case
584
// the access spans the page boundary.
585
- if ch_pages.contains(&page_addr.strict_add(page_size)) {
586
- 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
587
} else {
588
- ptrace::write(pid, (&raw const PAGE_COUNT).cast_mut().cast(), 1).unwrap();
589
- }
+ 1
+ };
590
+ ptrace::write(pid, (&raw const PAGE_COUNT).cast_mut().cast(), flag).unwrap();
591
592
ptrace::setregs(pid, new_regs).unwrap();
593
0 commit comments