bpo-15108: Prevent accessing the result tuple from Python in PySequence_Tuple#24510
Closed
pablogsal wants to merge 1 commit intopython:masterfrom
Closed
bpo-15108: Prevent accessing the result tuple from Python in PySequence_Tuple#24510pablogsal wants to merge 1 commit intopython:masterfrom
pablogsal wants to merge 1 commit intopython:masterfrom
Conversation
vstinner
reviewed
Feb 15, 2021
|
|
||
| // bpo-15108: Code can access the result tuple while being | ||
| // incomplete when calling PyIter_Next(). | ||
| PyObject_GC_UnTrack(result); |
Member
There was a problem hiding this comment.
I would prefer to add a new API to create an untracked tuple: https://bugs.python.org/issue15108#msg387029
Member
Author
There was a problem hiding this comment.
Let's discuss int the issue, then I can modify the PR :)
Contributor
|
FWIW: Traditionally any "crasher" that depended on gc.get_referrers was not considered a bug. These do not seem to affect "normal code" and are hard to fix without doing brain surgery to Python. |
Member
Author
|
Yeah, I have to say that I am not very convinced about this change because it also fixes a bigger problem only on one place. What worries me the most here is not using |
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.
https://bugs.python.org/issue15108