Subject: Re: bug#15773: grep-2.15 bug report

From: Aharon Robbins <[email-masked]>
Date: Sat, 02 Nov 2013 21:14:51 +0200

> > > Hi.
> > >
> > >> > The program below correctly produces no output, with and without the fix
> > >> > in dfa.c:lex. (I have added the fix anyway.)
> > >
> > > Also with LC_ALL=en_US.utf8, without the fix the program still passes.
> > >
> > > So, any ideas?
> >
> > Hi Arnold,
> > I don't recall how gawk uses dfa.c, so can't really guess.
> > Does the DFA matcher really accept those?  If so, maybe
> > gawk somehow manages to reset that dfa.c-internal variable
> > via some other code path?
>
> I will look in a debugger.
>
> It's entirely possible that gawk is falling back to regex when
> dfa fails.  In which case I should see an internal difference before
> and after the fix.

	Hoist by me own petard.
		-- Popeye

Indeed, this is what was happening. dfa would fail and then gawk
would fall back to regex, which would succeed. With the patch
dfa succeeds and regex is bypassed.

But the test is worth having anyway.

Much thanks,

Arnold