* tests: Avoid havoc with "gcc -fcheck-pointer-bounds"
@ 2019-03-10 16:14 Bruno Haible
0 siblings, 0 replies; only message in thread
From: Bruno Haible @ 2019-03-10 16:14 UTC (permalink / raw)
To: bug-gnulib
Although "gcc -fcheck-pointer-bounds -mmpx -static" does not produce
real findings (only a dozen of false positives), it is good to avoid
havoc. Namely, two of the gnulib tests produce an endless series of
"Saw a #BR!" messages in the log file, thus filling up the disk, whatever
size it may have. Here is the workaround.
2019-03-10 Bruno Haible <bruno@clisp.org>
tests: Avoid havoc with "gcc -fcheck-pointer-bounds".
* tests/test-fprintf-posix2.c: Skip the test when -fcheck-pointer-bounds
is in use.
* tests/test-printf-posix2.c: Likewise.
diff --git a/tests/test-fprintf-posix2.c b/tests/test-fprintf-posix2.c
index 81aea17..c55e509 100644
--- a/tests/test-fprintf-posix2.c
+++ b/tests/test-fprintf-posix2.c
@@ -20,7 +20,10 @@
#include <stdio.h>
-#if HAVE_GETRLIMIT && HAVE_SETRLIMIT
+/* This test assumes getrlimit() and setrlimit().
+ With "gcc -fcheck-pointer-bounds -mmpx -static", it produces an
+ endless loop of "Saw a #BR!" messages. */
+#if HAVE_GETRLIMIT && HAVE_SETRLIMIT && !defined __CHKP__
#include <stdlib.h>
#include <sys/types.h>
diff --git a/tests/test-printf-posix2.c b/tests/test-printf-posix2.c
index 839e83a..8a26bf2 100644
--- a/tests/test-printf-posix2.c
+++ b/tests/test-printf-posix2.c
@@ -20,7 +20,10 @@
#include <stdio.h>
-#if HAVE_GETRLIMIT && HAVE_SETRLIMIT
+/* This test assumes getrlimit() and setrlimit().
+ With "gcc -fcheck-pointer-bounds -mmpx -static", it produces an
+ endless loop of "Saw a #BR!" messages. */
+#if HAVE_GETRLIMIT && HAVE_SETRLIMIT && !defined __CHKP__
#include <stdlib.h>
#include <sys/types.h>
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-03-10 16:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-10 16:14 tests: Avoid havoc with "gcc -fcheck-pointer-bounds" 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).