From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23138 invoked by alias); 6 Jan 2011 19:23:04 -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: 28586 Received: (qmail 21542 invoked from network); 6 Jan 2011 19:22:52 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.216.43 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=fO1sCOsOGOuaa9T9Q30fVVrRRKtKPoRMaCnwnRVlroQ=; b=ti7OnG7kaC7rOk7128hQgkosFwKNxKLmwpLi+ScGNlq/KslgKs3nfUyxeQ+B9k6bkp M5pyPx/VOJGme/00c+rLDThmieBYwSlHMHuvDFmmO3DCyM5/zi5UtsbAt3KAvy4Qoj1z l2+eMv/RIaWeiz8q1Qnt8jvo6vtw22BQ5HdEc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=sSXD0b3PgHUeoRdrYkmc22clcHZj31tZhdJbnf54qmFXElxjSrHBGBhY6OcyenenkJ RRBzNoO1tDa4+waNByUvLX1TmLGowkq5hlGCfsaItZY/FHy3GpZp4kEe5K5tOMTs/pk/ chOuzNi9S492X9yfkR66zuiNq+vmnbLf3oMko= MIME-Version: 1.0 Date: Thu, 6 Jan 2011 20:22:48 +0100 Message-ID: Subject: Infinite loop, can't reproduce with zsh -f From: Mikael Magnusson To: zsh workers Content-Type: text/plain; charset=UTF-8 Hi, I was going to test something in relation to the =~ bug in the other thread and forgot what -regex-match was called, so i tried set -x; [[ a =~ b ]]; set +x but it just starts spinning forever. It doesn't in zsh -f though. Any ideas what to look for here? Note that running set -x and +x on separate lines before and after works fine... In fact, having set -x on the same line works too, the problematic case is [[ a =~ b ]]; set +x for some reason. ^C Program received signal SIGINT, Interrupt. gettext2 (state=0x7fffffffd640) at text.c:350 350 if (!(stack = (WC_SUBLIST_TYPE(code) == WC_SUBLIST_END))) { (gdb) bt #0 gettext2 (state=0x7fffffffd640) at text.c:350 #1 0x0000000000489bca in getjobtext (prog=0x7ffff7fefc00, c=0x7ffff7fefc38) at text.c:223 #2 0x00000000004427e8 in loop (toplevel=1, justonce=0) at init.c:174 #3 0x0000000000445771 in zsh_main (argc=1, argv=0x7fffffffd828) at init.c:1508 #4 0x0000000000410674 in main (argc=1, argv=0x7fffffffd828) at ./main.c:93 (gdb) n 361 if (stack < 1 && (WC_SUBLIST_FLAGS(s->code) & WC_SUBLIST_SIMPLE)) (gdb) [i'll leave out the following empty (gdb) lines] 363 break; 845 } 302 if (stack) { 303 if (!(s = tstack)) 305 if (s->pop) { 310 code = s->code; 311 stack = 0; 316 switch (wc_code(code)) { 340 if (!s) { 350 if (!(stack = (WC_SUBLIST_TYPE(code) == WC_SUBLIST_END))) { 361 if (stack < 1 && (WC_SUBLIST_FLAGS(s->code) & WC_SUBLIST_SIMPLE)) 363 break; (gdb) print *s $7 = {prev = 0x0, code = 4098, pop = 0, u = {_redir = {list = 0xf000d000c000b}, _funcdef = { strs = 0xf000d000c000b
, end = 0x14001200110010}, _case = {end = 0xf000d000c000b}, _if = {cond = 786443, end = 0x14001200110010}, _cond = {par = 786443}, _subsh = {end = 0xf000d000c000b}}} -- Mikael Magnusson