[3.15] gh-154902: Type-check the SET_ADD operand - #155071
Conversation
|
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", |
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)) { |
There was a problem hiding this comment.
Thoughts on whether this should be CheckExact?
There was a problem hiding this comment.
missed that it applies here too , changed to CheckExact
|
|
I think that is an unrelated failure, looks like: |
Yeah, not related to this pr |
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