This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: extend dl-minimal malloc implementation


On 08/16/2017 07:39 PM, DJ Delorie wrote:
> 
> "Carlos O'Donell" <carlos@redhat.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
called.

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]