[Python-bugs-list] [ python-Bugs-463359 ] Interpreter generates infinite loop
noreply@sourceforge.net
noreply@sourceforge.net
Mon, 24 Sep 2001 12:40:46 -0700
Bugs item #463359, was opened at 2001-09-20 15:11
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=463359&group_id=5470
Category: Python Interpreter Core
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Ken Lalonde (kenlalonde)
Assigned to: Thomas Wouters (twouters)
Summary: Interpreter generates infinite loop
Initial Comment:
The simple attached script loops forever when run
from the command line with no arguments.
It's as if the "break" statement transfers control back
to the start of the script.
Am I losing my mind, or is the interpreter?
My platform is sun/solaris 2.7/sparc,
Python 2.1.1 (#1, Aug 9 2001, 17:14:49)
[GCC 2.95.2 19991024 (release)] on sunos5
----------------------------------------------------------------------
>Comment By: Thomas Wouters (twouters)
Date: 2001-09-24 12:40
Message:
Logged In: YES
user_id=34209
Gah. found it. How embarrassing (as I suspected.) My only solace
is that Jeremy accepted the patch <wink>. The ugly hack of
re-creating the just-popped frame-block in the case of a continue
swapped the 'handler' and 'stacklevel' arguments to
PyBlock_BlockSetup! And any subsequent break or exception would
use the wrong handler and the wrong stack level to pop to.
Don't ask me *how* I found it; I'm afraid something will go wrong
with the fabric of space if I admit I found such an obscure bug
with such little effort :)
Fixed in revision 2.277 of Python/ceval.c.
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2001-09-20 15:16
Message:
Logged In: YES
user_id=6380
Another "continue-in-try" bug, or the same one?
Given to Thomas for review.
Broken in 2.2 as well.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=463359&group_id=5470