From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13881 invoked by alias); 12 Apr 2017 02:12:29 -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: 40959 Received: (qmail 4029 invoked from network); 12 Apr 2017 02:12:29 -0000 X-Qmail-Scanner-Diagnostics: from mail-vk0-f44.google.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.85.213.44):SA:0(-2.8/5.0):. Processed in 1.062628 secs); 12 Apr 2017 02:12:29 -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=-2.8 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.213.44 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject:cc :mime-version; bh=Zj58sCN/X3JlSkXB0gnKx2AZ+IE90NJBJA80cEGJcw8=; b=F8OqLSaCa1Y1Vx+506GPuA0aOLtU/gqOhaD2iSeZ642zTKt7mudAi6nqf+h+Ex43GD WbEl6Hml5EdBmHNCD2LUxQyN6p9ygHXdiaoQ2n0trLlfG9c+gMRcVBC8sNu7pzVyvIrY v4wLCY0HMa0Mmjxia7QVHcAN5ifSKcdoCs/0kiwG0JpiYddAmBAv2HS3aYnCJzqBFCFr bDH1T6d5j0ftdynnVelDqTwhpCVC4+JA1NTeYCmf3ZZBTCA4y1aFzyxN6pYXeRafSoNd y4i3XuDVSUF9cgX4eyWoeO6aYV6csjGNHqzSXtqoWrBxoH99YNzUev5noFgXgXgqllMR 992w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:cc:mime-version; bh=Zj58sCN/X3JlSkXB0gnKx2AZ+IE90NJBJA80cEGJcw8=; b=ssUuQlJ/CbZMjug+pZb/9Hgr12X/FoRSawcH4fekEzC6Q+RtgZ/we9YvuPkdi3ydTh ckyoZtAo6tK8D4IkcEhahk4xQ/1OuJ7desVOk8n+1iYHWNoMWF5KNFmryeB7aL91ODYI kne182zYRRkJxcA9MNm9WKLyNk6CPPp/ByElKwL2ZtT7GNvQfZXrmdi7xIBidj+TBesd EyBSNZBHV3co7yLT2rehcSYoOxeI36BpKIO/OBTOglR0yBW2outIYlPXAirN5wnHv4HO Ba/GYg4qSSu2abWFtmq2/m5KGgRt2jD1veSfTAeIzL/E11MmQvlGq5hi1Lb+zll05xDj Gk/w== X-Gm-Message-State: AN3rC/7tCwPRx9/kN0VF3hr6rNespFzs3AM0NUePpgaK3Xzj1vLiJURYSxa30waaGKaR9w== X-Received: by 10.31.50.77 with SMTP id y74mr291646vky.131.1491963141864; Tue, 11 Apr 2017 19:12:21 -0700 (PDT) From: Bart Schaefer Message-Id: <170411191241.ZM5298@torch.brasslantern.com> Date: Tue, 11 Apr 2017 19:12:41 -0700 In-Reply-To: <1569411.Kln6y2GJnM@kdudka-nb> Comments: In reply to Kamil Dudka "Re: unbounded recursive call in a shell script crashes zsh" (Apr 11, 4:38pm) References: <2960832.nVDpiBkaWZ@kdudka-nb> <1569411.Kln6y2GJnM@kdudka-nb> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Kamil Dudka Subject: Re: unbounded recursive call in a shell script crashes zsh Cc: "Zsh Hackers' List" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Apr 11, 4:38pm, Kamil Dudka wrote: } } So the difference is caused by the fact that recent versions of zsh are } more hungry on stack, so the stack allocation limit is exceeded before the } shell call recursion limit is reached. Actually more recent versions should be *less* hungry because we no longer use alloca() as the default for many local arrays (unless your zsh was compiled with --enable-stack-allocation). However, a LOT has changed since 4.3.11. For example the warning about "recursion limit exceeded" is from an entirely different part of the code than "maximum nested function" -- the limit that was being hit in 4.3.11 is never reached with 5.3.1, so there's no way to tell whether the older version might also have overflowed the stack. In fact 4.3.11 running out of job table space means that it consumed all malloc() memory before consuming all of the stack; 5.3.1 is much better about heap footprint.