Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: unbounded recursive call in a shell script crashes zsh
- X-seq: zsh-workers 40960
- From: Kamil Dudka <kdudka@xxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: unbounded recursive call in a shell script crashes zsh
- Date: Wed, 12 Apr 2017 09:30:48 +0200
- Authentication-results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kdudka@xxxxxxxxxx
- Cc: zsh-workers@xxxxxxx
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 93E4651EED
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 93E4651EED
- In-reply-to: <170411191241.ZM5298@torch.brasslantern.com>
- 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
- References: <2960832.nVDpiBkaWZ@kdudka-nb> <1569411.Kln6y2GJnM@kdudka-nb> <170411191241.ZM5298@torch.brasslantern.com>
On Tuesday, April 11, 2017 19:12:41 Bart Schaefer wrote:
> In fact 4.3.11 running out of job table space means that it consumed
> all malloc() memory before consuming all of the stack;
I cannot confirm your hypothesis. In my testing environment, zsh-4.3.11
raised the error when the condition (newsize > MAX_MAXJOBS) in expandjobtab()
became true:
https://sourceforge.net/p/zsh/code/ci/zsh-4.3.11/tree/Src/jobs.c#l1735
At that time, the total amount of memory allocated by malloc() was 689120
bytes (<1 MiB) on an x86_64 machine with 16 GiB of physical memory.
> 5.3.1 is much better about heap footprint.
Definitely an improvement but it does not solve the problem in question.
Kamil
Messages sorted by:
Reverse Date,
Date,
Thread,
Author