Repository navigation
fix(libc): resolve the read traps that refuse an untrapped access on macOS - #233
Merged
utkuhalis merged 1 commit intoDec 4, 2026
Merged
Conversation
…macOS A refused untrapped access left the traps over its range in place, so a host import over a large heap was refused for as long as any page in it stayed trapped. The refusal now queues those traps on the resolver thread without waiting, and a later access is granted once they are resolved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
|
Thanks, this closes the gap #226 left. Checked against the resolver:
Thanks for noting the overlap with boykopovar#26221. We'll reconcile it when that comes in with an upstream merge. I'll merge once CI is green; the macOS job is waiting for a runner and I'll rerun it if it gets cancelled. |
12 tasks done
12 tasks done
Collaborator
|
Merged, thanks! dag294-alt, this is on main now if you want to do the Wolverine rerun you mentioned on #226. |
12 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Follow-up to #226. On macOS, #226 refuses an untrapped access over read-trapped pages, but leaves the traps in place. A host import over a large heap is then refused for as long as any page in it stays trapped, and the driver falls back to copying through the CPU. In Grand Theft Auto V that stops the game:
Watch::BeginUntrappedstill refuses without waiting, but now queues the traps over the range on the resolver thread, so a later access is granted once they're resolved.The first access to a trapped range is still refused, so a copy can still happen before the traps are resolved.
Tested
macOS 27.2.1, Apple M5 Pro, x86-64 build under Rosetta 2 (AppleClang 21.0.0, Release):
write_watch_read-trap-untrappednow checks that a refusal queues the resolution without waiting for it, and that a retried access is granted afterwards with the resolved bytes in place. 500 runs out of 500 pass. Without the fix it times out.write_watch_*tests pass.python3 tools/debt_fold.py --checkandpython3 tools/check_conventions.py --base origin/mainpass.libc.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code