From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 333 invoked by alias); 6 Jan 2010 14:03:06 -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: 27574 Received: (qmail 21303 invoked from network); 6 Jan 2010 14:03:05 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VERIFIED autolearn=ham version=3.2.5 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.219.220 as permitted sender) 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= MIME-Version: 1.0 In-Reply-To: References: <1262655497-21263-1-git-send-email-michael.a.hwang@gmail.com> <20100105094829.613883ab@news01> Date: Wed, 6 Jan 2010 15:02:55 +0100 Message-ID: <237967ef1001060602q7b95e74dq332464de6ce3f34b@mail.gmail.com> Subject: Re: [PATCH] Removed arbitrary limitations on array accesses From: Mikael Magnusson To: zsh-workers@zsh.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2010/1/6 Duncan Sinclair : > > On 5 Jan 2010, at 9:48 am, Peter Stephenson wrote: > >> On Mon, 4 Jan 2010 20:38:17 -0500 >> Michael Hwang wrote: >>> >>> This issue was brought up on IRC. It appears that while there is no lim= it >>> 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 =3Dsomething and wondering why it uses a lo= t 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 an= d > hit tab, the shell would either hang for a long time or crash (out of > memory). > > % 99999999999 > > I reported this as a bug =E2=80=93 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. --=20 Mikael Magnusson