From: Bruno Haible Date: Sun, 10 Mar 2019 16:09:30 +0000 (+0100) Subject: tests: Avoid havoc with "gcc -fcheck-pointer-bounds". X-Git-Tag: v1.0~5036 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=fdb2c20b0ce50294e7584f4b547e52bf0b32fa08;p=gnulib.git 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/ChangeLog b/ChangeLog index 9678f430d0..fd5b5e0eaf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2019-03-10 Bruno Haible + + 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. + 2019-03-10 Bruno Haible uninorm tests: Free allocated memory. diff --git a/tests/test-fprintf-posix2.c b/tests/test-fprintf-posix2.c index 81aea17be1..c55e509b26 100644 --- a/tests/test-fprintf-posix2.c +++ b/tests/test-fprintf-posix2.c @@ -20,7 +20,10 @@ #include -#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 #include diff --git a/tests/test-printf-posix2.c b/tests/test-printf-posix2.c index 839e83a6b7..8a26bf220b 100644 --- a/tests/test-printf-posix2.c +++ b/tests/test-printf-posix2.c @@ -20,7 +20,10 @@ #include -#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 #include