Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Segfaulting script
- X-seq: zsh-workers 22495
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Segfaulting script
- Date: Sat, 17 Jun 2006 10:11:17 -0700
- In-reply-to: <20060616110319.GB2780@xxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20060613231505.GA23239@xxxxxxxxxxxx> <20060616110319.GB2780@xxxxxxxxxxxxxxx>
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
local
foo=
() <-- empty parens means we're defining a function!
;
local
bar
The result is that you define both "local" and "foo=" as the names of
functions, each of which has the function body
local bar
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.
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author