From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org
Subject: tests: Avoid havoc with "gcc -fcheck-pointer-bounds"
Date: Sun, 10 Mar 2019 17:14:06 +0100 [thread overview]
Message-ID: <2250998.shzSCyY0Yh@omega> (raw)
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>
reply other threads:[~2019-03-10 16:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2250998.shzSCyY0Yh@omega \
--to=bruno@clisp.org \
--cc=bug-gnulib@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).