mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
optimize_code(): Repaired gross error in new special-casing for None.
The preceding case statement was missing a terminating "break" stmt, so fell into the new code by mistake. This caused uncaught out-of-bounds accesses to the "names" tuple, leading to a variety of insane behaviors.
This commit is contained in:
parent
8ff9f9f4aa
commit
db5860b7c7
1 changed files with 2 additions and 1 deletions
|
@ -419,7 +419,8 @@ optimize_code(PyObject *code, PyObject* consts, PyObject *names)
|
|||
continue;
|
||||
SETARG(codestr, i, (j^1));
|
||||
codestr[i+3] = NOP;
|
||||
|
||||
break;
|
||||
|
||||
/* Replace LOAD_GLOBAL/LOAD_NAME None with LOAD_CONST None */
|
||||
case LOAD_NAME:
|
||||
case LOAD_GLOBAL:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue