[Python-Dev] KeyboardInterrupt on Windows

Michael Hudson mwh@python.net
Fri, 30 May 2003 22:22:32 +0100


Jeremy Hylton <jeremy@zope.com> writes:

> It's probably an unintended consequence of the "while 1" optimization
> and the fast-next-opcode optimization.  "while 1" doesn't do a test at
> runtime anymore.  And opcodes like JUMP_ABSOLUTE bypass the test for
> pending exceptions.  The next result is that while 1: pass puts the
> interpreter in a tight loop doing a JUMP_ABSOLUTE that goes nowhere. 
> That is offset X has JUMP_ABSOLUTE X.
>
> I'd be inclined to call this a bug, but I'm not sure how to fix it.

Take out the while 1: optimizations?  I don't want to belittle
Raymond's efforts, but I am conscious of[1] Tim's repeated
observations of the correlation between the number of optimizations in
the compiler and the number of weird bugs therein.

Cheers,
M.

[1] I'm also warming up for a end-of-PyPy-sprint drunken hacking
    session so you probably shouldn't take me too seriously :-)

-- 
  ARTHUR:  Why should a rock hum?
    FORD:  Maybe it feels good about being a rock.
                    -- The Hitch-Hikers Guide to the Galaxy, Episode 8