zsh-workers
 help / color / mirror / code / Atom feed
From: Vincent Lefevre <vincent@vinc17.net>
To: zsh-workers@zsh.org
Subject: Re: segmentation fault with {1..1234567}
Date: Mon, 7 Jul 2014 03:12:06 +0200	[thread overview]
Message-ID: <20140707011206.GA3168@xvii.vinc17.org> (raw)
In-Reply-To: <140706091609.ZM18865@torch.brasslantern.com> <140706124600.ZM19572@torch.brasslantern.com>

On 2014-07-06 12:46:00 -0700, Bart Schaefer wrote:
> On Jul 6,  2:09am, Vincent Lefevre wrote:
> }
> } I've reported the bug on the Debian BTS:
> } 
> }   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=753906
> 
> Does that actually help?  Will they fix it without an upstream patch?

Since you couldn't reproduce the problem, it could have been dependent
on configure options (another problem is that zsh doesn't have a BTS,
so that it becomes difficult to track bugs).

On 2014-07-06 09:16:09 -0700, Bart Schaefer wrote:
> On Jul 6,  1:39am, Vincent Lefevre wrote:
> } Subject: Re: segmentation fault with {1..1234567}
> }
> } On 2014-07-05 09:57:03 -0700, Bart Schaefer wrote:
> } > 
> } > Then it's probably a per-process resource limit problem.
> } 
> } No, I don't have any per-process limitation on the memory.
> 
> Apparently, though, you may have one on stack space.

There is always a limit. Since it is not possible to detect
allocation failures for the stack, it means that to avoid
random crashes, processes should pre-allocate memory there
and be written in such a way that they don't use more than
pre-allocated. The pre-allocated memory should not be too small,
but should not be too large either, otherwise the memory will
be exhausted too easily.

So, the 8MB default limit for GNU/Linux is very reasonable,
in particular taking into account the fact that a small part
is pre-allocated.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


  reply	other threads:[~2014-07-07  1:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-04 17:25 Vincent Lefevre
2014-07-05  1:40 ` Bart Schaefer
2014-07-05 11:12   ` Vincent Lefevre
2014-07-05 16:57     ` Bart Schaefer
2014-07-05 23:39       ` Vincent Lefevre
2014-07-06  0:09         ` Vincent Lefevre
2014-07-06 19:46           ` Bart Schaefer
2014-07-07  1:12             ` Vincent Lefevre [this message]
2014-07-06 16:16         ` Bart Schaefer
2014-07-06 18:30           ` Peter Stephenson
2014-07-06 19:46             ` Bart Schaefer
2014-07-06 22:23               ` Mikael Magnusson
2014-07-07 19:33               ` Peter Stephenson
2014-07-08  1:08                 ` Bart Schaefer
2014-07-08 10:38                   ` Peter Stephenson
2014-07-24  9:44                     ` Peter Stephenson
2014-07-24 15:35                       ` Bart Schaefer

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=20140707011206.GA3168@xvii.vinc17.org \
    --to=vincent@vinc17.net \
    --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).