This is the mail archive of the
mailing list for the glibc project.
Re: extend dl-minimal malloc implementation
- From: Florian Weimer <fweimer at redhat dot com>
- To: DJ Delorie <dj at redhat dot com>, Carlos O'Donell <carlos at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 17 Aug 2017 18:22:30 +0200
- Subject: Re: extend dl-minimal malloc implementation
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=fweimer at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6621D4E4D0
- References: <firstname.lastname@example.org>
On 08/16/2017 07:39 PM, DJ Delorie wrote:
> "Carlos O'Donell" <email@example.com> writes:
>> (b) Eliminate all alloca by moving to malloc (requires (a)).
> I will point out the obvious, for the record, that doing (b) may be
> arbitrarily non-trivial.
> I've looked at some of the alloca code in ld.so and the original
> programmers (rightly) took advantage of the auto-cleanup, resulting in
> code that might be difficult to convert.
Most alloca uses are in fact straightforward to convert. I have patches.
There is an alloca in the dlclose path, and that needs some data
structure changes to get rid off, though. We cannot allocate during
dlclose because we cannot deal with allocation failures in this place,
so we need to reserve all scratch data dlclose might need when dlopen is