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

Re: Segfault in hist.c



On Jul 11,  2:46pm, Peter Stephenson wrote:
}
} I've tracked it down to a test in hbegin() when initialising the command
} line after the aborted one.  At this point inbufflags hasn't been
} initialised and it misfires by testing the "alias" flag still in effect
} from the failed line and is tricked into thinking the history mechanism
} shouldn't be used.
} 
} I can't see why that test could be useful, and taking it out didn't seem
} to break anything.  It comes from:
} 
} revision 1.2
} date: 2000/04/12 08:24:16;  author: wischnow;  state: Exp;  lines: +718 -291
} new widget copy-prev-shell-word, like copy-prev-word but uses shell parsing to find word (10685)
} ----------------------------

That's what the commit log says, but it actually appears to have come
from ten months earlier in the (reversed) patch here:

http://www.zsh.org/mla/workers/1999/msg01579.html

Which means Sven probably committed it by accident!

} so presumably is related to some grungy undocumented zle interaction.

The intention appears to have been to optimize when it was OK to NOT
allocate a history line, because it was never actually going to be
used.  But either part of the patch has eroded away over the years or
it was never fully committed (the latter might make sense if it were
an accidental commit).



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