Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug: Searching through sufficiently large $historywords causes seg fault
- X-seq: zsh-workers 51735
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Bug: Searching through sufficiently large $historywords causes seg fault
- Date: Tue, 09 May 2023 20:01:36 +0100
- Archived-at: <https://zsh.org/workers/51735>
- In-reply-to: <CAH+w=7bgzq=kwg9N5+0_RHo=OmjL82NQxoNnXyhdSh9AKEBynQ@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAHLkEDuXELQ66nEW+D74q3GiMcoOvNYfBZSSxFKfvZOZopQLkw@mail.gmail.com> <CAH+w=7bp9hix9trxDq1PsHfRuq=nM9LQarrmzkg4j4uDwq+UDA@mail.gmail.com> <CAH+w=7anXXUsEJmNkUP=hSSU=MKGKuv+F7m2XA1qUYhqWsxc_g@mail.gmail.com> <CAH+w=7bgzq=kwg9N5+0_RHo=OmjL82NQxoNnXyhdSh9AKEBynQ@mail.gmail.com>
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