From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23949 invoked by alias); 23 Apr 2012 16:45:52 -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: 30452 Received: (qmail 691 invoked from network); 23 Apr 2012 16:45:50 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.160.43 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=NexGt8MRaeOV0nhWZIyFreE47UvXWgwXqJYQUpy8B68=; b=ZOZkY8ATBPiQo4VkfwqPJRyjTt138I+KmkRZAKSmq59b7cLEne+PI2mmx/nG2+C5Pj ZUz2NMkzgMcPKd0/I9lO9zC1thQHRGF6cpcroohR70lErjLiRjmfplaeItFpSNS94ycm H8CnExynmlukd/I4uv1V4tXQA4NJmiQhvxQN/kbiJS/w9hd4k2o4jGwMOWNdtytjor/Y 8oUJJSsP3naGpNaPC/cke0+Yh99i186ta3VwLrH8NUKz6Cdk0vXN+4ErWiiXPKravrIC jW4xiAt7xL1LhOdfW/xV4a58aqi+gA5upGVRoTiKTmpGcYEAgWEC6Av6fFR/tOAilqfq OwAw== MIME-Version: 1.0 In-Reply-To: <20120423174010.42448946@pwslap01u.europe.root.pri> References: <20120423162711.42a6bad1@pwslap01u.europe.root.pri> <120423092123.ZM5041@torch.brasslantern.com> <20120423172723.238137e1@pwslap01u.europe.root.pri> <20120423174010.42448946@pwslap01u.europe.root.pri> Date: Mon, 23 Apr 2012 18:45:46 +0200 Message-ID: Subject: Re: MAX_ARRLEN From: Mikael Magnusson To: Peter Stephenson Cc: "Zsh Hackers' List" Content-Type: text/plain; charset=UTF-8 On 2012-04-23, Peter Stephenson wrote: > On Mon, 23 Apr 2012 18:36:22 +0200 > Mikael Magnusson wrote: >> The problem with the current approach is that it only limits accessing >> an array beyond a certain index, even if it's already larger, and you >> can create arrays of any size by other means. To me it seems like the >> limit is applied in the wrong place at least. If there are places that >> unexpectedly create large arrays, we should add the safeguards in >> those places, if possible. > > That's a good point --- and, in fact, creating *whole* arrays isn't a > problem, either, unless we think we're protecting against > > stuff=($( > and I don't think we are; why is that more problematic than the > unprotected > > stuff="$( > ? > > However, this has now turned from a simple change to a research project. FWIW, I've had the patch applied that removes the check since that other thread was started and I haven't OOMed myself because of it yet. Maybe we should leave it for 5.1.0 though? :) -- Mikael Magnusson