[Pcre-svn] [275] code/trunk/maint/ManyConfigTests: Add -fno…

トップ ページ
このメッセージを削除
著者: Subversion repository
日付:  
To: pcre-svn
題目: [Pcre-svn] [275] code/trunk/maint/ManyConfigTests: Add -fno-sanitize= shift to the sanitize=undefined test, and temporarily disable
Revision: 275
          http://www.exim.org/viewvc/pcre2?view=rev&revision=275
Author:   ph10
Date:     2015-05-28 17:48:42 +0100 (Thu, 28 May 2015)
Log Message:
-----------
Add -fno-sanitize=shift to the sanitize=undefined test, and temporarily disable 
the debug test.


Modified Paths:
--------------
    code/trunk/maint/ManyConfigTests


Modified: code/trunk/maint/ManyConfigTests
===================================================================
--- code/trunk/maint/ManyConfigTests    2015-05-20 17:44:17 UTC (rev 274)
+++ code/trunk/maint/ManyConfigTests    2015-05-28 16:48:42 UTC (rev 275)
@@ -27,7 +27,8 @@


useasan=1
useusan=1
-usedebug=1
+# Temporarily disabled.
+usedebug=0
usejit=1
usemain=1
usetmp=1
@@ -200,13 +201,6 @@
\( 3 + 2 \* $usejit \) \* $usevalgrind`
testcount=0

-# This set of tests builds PCRE2 and runs the tests with a variety of configure
-# options, in the current (source) directory. The empty configuration builds
-# with all the default settings. As well as testing that these options work, we
-# use --disable-shared or --disable-static after the default test (which builds
-# both) to save a bit of time by building only one version of the library for
-# the subsequent tests.
-
valgrind=
cvalgrind=
withvalgrind=
@@ -213,6 +207,12 @@
srcdir=.
export srcdir

+if [ $usejit -ne 0 ]; then
+ enable_jit=--enable-jit
+else
+ enable_jit=
+fi
+
# If gcc is in use, run a maximally configured test with -O2, because that can
# throw up warnings that are not detected with -O0. Then run a second test with
# -fsanitize=address, which also may throw up new warnings as well as checking
@@ -220,14 +220,9 @@
# frames by a lot, so run this test with --disable-stack-for-recursion, as
# otherwise RunTest may fail on test 2. Finally, run another test using
# -fsanitize=undefined -std-gnu99 to check for runtime actions that are not
-# well defined.
+# well defined. However, we also use -fno-sanitize=shift to avoid warnings for
+# shifts of negative numbers, which occur in src/pcre2_jit_compile.c.

-if [ $usejit -ne 0 ]; then
-  enable_jit=--enable-jit
-else
-  enable_jit=
-fi
-
 if [ $ISGCC -ne 0 -a $usemain -ne 0 ]; then
   echo "---------- Maximally configured test with -O2 ----------"
   SAVECFLAGS="$CFLAGS"
@@ -243,8 +238,8 @@
     runtest
   fi
   if [ $useusan -ne 0 ]; then
-    echo "------- Maximally configured test with -fsanitize=undefined -std=gnu99 -------"
-    CFLAGS="$OFLAGS $SAVECFLAGS -fsanitize=undefined -std=gnu99"
+    echo "------- Maximally configured test with -fsanitize=undefined -fno-sanitize=shift -std=gnu99 -------"
+    CFLAGS="$OFLAGS $SAVECFLAGS -fsanitize=undefined -fno-sanitize=shift -std=gnu99"
     echo "CFLAGS=$CFLAGS"
     opts="--disable-shared $enable_jit --disable-stack-for-recursion --enable-pcre2-16 --enable-pcre2-32"
     runtest
@@ -252,6 +247,13 @@
   CFLAGS="$OFLAGS $SAVECFLAGS"
 fi


+# This set of tests builds PCRE2 and runs the tests with a variety of configure
+# options, in the current (source) directory. The empty configuration builds
+# with all the default settings. As well as testing that these options work, we
+# use --disable-shared or --disable-static except for the default test (which
+# builds both) to save a bit of time by building only one version of the
+# library for the subsequent tests.
+
echo "---------- CFLAGS for the remaining tests ----------"
echo "CFLAGS=$CFLAGS"