[PATCH v4 12/14] elf: Move most of the _dl_find_object data to the protected heap

Florian Weimer fweimer@redhat.com
Mon Feb 3 15:58:09 GMT 2025


* Carlos O'Donell:

> On 2/2/25 4:13 PM, Florian Weimer wrote:
>> The heap is mostly read-only by design, so allocation padding is
>> no longer required.  The protected heap is not visible to malloc,
>> so it's not necessary to deallocate the allocations during
>> __libc_freeres anymore.  Also put critical pointers into
>> the protected memory area.
>> 
>> With this change, all control data for _dl_find_object is either
>> RELRO data, or in the protected area, or tightly constrained
>> (the version counter is always masked using & 1 before array
>> indexing).
>
> It may or may not be relevant, but the Linaro CI tester had an intermittent 
> failure after this patch which caused a segfault in the test.
>
> Have you seen this?
>
> FAIL: resolv/tst-resolv-ai_idn-nolibidn2
> original exit status 1
> Didn't expect signal from child: got `Segmentation fault'

I saw it.  It did not show up in my testing on AArch64 as far as I
recall.

(The test results on AArch64 are quite noisy right now because of new
tests with race conditions.)

Thanks,
Florian



More information about the Libc-alpha mailing list