[PATCH] posix: Remove dynamic memory allocation from execl{e,p}

Joseph Myers joseph@codesourcery.com
Fri Jan 29 15:43:00 GMT 2016


On Fri, 29 Jan 2016, Florian Weimer wrote:

> I would rather see a variant of struct scratch_buffer which uses mmap
> for the fallback allocation, and use it here, rather than imposing
> arbitrary limits.  It's not clear to me at all if __MAX_ALLOCA_CUTOFF is

Agreed.  glibc functions should avoid arbitrary limits, which means they 
should not fail simply because the limit for stack allocation was 
exceeded.

(This does mean the functions need to do deallocation of the memory 
allocated with mmap, if the underlying execve fails.)

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list