-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-118209: Add structured exception handling to mmap module #118213
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
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
4013627
add structured exception handling to mmap_read_method
Dobatymo 6484134
📜🤖 Added by blurb_it.
blurb-it[bot] 71218d2
adjust indentation
Dobatymo cd4b1fc
restructure to use safe_memcpy to avoid memory leak
Dobatymo cb1ef19
Apply suggestions from code review
Dobatymo 448fa90
fix passing dest as pointer in mmap_read_byte_method
Dobatymo ba96163
use PyBytes_AS_STRING instead of raw access
Dobatymo f97d213
handle mmap_write_method
Dobatymo 7983869
handle mmap_write_byte_method
Dobatymo c0bd57b
add safe_byte_copy, safe_memmove, safe_memchr, safe_copy_from_slice a…
Dobatymo 92f4bf0
improve macro
Dobatymo 364d846
Update Modules/mmapmodule.c
Dobatymo 04dc2d9
handle EXCEPTION_ACCESS_VIOLATION
Dobatymo 0654f9b
fix formatting
Dobatymo d3661ff
use PyBytes_FromStringAndSize instead of extracting the optization
Dobatymo 30aa64b
update news entry
Dobatymo b809ce9
Update Misc/NEWS.d/next/Windows/2024-04-24-05-16-32.gh-issue-118209.R…
Dobatymo e907e6d
updated whatsnew entry
Dobatymo d1ad0ab
fix typo
Dobatymo 2ca440d
fix handling some cases in mmap_subscript
Dobatymo f7c356c
add test using private function
Dobatymo 0d70108
Update Lib/test/test_mmap.py
Dobatymo 6f1f726
run test in subprocess
Dobatymo 05e8ca0
add expected failure for find method
Dobatymo 29b12bf
disable faulthandler
Dobatymo 59e8c4e
typo
Dobatymo 4f610a5
trailing blanks
Dobatymo aa2b41d
Update Lib/test/test_mmap.py
Dobatymo 11fa04a
add asserts to tests
Dobatymo f02c83a
Update Lib/test/test_mmap.py
Dobatymo 8533af5
support mmap_gfind
Dobatymo 6aeaa32
aesthetics
Dobatymo 9737f22
Apply suggestions from code review
Dobatymo 12fb561
remove restrict for compliance with the python C dialect
Dobatymo 880a9c0
Update Modules/mmapmodule.c
Dobatymo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
2 changes: 2 additions & 0 deletions
2
Misc/NEWS.d/next/Windows/2024-04-24-05-16-32.gh-issue-118209.Ryyzlz.rst
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Avoid crashing in :mod:`mmap` on Windows when the mapped memory is inaccessible | ||
due to file system errors or access violations. |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.