forked from solana-labs/rbpf
-
Notifications
You must be signed in to change notification settings - Fork 37
Refactor - AccessViolationHandler #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
b8f4a7d to
3cd5b10
Compare
LucasSte
previously approved these changes
May 14, 2025
I didn't mean to approve it. It was supposed to be a comment only.
09698f7 to
67065d3
Compare
LucasSte
reviewed
May 15, 2025
67065d3 to
85ce712
Compare
LucasSte
reviewed
May 16, 2025
LucasSte
approved these changes
May 16, 2025
c74ef53 to
f26d6c8
Compare
LucasSte
reviewed
May 30, 2025
8e597c0 to
601541c
Compare
LucasSte
reviewed
Jun 5, 2025
LucasSte
reviewed
Jun 10, 2025
601541c to
1c70214
Compare
LucasSte
approved these changes
Jun 13, 2025
…t overlap with existing ones.
1b62378 to
7290638
Compare
LucasSte
approved these changes
Jul 10, 2025
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.
Currently the
MemoryCowCallbackis only invoked when an access is completely contained within a region marked as CoW. Furthermore, it automatically removes the CoW marking and the region will become a normal writable region, meaning the next access will not invoke theMemoryCowCallbackanymore.This PR switches to a model which is closer to
SIGSEGVin other operating systems: It is invoked on every failed access and the handler the access type, location and length passed in and is also responsible for adjusting the memory regions. The memory region which has the next lowest starting virtual address, as well as the virtual address space available to that region, is also supplied as that is typically of interest and has been found already.