Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug with long multiline strings?
- X-seq: zsh-workers 32273
- From: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Bug with long multiline strings?
- Date: Fri, 17 Jan 2014 21:24:53 +0100
- Cc: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- In-reply-to: <87bofqq54z.fsf@ft.bewatermyfriend.org> (Frank Terbeck's message of "Thu, 25 Oct 2012 11:21:00 +0200")
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organisation: 63797068657270756e6b
- References: <87vcdzq4ke.fsf@ft.bewatermyfriend.org> <20121024171023.313995d7@pwslap01u.europe.root.pri> <20121025095936.621c7717@pws-pc.ntlworld.com> <87bofqq54z.fsf@ft.bewatermyfriend.org>
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 <p.stephenson@xxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author