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

Re: Segmentation Fault on Stack Overflow



On Jan 5,  9:33pm, Peter Stephenson wrote:
} Subject: Re: Segmentation Fault on Stack Overflow
}
} On Sun, 5 Jan 2014 17:58:31 +0000
} Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx> wrote:
} > It might be possible to do a little better by querying some of the
} > memory-related limits [...]
} 
} What's more, on Linux the resources useful here aren't actually reported by
} getrusage() at the moment.

We discussed this a bit back when we made --disable-max-function-depth.
It's just not the shell's responsibility to manage resources in this
much detail.  Zsh is hardly alone in this:

schaefer[543] bash
schaefer@burner:~$ inf() { inf; }; inf
zsh: segmentation fault (core dumped)  bash


The most I'd suggest is that we experiment with a MAX_FUNCTION_DEPTH
parameter that users could adjust when they have restrictive soft limits
or a small-memory host, etc.



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