mirror of
https://github.com/python/cpython.git
synced 2025-09-08 01:41:19 +00:00
Shuffle premature decref; nuke unreachable code block.
Fixes the "debug-build -O test_builtin.py and no test_b2.pyo" crash just discussed on Python-Dev.
This commit is contained in:
parent
5dd7362295
commit
1e542110f9
1 changed files with 3 additions and 9 deletions
|
@ -2154,15 +2154,9 @@ com_test(struct compiling *c, node *n)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
symtable_exit_scope(c->c_symtable);
|
symtable_exit_scope(c->c_symtable);
|
||||||
if (co == NULL) {
|
i = com_addconst(c, co);
|
||||||
c->c_errors++;
|
closure = com_make_closure(c, (PyCodeObject *)co);
|
||||||
i = 255;
|
Py_DECREF(co);
|
||||||
closure = 0;
|
|
||||||
} else {
|
|
||||||
i = com_addconst(c, co);
|
|
||||||
Py_DECREF(co);
|
|
||||||
closure = com_make_closure(c, (PyCodeObject *)co);
|
|
||||||
}
|
|
||||||
com_addoparg(c, LOAD_CONST, i);
|
com_addoparg(c, LOAD_CONST, i);
|
||||||
com_push(c, 1);
|
com_push(c, 1);
|
||||||
if (closure)
|
if (closure)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue