[PATCH v2] stdlib: realpath use malloc replace __alloca to reduce stack overflow risks [BZ #26341]

Paul Eggert eggert@cs.ucla.edu
Sat Aug 8 00:00:04 GMT 2020


On 8/7/20 12:43 PM, Adhemerval Zanella wrote:
> Paul, it might be something to be fixed on gnulib since I noted that both
> gpl and lgpl code uses malloca (which calls alloca if the header is present).

The Gnulib canonicalize.c is a quite-different implementation, and does not use 
alloca.

There is quite a bit of Gnulib code that does use alloca, but it is supposed to 
do so without allocating and using more than 4032 bytes at a time, which is safe 
on all the Gnulib targets we know about.


More information about the Libc-alpha mailing list