bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* free tests: Avoid test failure on glibc < 2.15
@ 2021-05-09 14:29 Bruno Haible
  0 siblings, 0 replies; only message in thread
From: Bruno Haible @ 2021-05-09 14:29 UTC (permalink / raw)
  To: bug-m4, bug-gnulib

When building m4-1.4.18b on a glibc 2.13 system, there is a test failure:

test-free: malloc.c:3551: munmap_chunk: Assertion `ret == 0' failed.
Aborted

This is an internal assertion that was fixed in glibc ([BZ #13276])
on 2011-10-29, that is, before glibc 2.15. Let's avoid this failure,
since we have no way to do anything about it.


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.

diff --git a/tests/test-free.c b/tests/test-free.c
index e651f18..53f1085 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.  */



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-09 14:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-09 14:29 free tests: Avoid test failure on glibc < 2.15 Bruno Haible

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).