From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2279 invoked by alias); 22 Nov 2015 16:10:00 -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: 37187 Received: (qmail 13255 invoked from network); 22 Nov 2015 16:09:58 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Originating-IP: [86.6.158.222] X-Spam: 0 X-Authority: v=2.1 cv=RLtOZNW+ c=1 sm=1 tr=0 a=2SBOh4l1h08DI0L+aujZyQ==:117 a=2SBOh4l1h08DI0L+aujZyQ==:17 a=NLZqzBF-AAAA:8 a=kj9zAlcOel0A:10 a=VVlED5B4AAAA:8 a=Ktk9jk_pskdsBQ01eqwA:9 a=CjuIK1q_8ugA:10 Date: Sun, 22 Nov 2015 16:09:55 +0000 From: Peter Stephenson To: "Manuel Presnitz" Cc: zsh-workers@zsh.org Subject: Re: zsh 5.1.1-test-1 Message-ID: <20151122160955.0cc6da24@ntlworld.com> In-Reply-To: <201511221248360141.002B54E3@gateway.core.mpy.ch> References: <20151121183514.527eccf6@ntlworld.com> <201511221248360141.002B54E3@gateway.core.mpy.ch> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sun, 22 Nov 2015 12:48:36 +0100 "Manuel Presnitz" wrote: > I experience problems with this command > $ hash -m 'foo' > which hangs infinitely Yes, it's infinite; it's a simple missing increment. (Took a while for the penny to break out of the non-dropping loop while I scratched my head over search algorithms...) I'm wondering, having just looked, whether it's safe to use a variable-size array for all the hash nodes in the command table when sorting? That's using up quite a lot of stack. pws diff --git a/Src/builtin.c b/Src/builtin.c index 01eb5b8..cac4f42 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -3712,6 +3712,7 @@ bin_hash(char *name, char **argv, Options ops, UNUSED(int func)) zwarnnam(name, "bad pattern : %s", *argv); returnval = 1; } + argv++; continue; } if (!(asg = getasg(&argv, NULL))) {