zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: zsh-workers@zsh.org
Subject: Re: [PATCH] Removed arbitrary limitations on array accesses
Date: Wed, 6 Jan 2010 15:02:55 +0100	[thread overview]
Message-ID: <237967ef1001060602q7b95e74dq332464de6ce3f34b@mail.gmail.com> (raw)
In-Reply-To: <CD9DD5CC-D5C7-4F9F-90F4-5039F535FABB@cis.strath.ac.uk>

2010/1/6 Duncan Sinclair <duncan.sinclair@cis.strath.ac.uk>:
>
> On 5 Jan 2010, at 9:48 am, Peter Stephenson wrote:
>
>> On Mon,  4 Jan 2010 20:38:17 -0500
>> Michael Hwang <michael.a.hwang@gmail.com> wrote:
>>>
>>> This issue was brought up on IRC. It appears that while there is no limit
>>> on
>>> how many array elements can be stored, there is a limit to how many can
>>> be
>>> accessed. This patch removes these limits.
>>
>> Those have been there for a long time.  I don't have any evidence that
>> they're doing a lot of good but we have had people creating positional
>> parameters with <long_number>=something and wondering why it uses a lot of
>> memory.  I suppose this is similar.  The arbitrary limit is not very
>> useful and also undocumented; most people wouldn't miss it if it wasn't
>> there, certainly.
>
> IIRC, the problem was that is you typed a big number at the zsh prompt and
> hit tab, the shell would either hang for a long time or crash (out of
> memory).
>
> % 99999999999<tab>
>
> I reported this as a bug – the shell should not crash so easily.
>
> There is probably a way of preventing this problem though without putting
> arbitrary limits on the size of array indices.

There are other similar ways you can crash a shell anyway,
alt-111111111111 1 and `yes` for example. I'm not sure if it's worth
trying to fix all of them.

-- 
Mikael Magnusson


  reply	other threads:[~2010-01-06 14:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-05  1:38 Michael Hwang
2010-01-05  9:48 ` Peter Stephenson
2010-01-05 15:32   ` Bart Schaefer
2010-01-05 15:43     ` Mikael Magnusson
2010-01-05 20:48     ` Geoff Wing
2010-01-06 13:42   ` Duncan Sinclair
2010-01-06 14:02     ` Mikael Magnusson [this message]
2010-01-06 17:03       ` Richard Hartmann

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=237967ef1001060602q7b95e74dq332464de6ce3f34b@mail.gmail.com \
    --to=mikachu@gmail.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).