From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22576 invoked from network); 7 Mar 2000 05:53:25 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 7 Mar 2000 05:53:25 -0000 Received: (qmail 584 invoked by alias); 7 Mar 2000 05:53:17 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9999 Received: (qmail 571 invoked from network); 7 Mar 2000 05:53:17 -0000 From: "Bart Schaefer" Message-Id: <1000307055310.ZM4764@candle.brasslantern.com> Date: Tue, 7 Mar 2000 05:53:10 +0000 In-Reply-To: Comments: In reply to Alexandre Duret-Lutz "A weird bug" (Mar 6, 7:03pm) References: X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@math.gatech.edu Subject: Re: A weird bug MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Mar 6, 7:03pm, Alexandre Duret-Lutz wrote: } Subject: A weird bug } } phobos% zcompile foo file.bug } zsh: segmentation fault (core dumped) zsh -f This looks to be a parser bug, not a compilation bug. Try fpath=($PWD) autoload +X file.bug and you'll get the same crash. The problem is that ecadd() is running over the end of ecbuf[], apparently because of an off-by-one error in the value of ecfree. But there are so many places in parse.c where ecused is modified (usually decremented, but incremented in ecispace()) without also modifying ecfree that I'm not sure what the relationship between the two is supposed to be. I discovered this by setting watchpoints in gdb. I attempted to use ElectricFence, but it's nearly useless for zsh because of the heap; it can't see overruns that are inside the large heap spaces that zsh pre- allocates. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com