This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] posix: Remove dynamic memory allocation from execl{e,p}
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, <libc-alpha at sourceware dot org>
- Date: Fri, 29 Jan 2016 15:43:12 +0000
- Subject: Re: [PATCH] posix: Remove dynamic memory allocation from execl{e,p}
- Authentication-results: sourceware.org; auth=none
- References: <1454075599-2304-1-git-send-email-adhemerval dot zanella at linaro dot org> <56AB6FFF dot 7040308 at redhat dot com>
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