This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH 02/17] Regex: Fix alloca ifdefs and usage.
- From: Paul Eggert <eggert at cs dot ucla dot edu>
- To: Arnold Robbins <arnold at skeeve dot com>, carlos at redhat dot com, libc-alpha at sourceware dot org
- Date: Tue, 19 Dec 2017 14:13:57 -0800
- Subject: Re: [PATCH 02/17] Regex: Fix alloca ifdefs and usage.
- Authentication-results: sourceware.org; auth=none
- References: <201712080916.vB89GxVP005493@skeeve.com>
For this one, the patch to regcomp.c is in Gnulib and looks good.
However, the patch to regex_internal.h has problems compared to a
similar patch that is already in Gnullib. That is, instead of this:
# if HAVE_ALLOCA
+# include <alloca.h>
I suggest this replacing the #include line with this:
#if defined _LIBC || HAVE_ALLOCA
# include <alloca.h>
That way, we shouldn't need to have ugly changes like this one:
if (__libc_use_alloca (nmatch * sizeof (regmatch_t)))
prev_idx_match = (regmatch_t *) alloca (nmatch * sizeof (regmatch_t));
which will keep things simpler.