[Top][All Lists]

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

Re: dfa.c badly broken when dropped into gawk

From: arnold
Subject: Re: dfa.c badly broken when dropped into gawk
Date: Wed, 18 Dec 2019 02:07:32 -0700
User-agent: Heirloom mailx 12.5 7/5/10

Paul Eggert <address@hidden> wrote:

> On 12/15/19 10:43 AM, Arnold Robbins wrote:
> > To reproduce:
> > 
> > 1. Checkout the gawk repo
> > 2. Copy gnulib/lib/dfa.[ch] into gawk/support/.
> > 3. Apply the minimal patch below
> I looked into that, and the problem was not in Gnulib; it was that your
> minimal patch's dfasyntax didn't clear its destination properly. (Gawk
> master dfa.c diverged from Gnulib in having its dfaalloc use xzalloc
> rather than xmalloc, and the minimal patch didn't capture that
> divergence.)

Ooops. But somehow when I copied the changes from dfa.c into my
copy, it was still failing. I sent the miminmal patch to make
it easier for you to debug.

> It seems to be error-prone that we're continuing to maintain a separate
> copy of dfa.c for Gawk, so I suggest we unify the two copies. I attempted
> to do that by installing the attached patches into Gnulib. You should
> now be able to use Gnulib dfa.c as follows:
> 1. Checkout the gawk repo.
> 2. Copy gnulib/lib/dfa.[ch] and gnulib/lib/localeinfo.[ch] into gawk/support/.
> Then build as usual. This works for me on GNU/Linux.

Thanks.  I haven't pushed yet, but my copy of dfa.c is now MUCH
closer to yours and still working ok under Linux.  I have some things
to check out with my porting team. It may be possible to move
my copy even closer to the one in gnulib.  If we can get to the point
where we're only using a single copy, that'd be really good.

I appreciate the help.


reply via email to

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