Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [bug] busyloop upon $=var with NULs when $IFS contains both NUL and a byte > 0x7f



> On 30/11/2022 04:20 Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote
> On Tue, Nov 29, 2022 at 6:41 AM Peter Stephenson
> <p.w.stephenson@xxxxxxxxxxxx> wrote:
> >
> > I guess the obvious thing to do here is any time s doesn't move
> > give up splitting at that point.
> 
> I reported the infinite loop back in workers/50472 ("out of memory
> error" thread), although the cause doesn't appear to be exactly the
> same.
> 
> I suppose if s doesn't move we could forcibly advance to see if
> another possible split occurs later.  Unless there's clearly a way to
> determine that the lack of movement is due to upstream user error
> (such as invalid IFS value in this case)?

Engaging finger-in-the-air mode suggests in a case like this just trying
to be safe is the best we've got, unless we have proof positive we can
do something better in some likely scenario --- Jun may have a feel
for whether there's a potential good (as opposed to not completely
broken) outcome of the case he's looking at, in which case we can be
clever, otherwise I don't think it's worth it.

pws




Messages sorted by: Reverse Date, Date, Thread, Author