]> git.feebdaed.xyz Git - 0xmirror/glibc.git/commitdiff
elf: Fix elf/tst-decorate-maps on aarch64 after 321e1fc73f
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 17 Dec 2025 20:55:18 +0000 (17:55 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 22 Dec 2025 18:55:32 +0000 (15:55 -0300)
The intention of the call "xmalloc(256 * 1024)" in tst-decorate-maps is
to force malloc() to fall back to using mmap() since such an amount
won't be available from the main heap.

Post 321e1fc73f, on aarch64, the heap gets extended by default by at
least 2MB, thus the aforementioned call may get satisfied on the main
heap itself. Thus, increase the amount of memory requested to force the
mmap() path again.

Checked on aarch64-linux-gnu.

elf/tst-decorate-maps.c

index 715fdf52095d4e67200caa94fadd66be70f95db3..c20d059503344fd75bbb978cb12c9940193c0a0d 100644 (file)
@@ -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];
   {