zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: Re: zsh glitch
Date: Wed, 11 Nov 2015 09:36:17 +0000	[thread overview]
Message-ID: <20151111093617.7c9d4fdd@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <CAHYJk3S7oHyibz7iLKFuG8eTHhrVMWWiYEFDQnR1asw=1Y9nxw@mail.gmail.com>

On Tue, 10 Nov 2015 22:43:20 +0100
Mikael Magnusson <mikachu@gmail.com> wrote:
> If it segfaults here, it's either because you're running an old
> version or the compiler miscompiled, or the zsh code disagrees with
> the compiler about what can be optimized out. What should happen is
> the following:
> 
> % (ls(); ls; ls)
> ls:1: maximum nested function level reached

It's basically luck whether you hit the maximum recursion depth before
you run out of stack (and hence crash) or not.  There's no easy way for
the shell to tell when this is going to happen, so it's very system
dependent.

The only better way out I can see is for someone with a wider knowledge
of the sort of systems they're compiling zsh for to attempt a more
appropriate configuration with --enable-max-function-depth=MAX.
The default is 1000; a nice round number that works in a lot of places
is about the best we can do generally.  For general purpose Linux
distributions I suspect that statement continues to apply.

pws


  reply	other threads:[~2015-11-11  9:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-10 21:36 Lane Erickson
2015-11-10 21:43 ` Mikael Magnusson
2015-11-11  9:36   ` Peter Stephenson [this message]
2015-11-12 15:48   ` Christian Neukirchen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151111093617.7c9d4fdd@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).