]> git.ipfire.org Git - thirdparty/glibc.git/commit
regexec: remove alloca usage in build_trtable
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 11 Jan 2021 15:23:00 +0000 (12:23 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 9 Feb 2021 19:57:56 +0000 (16:57 -0300)
commitf3e5c7262e77ca84bcef60fe20a3dc70eae12d5e
tree4f6b9857e0f34665d4b3a3b8536165a26f296327
parentf0908ba1189ac0f74652736780d8ca5e0ea6a927
regexec: remove alloca usage in build_trtable

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.
posix/regexec.c