Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: coredump on C-c



On Thu, Sep 26, 2013 at 5:31 PM, Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Thu, Sep 26, 2013 at 10:52 AM, Eitan Adler <lists@xxxxxxxxxxxxxx> wrote:
>>
>> Sometimes, when pressing Ctrl-c to exit a program I get a coredump.  I
>> have not been able to isolate the exact case when this happens.
>>
>> #12 0x000000000053ded6 in zleaftertrap (dummy=0x87ea50 <zshhooks+80>,
>> dat=0x0) at zle_main.c:1856
>
> ...
>>
>> name=0x800930040 "_main_complete") at exec.c:4854
>
>
>
> If this is an accurate backtrace, and you've accurately described the
> circumstances in which you pressed ctrl-c, then it indicates that you've
> invoked completion,

This sounds possible and even likely.

> A first question is, is the first sentence of the previous paragraph
> correct?  And if so, what are you doing invoking a program that you might
> have to kill off with ctrl-c from inside a completion widget?

Now that I think about it, it may be pressing ctrl-c to try and stop a
<tab> from completing due the time it takes.  I have not been able to
isolate the coredumps yet but I'll be on the lookout for this

>   I'd say that
> particular widget is in need of a rewrite.

This is my zshrc: https://code.google.com/p/config/source/browse/zsh/zshrc
and these are the files referenced by my zshrc:
https://code.google.com/p/config/source/browse/#hg%2Fzsh

I will try to press ctrl-c during completion to see if that causes the crash.

> ... we should be queuing signals.  zfree() does it internally, but that's
> not enough to stop corruption in freeparamnode() if the signal arrives
> before all the parts of the node are cleaned p, and we probably ought to be
> queuing signals around the entire "free all the nodes" loop in
> resizehashtable().

I'm happy to test patches, but I don't know zsh internals well enough
to comment on this.


-- 
Eitan Adler



Messages sorted by: Reverse Date, Date, Thread, Author