]> Savannah Git Hosting - gnulib.git/commitdiff
c-stack-tests: fix -fsanitize=undefined false alarm
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 18 Sep 2020 17:33:02 +0000 (10:33 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 18 Sep 2020 17:34:15 +0000 (10:34 -0700)
* tests/test-c-stack2.sh: Skip the test-harness self-test
if ‘gcc -fsanitize=undefined’ is in use.

ChangeLog
tests/test-c-stack2.sh

index dc585078caf1a0b8d63e1e85dd509450221a44d2..703da605853e85ed886f17775eda10bdb45fe59c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-09-18  Paul Eggert  <eggert@cs.ucla.edu>
+
+       c-stack-tests: fix -fsanitize=undefined false alarm
+       * tests/test-c-stack2.sh: Skip the test-harness self-test
+       if ‘gcc -fsanitize=undefined’ is in use.
+
 2020-09-17  Paul Eggert  <eggert@cs.ucla.edu>
 
        signalblocking: simplify and remove gl_SILENT
index 2944ff5bad679c409224ed4c757b6a535c0da26f..7f035933f86eb2e3a295a9c0ae980f78ab58c935 100755 (executable)
@@ -23,6 +23,13 @@ case $? in
         exit 77
       fi
       ;;
+  1)
+      # Dereferencing NULL exits the program with status 1,
+      # so this test doesn't check the c-stack testing harness like it should.
+      # https://lists.gnu.org/r/grep-devel/2020-09/msg00034.html
+      cat t-c-stack2.tmp >&2
+      echo 'skipping test (perhaps gcc -fsanitize=undefined is in use?)'
+      exit 77;;
   0) (exit 1); exit 1 ;;
 esac
 if grep 'program error' t-c-stack2.tmp >/dev/null ; then