[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
results of gnulib tests with -fsanitize=undefined
From: |
Bruno Haible |
Subject: |
results of gnulib tests with -fsanitize=undefined |
Date: |
Fri, 19 May 2017 09:14:26 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-75-generic; KDE/5.18.0; x86_64; ; ) |
Out of curiosity, I configured and ran a gnulib testdir with
CFLAGS="-ggdb -O -fsanitize=undefined".
Here are the results.
FAIL: test-get-rusage-data
==========================
../../gltests/test-get-rusage-data.c:60: assertion 'value3 > value1' failed
FAIL test-get-rusage-data (exit status: 134)
The values are:
value1=0x39000
value2=0x39000
value3=0x39000
Apparently glibc uses mmap() for large mallocs, and mmap()ed memory does not
count as part of the "data segment".
2017-05-19 Bruno Haible <address@hidden>
get-rusage-data tests: Avoid failure on Linux/glibc.
* tests/test-get-rusage-data.c (main): Don't expect a strict increase
on glibc systems.
diff --git a/tests/test-get-rusage-data.c b/tests/test-get-rusage-data.c
index 7577535..c5989e3 100644
--- a/tests/test-get-rusage-data.c
+++ b/tests/test-get-rusage-data.c
@@ -55,7 +55,7 @@ main ()
ASSERT (value2 >= value1);
ASSERT (value3 >= value2);
-#if !((defined __APPLE__ && defined __MACH__) || defined __DragonFly__ ||
defined __OpenBSD__ || (defined _WIN32 || defined __WIN32__) || defined
__CYGWIN__)
+#if !(__GLIBC__ == 2 || (defined __APPLE__ && defined __MACH__) || defined
__DragonFly__ || defined __OpenBSD__ || (defined _WIN32 || defined __WIN32__)
|| defined __CYGWIN__)
/* Allocating 2.5 MB of memory should increase the data segment size. */
ASSERT (value3 > value1);
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- results of gnulib tests with -fsanitize=undefined,
Bruno Haible <=