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

Xi Ruoyao xry111@xry111.site
Mon Jan 19 10:32:48 GMT 2026


On Mon, 2026-01-19 at 11:09 +0100, Florian Weimer wrote:
> * 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?

FAIL: elf/tst-link-map-contiguous-ldso
original exit status 1
info: ld.so link map is not contiguous
error: tst-link-map-contiguous-ldso.c:77: no ld.so gap found

-- 
Xi Ruoyao <xry111@xry111.site>


More information about the Libc-alpha mailing list