Commit db5860b7 authored by Tim Peters's avatar Tim Peters

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.
parent 8ff9f9f4
...@@ -419,6 +419,7 @@ optimize_code(PyObject *code, PyObject* consts, PyObject *names) ...@@ -419,6 +419,7 @@ optimize_code(PyObject *code, PyObject* consts, PyObject *names)
continue; continue;
SETARG(codestr, i, (j^1)); SETARG(codestr, i, (j^1));
codestr[i+3] = NOP; codestr[i+3] = NOP;
break;
/* Replace LOAD_GLOBAL/LOAD_NAME None with LOAD_CONST None */ /* Replace LOAD_GLOBAL/LOAD_NAME None with LOAD_CONST None */
case LOAD_NAME: case LOAD_NAME:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment