mirror of
https://github.com/python/cpython.git
synced 2024-11-28 08:20:55 +01: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
@ -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…
Reference in New Issue
Block a user