From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14974 invoked by alias); 10 Aug 2017 09:37:54 -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: 41519 Received: (qmail 19036 invoked by uid 1010); 10 Aug 2017 09:37:54 -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 5.334306 secs); 10 Aug 2017 09:37:54 -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=ham autolearn_force=no version=3.4.1 X-Envelope-From: kdudka@redhat.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2C00C52CD0 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=kdudka@redhat.com From: Kamil Dudka To: anyinteger@hush.ai Cc: zsh-workers@zsh.org Subject: Re: Segmentation fault Date: Thu, 10 Aug 2017 11:37:51 +0200 Message-ID: <41740877.pyrrDkaJgA@kdudka-nb> User-Agent: KMail/4.14.10 (Linux/4.9.34-gentoo; KDE/4.14.32; x86_64; ; ) In-Reply-To: <20170809214553.E32A1402C1@smtp.hushmail.com> References: <20170809214553.E32A1402C1@smtp.hushmail.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.26]); Thu, 10 Aug 2017 09:37:44 +0000 (UTC) On Wednesday, August 09, 2017 21:45:53 anyinteger@hush.ai 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. I reported a similar issue few months ago: http://www.zsh.org/mla/workers/2017/msg00623.html 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) Kamil