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: [patch] Fix BZ 23187 -- stack overflow for many Phdr[]s



On 22/05/2018 19:51, Florian Weimer wrote:
> * Adhemerval Zanella:
> 
>> At least for this specific usage where only there is only DYARRAY_resize
>> operation it works (no regression on glibc testcase), although I am not
>> sure it is the best way to accomplish it. How hard would adapt dl-minimal.c
>> malloc to work with dynarray?
> 
> DJ posted a patch:
> 
>   https://patchwork.sourceware.org/patch/21325/
> 
> We have some disagreement regarding chunk coalescing, but this alone
> probably should not block acceptance of the patch.
> 
> My original use case evaporated when I realized that we can't use the
> dl-minimal malloc during relocation, at least not under the
> malloc/free names because relocation itself changes which functions
> are called.

I will review this patch and I think we can proceed once it is upstream
(I take it should not have any real blocker based on your message).

> 
>>> Should we use a scratch buffer? Which has constant size and can be expanded
>>> only if required?
>>
>> The advantage of dynarray is it provides a slight better typed api with
>> ties better a list/array abstraction, but for this usage I think a 
>> scratch_buffer is doable.
> 
> Actually, I want to get rid of that part of the scratch buffer
> interface (the array handling part and scratch_buffer_set_array_size).
> It's redundant with dynarray.  I think I posted a couple of cleanups
> which remove the last remaining use.
> 

Agreed.


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