From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14803 invoked by alias); 12 Apr 2017 07:30:48 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 40960 Received: (qmail 6794 invoked from network); 12 Apr 2017 07:30:48 -0000 X-Qmail-Scanner-Diagnostics: from mx1.redhat.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.132.183.28):SA:0(-5.0/5.0):. Processed in 0.731976 secs); 12 Apr 2017 07:30:48 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: kdudka@redhat.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf1.redhat.com designates 209.132.183.28 as permitted sender) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 93E4651EED 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@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 93E4651EED From: Kamil Dudka To: Bart Schaefer Cc: zsh-workers@zsh.org Subject: Re: unbounded recursive call in a shell script crashes zsh Date: Wed, 12 Apr 2017 09:30:48 +0200 Message-ID: <2420758.31stuSQeAV@kdudka-nb> User-Agent: KMail/4.14.10 (Linux/4.9.16-gentoo; KDE/4.14.29; x86_64; ; ) In-Reply-To: <170411191241.ZM5298@torch.brasslantern.com> References: <2960832.nVDpiBkaWZ@kdudka-nb> <1569411.Kln6y2GJnM@kdudka-nb> <170411191241.ZM5298@torch.brasslantern.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 12 Apr 2017 07:30:40 +0000 (UTC) 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