From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6702 invoked by alias); 17 Jan 2014 20:32:35 -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: 32273 Received: (qmail 29792 invoked from network); 17 Jan 2014 20:32:30 -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, SPF_HELO_PASS autolearn=ham version=3.3.2 From: Frank Terbeck To: zsh-workers@zsh.org Cc: Peter Stephenson Subject: Re: Bug with long multiline strings? In-Reply-To: <87bofqq54z.fsf@ft.bewatermyfriend.org> (Frank Terbeck's message of "Thu, 25 Oct 2012 11:21:00 +0200") Date: Fri, 17 Jan 2014 21:24:53 +0100 References: <87vcdzq4ke.fsf@ft.bewatermyfriend.org> <20121024171023.313995d7@pwslap01u.europe.root.pri> <20121025095936.621c7717@pws-pc.ntlworld.com> <87bofqq54z.fsf@ft.bewatermyfriend.org> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) Organisation: 63797068657270756e6b Message-ID: <87sism8ie6.fsf@ft.bewatermyfriend.org> MIME-Version: 1.0 Content-Type: text/plain X-Df-Sender: NDMwNDQ0 Hey list, here's a blast from the past. Axel Beckert reminded me, that I wanted to do this more than a year ago... ;) Frank Terbeck wrote: > Peter Stephenson wrote: >> On Wed, 24 Oct 2012 17:10:23 +0100 >> Peter Stephenson wrote: >>> Looks like there's a Mystery Ingredient. >> >> The only thing I've been able to think of is that some editor widget is >> running, and it's doing something which isn't saving and restoring the >> lexical state properly. If it's something like that, it wouldn't be too >> hard, if you can see the problem, to rustle up something that checks if >> tokstr/bptr or the heap they're part of are being swept away >> incorrectly. It's not happening on any of my installations. > > Yeah, I cannot reproduce the issue from "zsh -f". So there's something > in my setup that helps triggering it. I'll bisect through my > configuration to see what is causing this. But I won't get to it before > Sunday in all likeliness. Turns out, I didn't get to it before *that* particular sunday. :) Again, here's what triggers the bug: [snip] zsh% foo='asdf quote> asdf quote> asdf quote> asdf quote> asdf quote> asfd quote> asdf quote> asdf quote> asdf quote> asdf quote> asdf quote> asdf quote> asdf mem.c:604: BUG: hrealloc() called for non-heap memory. [1] 2554 segmentation fault (core dumped) zsh [snap] >>From "zsh -f", I can trigger the bug with one of the following two snippets: #+BEGIN_SRC shell-script zle-line-init() { for w in a; do : $w; done } zle -N zle-line-init #+END_SRC ...and also: #+BEGIN_SRC shell-script zle-line-finish() { for w in a; do : $w; done } zle -N zle-line-finish #+END_SRC I tried to minimise the code further, but I couldn't trigger it without the loop within the function. But it's enough to define one of the two; although defining both will trigger it as well. I did take a look at the code, but I didn't get anywhere. Regards, Frank