From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15814 invoked by alias); 5 Jan 2014 22:12:17 -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: 32236 Received: (qmail 22620 invoked from network); 5 Jan 2014 22:12:02 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <140105141208.ZM10797@torch.brasslantern.com> Date: Sun, 05 Jan 2014 14:12:08 -0800 In-reply-to: <20140105213341.71d16903@pws-pc.ntlworld.com> Comments: In reply to Peter Stephenson "Re: Segmentation Fault on Stack Overflow" (Jan 5, 9:33pm) References: <3540501074823477909@gmail297201516> <87d2k8y6wn.fsf@ft.bewatermyfriend.org> <878uuwy0vk.fsf@ft.bewatermyfriend.org> <20140105175831.4640d8a5@pws-pc.ntlworld.com> <20140105213341.71d16903@pws-pc.ntlworld.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: "Zsh Hackers' List" Subject: Re: Segmentation Fault on Stack Overflow MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Jan 5, 9:33pm, Peter Stephenson wrote: } Subject: Re: Segmentation Fault on Stack Overflow } } On Sun, 5 Jan 2014 17:58:31 +0000 } Peter Stephenson wrote: } > It might be possible to do a little better by querying some of the } > memory-related limits [...] } } What's more, on Linux the resources useful here aren't actually reported by } getrusage() at the moment. We discussed this a bit back when we made --disable-max-function-depth. It's just not the shell's responsibility to manage resources in this much detail. Zsh is hardly alone in this: schaefer[543] bash schaefer@burner:~$ inf() { inf; }; inf zsh: segmentation fault (core dumped) bash The most I'd suggest is that we experiment with a MAX_FUNCTION_DEPTH parameter that users could adjust when they have restrictive soft limits or a small-memory host, etc.