regexec: remove alloca usage in build_trtable

System Internals / glibc - Adhemerval Zanella [linaro.org] - 9 February 2021 19:57 UTC

It syncs with gnulib version 1731fef3d. On build_trtable prevent inlining, so that it doesn't bloat the caller's stack and 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.

Checked on x86_64-linux-gnu.

f3e5c7262e regexec: remove alloca usage in build_trtable
posix/regexec.c | 75 ++++++++++-----------------------------------------------
1 file changed, 13 insertions(+), 62 deletions(-)

Upstream: sourceware.org


  • Share