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

Re: Bug: Searching through sufficiently large $historywords causes seg fault



On Tue, 2023-05-09 at 09:58 -0700, Bart Schaefer wrote:
> On Tue, May 9, 2023 at 9:53 AM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> > With 51722, $#historywords is incorrect (returns "51" where it should
> > be about 100,000) and I eventually get a segfault after scrolling back
> > through the history past the event that was added with "print -S'.
> 
> Scratch that ... I had not correctly recompiled.  After correctly
> recompiling, I can't reproduce the segmentation fault at all with
> 51722, but the event added with "print -S" is entirely missing from
> $historywords even though it is found when scrolling the history.

That sounds fine --- it's the division into words, not the line, that's
causing the problems which this avoids.

In this case it's presumably the original word counting, not the
re-spliting on reading a history file, that's causing the underlying
bad numbers.

pws






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