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

Re: [BUG] Redirect between two parameter assignments causes misbehaviour

dana wrote on Sun, 10 Dec 2017 18:19 -0600:
> One more before i forget. Someone found this on IRC today and it puzzled us.

Thanks for bringing this to the list.

> Though it seems that certain interactions with other code can be quite serious.
> If i run this without -f, something in my profile causes this series of commands
> to hard-lock zsh with 100% CPU. Entering the first command and then the second
> one separately avoids this lock-up. Unfortunately `set -x` didn't reveal
> anything and i don't have any more time to look at it today, but i thought i'd
> mention it.

It's spinning in the 'while (1)' in gettext2() on WC_END.

If I change the definition of WC_END to 0 then it hits the 'default'
branch of the case, returns from gettext2(), and doesn't spin.

Without having looked any further into it, I wonder whether we should
change WC_END to zero, so if we ever calloc() something and forget to
initialise it, it won't be mistaken for valid data.

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