|
From: | Paul Eggert |
Subject: | Re: [PATCH 2/3] posix: Remove alloca usage on regex build_trtable |
Date: | Fri, 8 Jan 2021 14:30:20 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 |
On 1/6/21 10:17 AM, Adhemerval Zanella wrote:
__libc_use_alloca/alloca is replaced with malloc regardless.
These allocations are so small that they should be put on the stack instead of using malloc. I did that in Gnulib by installing the attached patch. The idea is that the resulting regexec.c file should be copyable unchanged into glibc.
From a Gnulib point of view this code uses a 20 KiB frame (on a 64-bit host) which goes past the usual 4032-byte limit for stack frames, but I think we can stretch the point here. In glibc the limit is 64 KiB so there's no problem.
0001-regexec-remove-alloca-usage-in-build_trtable.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |