This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 06/17] Regex: Use re_malloc / re_free consistently.
- From: arnold at skeeve dot com
- To: libc-alpha at sourceware dot org, eggert at cs dot ucla dot edu, carlos at redhat dot com, arnold at skeeve dot com
- Cc: bug-gnulib at gnu dot org
- Date: Wed, 20 Dec 2017 11:48:25 -0700
- Subject: Re: [PATCH 06/17] Regex: Use re_malloc / re_free consistently.
- Authentication-results: sourceware.org; auth=none
- References: <201712080916.vB89GxEG005501@skeeve.com> <80061d8c-a2ae-b617-2b74-9e648d2bfccf@cs.ucla.edu>
Thanks, I have merged this in to gawk's version.
Paul --- I think that you have permission to push the patches you approve
to glibc. Please do so.
Thanks,
Arnold
Paul Eggert <eggert@cs.ucla.edu> wrote:
> On 12/08/2017 01:16 AM, Arnold Robbins wrote:
> > This patch changes several calls to malloc/free into re_malloc/re_free,
> > bringing consistency to the code.
>
> Thanks, that patch makes sense, but it misses three opportunities to
> bring consistency. regcomp.c has one call each to malloc and free, which
> should be consistent too. Also, regexec.c has a call to realloc that
> should be be changed to re_realloc. A minor formatting issue: one
> newly-introduced re_malloc call doesn't need to appear on the next line.
>
> (Possibly we should be adding consistency in the opposite way, by
> removing the macros re_free, re_malloc, and re_realloc, and simply using
> the underlying C functions. These macros are tricky since they are
> function-like but (aside from re_free) cannot be implemented as
> functions, and they don't buy much. But that'd be a bigger change.)
>
> I installed the attached patch into Gnulib; it contains the originally
> proposed patch 06/17 along with the abovementioned fixups. Something
> like this should be easily installable into glibc.
>