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

Re: Segfaulting script

Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>:
> On Jun 16,  1:03pm, Frank Terbeck wrote:
> }
> } I don't know if this is the same bug, but it might be closely related:
> } 
> } [snip]
> } % zsh -f
> } % testfunc() { local foo=() ; local bar }
> You can't assign values to an array in a "local" statement.  When zsh
> parses the above, it's seeing

Yes, I know that the assignment does not make sense.

> which (of course) is a recursive call to the newly-created function
> "local".  I don't get a segfault with 4.3.2-dev-1, I get an error:
> zsh% local
> local:10: maximum nested function level reached
> zsh% 


> The fact that "compinit" or a completion comes next is a red herring; any
> function that used "local" would cause the error.

Thanks for clarifying that.

> My guess would be that you get a segfault when the compile-time setting
> of the maximum function depth is large enough that you run out of memory
> before the limit is hit.  There's not a whole lot we can do about that.

Hm, definitely no nice, but I trust your judgement.

Regards, Frank

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