[Python-Dev] 2.4 & 2.5 beta 3 crash (original) (raw)

James Y Knight foom at fuhm.net
Thu Aug 17 07:49:04 CEST 2006


On Aug 17, 2006, at 1:26 AM, Neal Norwitz wrote:

Thanks Dino.

The attached patch should fix the problem. Once RC1 is cut, I'll check this in unless someone beats me to it. Since the compiler changed, I can't backport this. If someone wants to make a similar fix for 2.4 go for it.

The attached patch is incorrect. It breaks the following perfectly
valid code. Probably what would be right is to move (with appropriate
changes) the while loop in the FINALLY_TRY case to outside the entire
switch statement. Thus, if LOOP is reached, yay, add the jump, return
success. If the FINALLY_END is reached first, boo, fail. If it's a
FINALLY_TRY or EXCEPT, continue the loop.

def test(): try: pass finally: for abc in range(10): continue

James



More information about the Python-Dev mailing list