[PATCH] elf: allow anonymous mapping in gap for tst-link-map-contiguous-ldso

Florian Weimer fweimer@redhat.com
Mon Jan 19 10:09:36 GMT 2026


* Xi Ruoyao:

> The initialization process of libc.so creates several anonymous mappings
> and the kernel may lay them into the gap.  If all pages in the gap are
> occupied, the test would fail.
>
> The failure reproduces most frequently on LoongArch because with the
> commonly used page size (16 KiB) the gap only contains 4 pages and the
> probability they are all occupied is not near to zero.  With the changes
> in the patch, a test run outputs:
>
>     info: ld.so link map is not contiguous
>     info: anonymous map found at 0x7ffff1c60000
>     info: anonymous map found at 0x7ffff1c64000
>     info: anonymous map found at 0x7ffff1c68000
>     info: anonymous map found at 0x7ffff1c6c000

What's the actual error message from the test?

Thanks,
Florian



More information about the Libc-alpha mailing list