1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-10-26 00:57:39 +03:00
Files
glibc/malloc
caiyinyu d4ccda8e69 malloc: Fix tst bug in malloc/tst-free-errno-malloc-hugetlb1.
When transparent hugepages (THP) are configured to 32MB on x86/loongarch
systems, the current big_size value may not be sufficiently large to
guarantee that free(ptr) [1] will call munmap(ptr_aligned, big_size).

Tested on x86_64 and loongarch64.

PS: Without this patch and using 32M THP, there is a about 50% chance
that malloc/tst-free-errno-malloc-hugetlb1 will fail on both x86_64 and
loongarch64.

[1] malloc/tst-free-errno.c:
...
       errno = 1789;
       /* This call to free() is supposed to call
            munmap (ptr_aligned, big_size);
          which increases the number of VMAs by 1, which is supposed
          to fail.  */
->     free (ptr);
       TEST_VERIFY (get_errno () == 1789);
     }
...

Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
2025-08-19 09:05:32 +08:00
..
2025-08-08 14:00:11 +00:00
2021-02-23 10:04:45 +01:00
2014-01-02 09:40:10 +01:00
2007-12-16 22:57:57 +00:00
2022-10-28 18:43:58 +01:00