From fdb2c20b0ce50294e7584f4b547e52bf0b32fa08 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 10 Mar 2019 17:09:30 +0100 Subject: [PATCH] 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. --- ChangeLog | 7 +++++++ tests/test-fprintf-posix2.c | 5 ++++- tests/test-printf-posix2.c | 5 ++++- 3 files changed, 15 insertions(+), 2 deletions(-) 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 -- 2.39.5