From db5860b7c71e4f65f347464933b6dacc303b3a74 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Sat, 17 Jul 2004 05:00:52 +0000 Subject: 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. --- Python/compile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Python/compile.c b/Python/compile.c index ca8dd26..5549e9f 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -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: -- cgit v0.12