vile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crash with unmatched patterns


From: Marc Simpson
Subject: Re: Crash with unmatched patterns
Date: Sat, 11 Jan 2020 10:08:56 -0800

On Sat, Jan 11, 2020 at 9:58 AM Chris Green <address@hidden> wrote:
>
> On Sat, Jan 11, 2020 at 09:36:25AM -0800, Marc Simpson wrote:
> > Hitting n or N after searching for an unmatched pattern with / or ?
> > crashes vile.
> >
> > To reproduce:
> >
> >   /\(
> >
> > Vile reports
> >
> >   [Bad pattern: unmatched () ]
> >
> > which is all well and good.  Then hit
> >
> >   n
> >
> > to attempt searching again (for the bad pattern); this should
> > reproduce the crash.
> >
> Doesn't happen for me, running version 9.8t on xubuntu.
>
> When I hit n after the unmatched one I just see "Search reached bottom
> without matching patter".

Thanks for checking Chris.  I'm using the latest snapshot here on
macOS and OpenBSD.

I think the issue might be

  https://github.com/ThomasDickey/vile-snapshots/blob/master/search.c#L819

which, in the event of failed compilation, doesn't clear apat (used to
set searchpat in the caller).

I believe that this means that the pattern exists as far as n and N
are concerned, even though it's failed to compile:

  https://github.com/ThomasDickey/vile-snapshots/blob/master/search.c#L179

I've only had time for a quick look, so this analysis might be completely off.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]