summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2021-01-08 14:22:15 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2021-01-08 14:26:55 -0800
commit1731fef3d6d883bc8619c468a1a69b1d090a95c1 (patch)
tree3d5ec639e2ffef15210cf2adba8dcf9df08f0b69 /config
parentb0e441b886f26b52ad0a96b6505b88090c9248b6 (diff)
downloadgnulib-1731fef3d6d883bc8619c468a1a69b1d090a95c1.tar.gz
regexec: remove alloca usage in build_trtable
Prompted by this different change proposed by Adhemerval Zanella: https://sourceware.org/pipermail/libc-alpha/2021-January/121373.html * lib/regexec.c (build_trtable): Prevent inlining, so that it doesn’t bloat the caller’s stack. Use auto variables instead of alloca/malloc. After these changes, build_trtable’s total stack allocation is only 20 KiB on a 64-bit machine, and this is less than glibc’s 64 KiB cutoff so there’s little point to using alloca to shrink it. Although Gnulib traditionally has used a 4 KiB cutoff, going to 20 KiB here should not be a significant problem in practice; Gnulib-using packages concerned about overflow of tiny stacks can compile with something like gcc -fstack-clash-protection. * config/srclist.txt: Comment out regexec.c for now.
Diffstat (limited to 'config')
-rw-r--r--config/srclist.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/config/srclist.txt b/config/srclist.txt
index e7ceeb0889..d669fd8f01 100644
--- a/config/srclist.txt
+++ b/config/srclist.txt
@@ -69,7 +69,7 @@ $LIBCSRC posix/regex.c lib
#$LIBCSRC posix/regex.h lib
#$LIBCSRC posix/regex_internal.c lib
#$LIBCSRC posix/regex_internal.h lib
-$LIBCSRC posix/regexec.c lib
+#$LIBCSRC posix/regexec.c lib
#$LIBCSRC stdlib/canonicalize lib/canonicalize-lgpl.c
#$LIBCSRC sysdeps/generic/eloop-threshold.h lib
$LIBCSRC time/timegm.c lib