[3.15] gh-154902: Type-check the SET_ADD operand - #155071
Open
deadlovelll wants to merge 3 commits into
Open
Conversation
Contributor
Author
|
Looked at the checks, I think these are flakes. Could someone with the rights rerun the failed jobs? |
| // gh-154902: user code can rebind __conditional_annotations__ | ||
| if (!PySet_Check(set_o)) { | ||
| _PyErr_Format(tstate, PyExc_TypeError, | ||
| "__conditional_annotations__ must be a set, not %T", |
Member
There was a problem hiding this comment.
Error message shouldn't mention __conditional_annotations__ as this is a generic opcode (though probably the only way this is reachable is through __conditional_annotations__).
| int err = _PySet_AddTakeRef((PySetObject *)PyStackRef_AsPyObjectBorrow(set), | ||
| PyObject *set_o = PyStackRef_AsPyObjectBorrow(set); | ||
| // gh-154902: user code can rebind __conditional_annotations__ | ||
| if (!PySet_Check(set_o)) { |
Member
There was a problem hiding this comment.
Thoughts on whether this should be CheckExact?
Contributor
Author
There was a problem hiding this comment.
missed that it applies here too , changed to CheckExact
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.
Type-check the SET_ADD operand
This is an alternative version of fix for #154902, but dedicated to 3.15 and 3.14 only, because we cant change bytecode here
__conditional_annotations__crashes the interpreter #154902