Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Infinite loop (bug in wordcode evaluation?)
- X-seq: zsh-workers 9548
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: Infinite loop (bug in wordcode evaluation?)
- Date: Thu, 3 Feb 2000 17:40:22 +0000
- In-reply-to: <200001311204.NAA01734@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <200001311204.NAA01734@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
On Jan 31, 1:04pm, Sven Wischnowsky wrote:
} Subject: Re: Infinite loop (bug in wordcode evaluation?)
}
}
} Bart Schaefer wrote:
}
} > function hang() {
} > emulate -L zsh
} > trap return HUP INT QUIT
} > for ((i=0; 1; i=0)) do
} > tmp=()
} > vared -p "Type ^C here: " tmp
} > done
} > }
} >
} > If you interrupt this with ^C, 3.1.6-dev.16 goes into a loop repeatedly
} > evaluating the "for" expressions on an empty loop body. The "trap" is
} > important.
}
} The problem is that none of the functions in loop.c check if retflag
} is set and hence don't return. But this was not changed by the
} wordcode stuff -- and a older zsh without that I have here behaves
} the same. In fact, I think that zsh behaved this way either always or
} for a long time.
I can't find any loop construct in 3.0.7 that produces this behavior,
yet 3.0.7 does not have any of those extra retflag tests in loop.c.
Does anyone know what else might have changed to cause this problem?
I want to understand it so that I don't leave a bug in 3.0.8.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author