Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh-3.0-pre2 cores on irix 5.3 (?)
- X-seq: zsh-workers 1556
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: schaefer@xxxxxxx
- Subject: Re: zsh-3.0-pre2 cores on irix 5.3 (?)
- Date: Mon, 8 Jul 1996 02:57:47 +0200 (MET DST)
- Cc: andreas.koenig@xxxxxxxxxxxxxxxxxxxxx, zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <960707091640.ZM4171@xxxxxxxxxxxxxxxxxxxxxxx> from Bart Schaefer at "Jul 7, 96 09:16:34 am"
> Turns out that "source" or "." inside any shell function will trigger
> that BUG warning, which isn't really a bug at all -- it's doshfunc()
> calling loop() recursively, so the allocation stack depth reflects the
> depth of recursion.
The allocation stack can be deeper than locallevel in loop() when source
is used inside a command substitution or when source is called from a
trap. So the patch below is more correct that Bart's patch. Note that
in the main top level loop alloc_stackp should always be zero.
Zoltan
rcsdiff -qc -kk -r2.23 -r2.24 Src/init.c
*** Src/init.c
--- Src/init.c 1996/07/07 16:03:48 2.24
***************
*** 101,106 ****
--- 101,109 ----
loop(int toplevel)
{
List list;
+ #ifdef DEBUG
+ int oasp = toplevel ? 0 : alloc_stackp;
+ #endif
pushheap();
for (;;) {
***************
*** 128,134 ****
if (toplevel)
noexitct = 0;
}
! DPUTS(alloc_stackp, "BUG: alloc_stackp != 0 in loop()");
if (ferror(stderr)) {
zerr("write error", NULL, 0);
clearerr(stderr);
--- 131,137 ----
if (toplevel)
noexitct = 0;
}
! DPUTS(alloc_stackp != oasp, "BUG: alloc_stackp changed in loop()");
if (ferror(stderr)) {
zerr("write error", NULL, 0);
clearerr(stderr);
Messages sorted by:
Reverse Date,
Date,
Thread,
Author