[PATCH] elf: Fix elf/tst-decorate-maps on aarch64 after 321e1fc73f

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Thu Dec 18 12:26:06 GMT 2025



On 18/12/25 03:27, Dev Jain wrote:
> 
> On 18/12/25 2:25 am, Adhemerval Zanella wrote:
>> The malloc size might be too low to trigger the mmap call on aarch64
>> with mTHP.
> 
> Thanks, but mTHP has got nothing to do with mmap() getting triggered by
> malloc() - it is dependent on MMAP_THRESHOLD? I think we can have this
> change when we get around changing the hardcoded tunables according
> to whether THP is there by default or not - we definitely should
> increase MMAP_THRESHOLD in that case.

The test is issued with

tst-decorate-maps-ENV = \
  GLIBC_TUNABLES=glibc.malloc.arena_max=8:glibc.malloc.mmap_threshold=1024:glibc.mem.decorate_maps=1
tst-decorate-maps-ARGS = 8

> 
>>
>> Checked on aarch64-linux-gnu.
>> ---
>>  elf/tst-decorate-maps.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/elf/tst-decorate-maps.c b/elf/tst-decorate-maps.c
>> index 715fdf5209..c20d059503 100644
>> --- a/elf/tst-decorate-maps.c
>> +++ b/elf/tst-decorate-maps.c
>> @@ -109,7 +109,7 @@ do_test_threads (bool set_guard)
>>    xpthread_barrier_init (&b, NULL, num_threads + 1);
>>  
>>    /* Issue a large malloc to trigger a mmap call.  */
>> -  void *p = xmalloc (256 * 1024);
>> +  void *p = xmalloc (2 * 1024 * 1024);
>>  
>>    pthread_t thr[num_threads];
>>    {



More information about the Libc-alpha mailing list