sbrk() failure while processing tunables

Siddhesh Poyarekar siddhesh@sourceware.org
Mon Nov 1 17:17:34 GMT 2021


On 11/1/21 22:24, Adhemerval Zanella wrote:
> And the issue seems that tunables_strdup() does calls srbk() to allocate the new
> string.  On a059f9505bbef1 we changed to return a _dl_fatal_printf since BZ#25035
> states that in practice no setting a tunable should not prevent the process
> start.
> 
> I commented it with Carlos on the weekly call and he brought that he has discussed
> it internally. My question is there something preventing us to provide a mmap()
> allocator similar to the one used by rtld_malloc to used along with tunables?
> 
> I think using an explicit allocator disjointed from rtld_malloc (since it might
> free blocks either in default or error path) should provide a more robust tunables
> experience.

Straight up mmap should be fine I think.  AFAICT, we should have to 
allocate exactly once, to copy the tunable string.

Thanks,
Siddhesh


More information about the Libc-alpha mailing list