Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Removed arbitrary limitations on array accesses
- X-seq: zsh-workers 27574
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] Removed arbitrary limitations on array accesses
- Date: Wed, 6 Jan 2010 15:02:55 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=VzsFbCNzNvA2d5X2qCRhA/CORGWoLJUY9yo9hLKSUwM=; b=JDeELfKHB5mDkwVKh5TLOHDZeN2VWNHq9Y1INGsJP8HYNbobT3U1lSraZlqU7knRzf GTnFLnytTwT7qBLOdaPDk2Wtv+5meKkD+CnC3RAvRprvRzJCck1NED6WloKbgDTXyGmn qUYTuH+/gPZbL09mclyrGlojBPe8yA+jmsWSc=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=Rr0EEvaDoZX2uJnHPgJlU51CdVWT30KHP3v3kMbSQx+bJnTgWUAdXlc0y/gq1UFd60 r4FSoeH4efjdWISRQiAoU67oxL4afEx5BhuZeedM32j40nGEk/AbUq/Q5kuY7LwUZpvM /Gn8rZ08fwHkVGDusK776CL04zqcMLyatsvQo=
- In-reply-to: <CD9DD5CC-D5C7-4F9F-90F4-5039F535FABB@xxxxxxxxxxxxxxxx>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <1262655497-21263-1-git-send-email-michael.a.hwang@xxxxxxxxx> <20100105094829.613883ab@news01> <CD9DD5CC-D5C7-4F9F-90F4-5039F535FABB@xxxxxxxxxxxxxxxx>
2010/1/6 Duncan Sinclair <duncan.sinclair@xxxxxxxxxxxxxxxx>:
>
> 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@xxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author