From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13364 invoked by alias); 24 Apr 2012 19:45:53 -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: 30454 Received: (qmail 10595 invoked from network); 24 Apr 2012 19:45:52 -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.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <120424124523.ZM6747@torch.brasslantern.com> Date: Tue, 24 Apr 2012 12:45:23 -0700 In-reply-to: <20120424143706.3ccc490d@pwslap01u.europe.root.pri> Comments: In reply to Peter Stephenson "Re: MAX_ARRLEN" (Apr 24, 2:37pm) References: <20120423162711.42a6bad1@pwslap01u.europe.root.pri> <120423093812.ZM5059@torch.brasslantern.com> <20120424143706.3ccc490d@pwslap01u.europe.root.pri> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: "Zsh Hackers' List" Subject: Re: MAX_ARRLEN MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Apr 24, 2:37pm, Peter Stephenson wrote: } } As something to do now, I'd be tempted either to "#if 0" the code until } someone can come up with a replacement that is demonstrably useful, or } implement $ZSH_MAX_ARRAY_LENGTH and initialise it to 0 (no limit), } applying it at the current definitely non-optimal location. Either } option at least gives us something basic usable, which the current code } isn't really. Anything beyond that still seems to be somewhat } ill-defined and I'd like finally to have something non-broken ASAP. I'm OK with just removing the check entirely. It's not like we don't have other places where the shell might run out of memory. This one was just particularly egregious back in the day because you could eat vast amounts of memory with what looked like an innocuous subscript expression. (I think the strange number for the limit was based on the assumption that you were creating a mostly empty array. If we used linked lists [ala bash] this would never come up.)