summaryrefslogtreecommitdiff
path: root/tests/test-free.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2021-05-09 15:45:03 +0200
committerBruno Haible <bruno@clisp.org>2021-05-09 15:45:03 +0200
commit6ec89f2b332e8db154277d3d85fc80330def829f (patch)
tree4d625b0ed25e7d601ffe2cc0cce518da386cb3f9 /tests/test-free.c
parent4e1475874cc6c65763fe8f26ac6b10ae7198f7bb (diff)
downloadgnulib-6ec89f2b332e8db154277d3d85fc80330def829f.tar.gz
free tests: Avoid test failure on glibc < 2.15.
* tests/test-free.c (main): Skip the hairy test on glibc < 2.15.
Diffstat (limited to 'tests/test-free.c')
-rw-r--r--tests/test-free.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test-free.c b/tests/test-free.c
index e651f1898b..53f108572b 100644
--- a/tests/test-free.c
+++ b/tests/test-free.c
@@ -108,8 +108,10 @@ main ()
/proc/sys/vm/max_map_count exists. This file contains the limit
- for Linux >= 2.4.19: 65536 (DEFAULT_MAX_MAP_COUNT in linux/include/linux/sched.h)
- for Linux >= 2.6.31: 65530 (DEFAULT_MAX_MAP_COUNT in linux/include/linux/mm.h).
+ But do not test it with glibc < 2.15, since that triggers a glibc internal
+ abort: "malloc.c:3551: munmap_chunk: Assertion `ret == 0' failed."
*/
- #if defined __linux__
+ #if defined __linux__ && !(__GLIBC__ == 2 && __GLIBC_MINOR__ < 15)
if (open ("/proc/sys/vm/max_map_count", O_RDONLY) >= 0)
{
/* Preparations. */