From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9010 invoked by alias); 4 Mar 2015 22:05:48 -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: 34646 Received: (qmail 13088 invoked from network); 4 Mar 2015 22:05:46 -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=-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.2 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=zlHFWdr6JBVpifKtmAmKJtXE03SyZ34ShywxOB8nMIE=; b=pdAsfpdL4ijBrPytzS8wscCGfTZX7twOShX0oc2wLxMZ3HDrigI1/TDPgt5cUVuo+j +YlsGMsDgaQnTrFJveu77ir8zOID5Od8ofpP87viK8rv3AjLq70AHsyH6SZ8jnMroiFE O6ljSnX8L9Wjj2kJ6fpwPOVHMDwMyxuO6ukaPFy4jP0qizQcaZ5OysMEUvG4kj5R96on AJbvq0BnFNf3GRl+tJJdMz3ITmlQnt5ca2cAOScDK2NyyldTJGeto4l7ip9G0RqQq0jr oALG1ZcDh8PbNoy5CjPa64OE/ykCXy4tyExraD35C6K5plFkNS4m75V06nT6fFc1rnXB qs8A== MIME-Version: 1.0 X-Received: by 10.107.136.14 with SMTP id k14mr202279iod.53.1425506744319; Wed, 04 Mar 2015 14:05:44 -0800 (PST) In-Reply-To: <20150304151830.5e20d732@pwslap01u.europe.root.pri> References: <54F33934.2070607@eastlink.ca> <13666281425228233@web7o.yandex.ru> <54F345D3.9010204@eastlink.ca> <20150302022754.GA7449@xvii.vinc17.org> <20150302104619.GC6869@xvii.vinc17.org> <20150302110610.2e2c7e86@pwslap01u.europe.root.pri> <20150304144756.GA27231@ypig.lip.ens-lyon.fr> <20150304151830.5e20d732@pwslap01u.europe.root.pri> Date: Wed, 4 Mar 2015 23:05:44 +0100 Message-ID: Subject: Re: grammar triviality with '&&' From: Mikael Magnusson To: Peter Stephenson Cc: "Zsh Hackers' List" Content-Type: text/plain; charset=UTF-8 On Wed, Mar 4, 2015 at 4:18 PM, Peter Stephenson wrote: > On Wed, 4 Mar 2015 15:47:56 +0100 > Vincent Lefevre wrote: >> I've found a bug: >> >> % alias '&&=(){ return $? } && ' >> % && echo OK >> zsh: parse error near `&&' > > (Moved to zsh-workers) > > I was keeping very quiet about this, but it looks like it's not as hairy > as I thought it might be and the new code is actually slightly cleaner... > > Now waiting for obscure failures elsewhere... All I have to do is press ctrl-c at a prompt, and it crashes: Core was generated by `zsh -f'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x0000000000435477 in hasher (str=0x1 ) at hashtable.c:85 85 while ((c = *((unsigned char *) str++))) (gdb) bt #0 0x0000000000435477 in hasher (str=0x1 ) at hashtable.c:85 #1 0x0000000000435490 in gethashnode (ht=0x1a9b6a0, nam=0x0) at hashtable.c:231 #2 0x00000000004484fc in checkalias () at lex.c:1743 #3 0x000000000044ae74 in exalias () at lex.c:1784 #4 0x000000000044b0b7 in zshlex () at lex.c:272 #5 0x0000000000467d93 in parse_event (endtok=endtok@entry=37) at parse.c:538 #6 0x000000000043dc29 in loop (toplevel=toplevel@entry=1, justonce=justonce@entry=0) at init.c:145 #7 0x0000000000440a32 in zsh_main (argc=, argv=0x7fffef4307d8) at init.c:1674 #8 0x000000000040f1c6 in main (argc=, argv=) at ./main.c:93 (Note that if you run it inside gdb, you need to change the settings for 'handle SIGINT' with the command: (gdb) handle SIGINT nostop noprint pass or gdb will eat the ctrl-c) -- Mikael Magnusson