mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Don't swap the arguments to PyFrame_BlockSetup when recreating the recently
popped frame-block. What an embarrassing bug! Especially for Jeremy, since he accepted the patch :-) This fixes SF bugs #463359 and #462937, and possibly other, *very* obscure bugs with very deeply nested loops that continue the loop and then break out of it or raise an exception.
This commit is contained in:
parent
3d45d8f12e
commit
1ee6422111
1 changed files with 2 additions and 2 deletions
|
@ -2217,8 +2217,8 @@ eval_frame(PyFrameObject *f)
|
||||||
if (b->b_type == SETUP_LOOP && why == WHY_CONTINUE) {
|
if (b->b_type == SETUP_LOOP && why == WHY_CONTINUE) {
|
||||||
/* For a continue inside a try block,
|
/* For a continue inside a try block,
|
||||||
don't pop the block for the loop. */
|
don't pop the block for the loop. */
|
||||||
PyFrame_BlockSetup(f, b->b_type, b->b_level,
|
PyFrame_BlockSetup(f, b->b_type, b->b_handler,
|
||||||
b->b_handler);
|
b->b_level);
|
||||||
why = WHY_NOT;
|
why = WHY_NOT;
|
||||||
JUMPTO(PyInt_AS_LONG(retval));
|
JUMPTO(PyInt_AS_LONG(retval));
|
||||||
Py_DECREF(retval);
|
Py_DECREF(retval);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue