Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Segmentation fault
- X-seq: zsh-workers 41520
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Segmentation fault
- Date: Thu, 10 Aug 2017 11:38:35 +0100
- Cc: anyinteger@xxxxxxx
- Cms-type: 201P
- In-reply-to: <41740877.pyrrDkaJgA@kdudka-nb>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: Samsung Cambridge Solution Centre
- References: <20170809214553.E32A1402C1@smtp.hushmail.com> <CGME20170810093842epcas4p42bda0cf7ade9441e906ebea26cc02e0b@epcas4p4.samsung.com> <41740877.pyrrDkaJgA@kdudka-nb>
On Thu, 10 Aug 2017 11:37:51 +0200
Kamil Dudka <kdudka@xxxxxxxxxx> wrote:
> On Wednesday, August 09, 2017 21:45:53 anyinteger@xxxxxxx wrote:
> > Following code causes segmentation fault on zsh :
> >
> > func(){r;func}
> > func
>
> I guess this is just another instance of stack overflow caused by infinite
> shell recursion.
Almost certainly, yes.
> I am aware of two solutions:
>
> 1. reduce stack usage (compiler flags, move some data from stack to heap)
>
> 2. recompile zsh with --enable-max-function-depth set to some lower value
> (the default is 1000)
It's frustrating it's hard to do more than this. Some vague ideas were
floating around but it's right down at the OS interface which doesn't
give us quite the right sort of information for doing something about
this.
Of course, reducing the default recursion limit is possible but I have
no real feel for what the right compromise is, particularly as it can
affect different architectures / configurations in completely different
ways.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author