-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
There appears to be a typo in the optimizer_bytecodes
for _GUARD_BOTH_UNICODE
where the right operand is not getting checked:
cpython/Python/optimizer_bytecodes.c
Lines 163 to 169 in 5e73ece
op(_GUARD_BOTH_UNICODE, (left, right -- left, right)) { | |
if (sym_matches_type(left, &PyUnicode_Type) && | |
sym_matches_type(right, &PyUnicode_Type)) { | |
REPLACE_OP(this_instr, _NOP, 0 ,0); | |
} | |
sym_set_type(left, &PyUnicode_Type); | |
sym_set_type(left, &PyUnicode_Type); |
Original change from gh-118910:
N.b. I'm not very familiar with this part of the code-base and just happened to stumble upon this when studying through it; apologies if I misunderstood something 🙏
CPython versions tested on:
3.14, CPython main branch
Operating systems tested on:
No response
Linked PRs
Metadata
Metadata
Assignees
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error