-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
gh-128182: Add per-object memory access synchronization to ctypes
#128490
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
24 commits
Select commit
Hold shift + click to select a range
3bb21ff
Lock pointer reads and writes in ctypes.
ZeroIntensity 8c4c49a
Add a test.
ZeroIntensity da293c1
Fix the test.
ZeroIntensity d01b757
Add blurb.
ZeroIntensity 8bb980f
Add a lock for generic helper functions.
ZeroIntensity d60f2e2
Add documentation note.
ZeroIntensity de4c4ea
Fix compiler warning on GIL-ful builds.
ZeroIntensity 23d8e21
Fix MSVC compiler warnings.
ZeroIntensity bdee2b2
Fix MSVC compiler warnings (actually this time)
ZeroIntensity 9f272d9
Apply suggestions from code review
ZeroIntensity 32a885f
Fix Sphinx code block.
ZeroIntensity 1c92b4b
Flatten call to PyUnicode_AsWideChar
ZeroIntensity ff34cc2
Fix lock.
ZeroIntensity 804f1b6
Fix indentation.
ZeroIntensity bae3c5b
Revert "Flatten call to PyUnicode_AsWideChar"
ZeroIntensity d720d9a
Properly flatten call to PyUnicode_AsWideChar
ZeroIntensity 04b3252
Fix indentation.
ZeroIntensity 6401bbc
Clarify comment
ZeroIntensity 9d35e86
Switch to critical sections.
ZeroIntensity ce94234
Update test_arrays.py
ZeroIntensity d6a4bc8
Update Doc/library/ctypes.rst
ZeroIntensity 5a4c1d6
Update Modules/_ctypes/_ctypes.c
ZeroIntensity 774a6ec
Update Modules/_ctypes/_ctypes.c
ZeroIntensity c8f2cd3
Remove silly seealso.
ZeroIntensity 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 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 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/Library/2025-01-04-11-32-46.gh-issue-128182.SJ2Zsa.rst
This file contains 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 @@ | ||
Fix crash when using :mod:`ctypes` pointers concurrently on the :term:`free | ||
threaded <free threading>` build. |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is orthogonal but whenever I review FT PRs, we always use
:term:`free threaded `
. I believe we can add a new term forfree threaded
which points to free threading so that we can reduce the docs burden.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A
free threaded
term sounds like a good idea, but that should probably be in a larger follow-up PR. I'll play around with the wording here though.