]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
free tests: Avoid test failure on glibc < 2.15.
authorBruno Haible <bruno@clisp.org>
Sun, 9 May 2021 13:45:03 +0000 (15:45 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 9 May 2021 13:45:03 +0000 (15:45 +0200)
* tests/test-free.c (main): Skip the hairy test on glibc < 2.15.

ChangeLog
tests/test-free.c

index e0ce4406fdcba86e0b8bed4c02bbdad870a48411..2de27efb4e44983d0508e1653dc2850e730b2132 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2021-05-09  Bruno Haible  <bruno@clisp.org>
+
+       free tests: Avoid test failure on glibc < 2.15.
+       * tests/test-free.c (main): Skip the hairy test on glibc < 2.15.
+
 2021-05-08  Bruno Haible  <bruno@clisp.org>
 
        Fix build error when libintl is installed.
index e651f1898b0f8d3cee4e2aa468b5ceb9bc2d362a..53f108572bef7ac4f8f9ec88d85bd6253765c8d3 100644 (file)
@@ -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.  */