summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-06-18 21:24:52 +0300
committerAndrei Karas <akaras@inbox.ru>2018-06-18 21:24:52 +0300
commitc29faaccaab1f4e662b176b4d5ab9fda8d8546a5 (patch)
tree727439b0e03da6f4b5ce11b2cf4c80c9e5a3bc11
parent8950be6472a83942964e7f50be23381bf47cc4f3 (diff)
downloadplus-c29faaccaab1f4e662b176b4d5ab9fda8d8546a5.tar.gz
plus-c29faaccaab1f4e662b176b4d5ab9fda8d8546a5.tar.bz2
plus-c29faaccaab1f4e662b176b4d5ab9fda8d8546a5.tar.xz
plus-c29faaccaab1f4e662b176b4d5ab9fda8d8546a5.zip
Add flag -D_GLIBCXX_SANITIZE_VECTOR into asan builds.
-rwxr-xr-xbuild/bmakedebug2
-rwxr-xr-xbuild/bmakedebugsdl22
-rw-r--r--tools/ci/branches/ci_gcc7_tests/.gitlab-ci.yml6
-rwxr-xr-xtools/ci/jobs/gcc49_sanitize.sh1
-rwxr-xr-xtools/ci/jobs/gcc49_sanitize_tests.sh1
-rwxr-xr-xtools/ci/jobs/gcc5_sanitize.sh1
-rwxr-xr-xtools/ci/jobs/gcc5_sanitize_tests.sh1
-rwxr-xr-xtools/ci/jobs/gcc6_sanitize.sh1
-rwxr-xr-xtools/ci/jobs/gcc6_sanitize_tests.sh1
-rwxr-xr-xtools/ci/jobs/gcc7_sanitize.sh1
-rwxr-xr-xtools/ci/jobs/gcc7_sanitize_tests.sh1
-rwxr-xr-xtools/ci/jobs/gcc8_sanitize.sh1
-rwxr-xr-xtools/ci/jobs/gcc8_sanitize_tests.sh1
-rwxr-xr-xtools/ci/jobs/gccsnapshot_sanitize_tests.sh1
14 files changed, 17 insertions, 4 deletions
diff --git a/build/bmakedebug b/build/bmakedebug
index a47c160e0..885d41a08 100755
--- a/build/bmakedebug
+++ b/build/bmakedebug
@@ -11,7 +11,7 @@ export CXX="ccache g++"
export LANG=C
export CXXFLAGS="-pedantic -ggdb3 -O3 -pipe -ffast-math \
--D_FORTIFY_SOURCE=2 \
+-D_FORTIFY_SOURCE=2 -D_GLIBCXX_SANITIZE_VECTOR \
-fno-omit-frame-pointer \
-fsanitize=address -fsanitize=undefined \
-fsanitize=shift -fsanitize=integer-divide-by-zero -fsanitize=unreachable \
diff --git a/build/bmakedebugsdl2 b/build/bmakedebugsdl2
index 9fbe624a1..66f304e87 100755
--- a/build/bmakedebugsdl2
+++ b/build/bmakedebugsdl2
@@ -11,7 +11,7 @@ export CXX="ccache g++"
export LANG=C
export CXXFLAGS="-pedantic -ggdb3 -O3 -pipe -ffast-math \
--D_FORTIFY_SOURCE=2 \
+-D_FORTIFY_SOURCE=2 -D_GLIBCXX_SANITIZE_VECTOR \
-fno-omit-frame-pointer \
-fsanitize=address -fsanitize=undefined \
-fsanitize=shift -fsanitize=integer-divide-by-zero -fsanitize=unreachable \
diff --git a/tools/ci/branches/ci_gcc7_tests/.gitlab-ci.yml b/tools/ci/branches/ci_gcc7_tests/.gitlab-ci.yml
index a2e41fb34..e73ac0229 100644
--- a/tools/ci/branches/ci_gcc7_tests/.gitlab-ci.yml
+++ b/tools/ci/branches/ci_gcc7_tests/.gitlab-ci.yml
@@ -225,7 +225,8 @@ gcc-7_separate_doctest_sanitize:
<<: *job-push
variables:
LSAN_OPTIONS: "suppressions=./tools/ci/scripts/lsansuppression_tests.txt"
- POST_CXXFLAGS: "-fsanitize=address -fsanitize=undefined
+ POST_CXXFLAGS: "-D_GLIBCXX_SANITIZE_VECTOR
+ -fsanitize=address -fsanitize=undefined
-fsanitize=shift -fsanitize=integer-divide-by-zero -fsanitize=unreachable
-fsanitize=vla-bound -fsanitize=null -fsanitize=return
-fsanitize=signed-integer-overflow -fsanitize=bounds -fsanitize=alignment
@@ -249,7 +250,8 @@ gcc-7_separate_doctest_sanitize_sdl2:
<<: *job-push
variables:
LSAN_OPTIONS: "suppressions=./tools/ci/scripts/lsansuppression_tests.txt"
- POST_CXXFLAGS: "-fsanitize=address -fsanitize=undefined
+ POST_CXXFLAGS: "-D_GLIBCXX_SANITIZE_VECTOR
+ -fsanitize=address -fsanitize=undefined
-fsanitize=shift -fsanitize=integer-divide-by-zero -fsanitize=unreachable
-fsanitize=vla-bound -fsanitize=null -fsanitize=return
-fsanitize=signed-integer-overflow -fsanitize=bounds -fsanitize=alignment
diff --git a/tools/ci/jobs/gcc49_sanitize.sh b/tools/ci/jobs/gcc49_sanitize.sh
index 5610399d0..66a33e84a 100755
--- a/tools/ci/jobs/gcc49_sanitize.sh
+++ b/tools/ci/jobs/gcc49_sanitize.sh
@@ -15,6 +15,7 @@ export LOGFILE=gcc49.log
source ./tools/ci/scripts/init.sh
export CXXFLAGS="$CXXFLAGS -ggdb3 -O2 -ffast-math \
+-D_GLIBCXX_SANITIZE_VECTOR \
-fsanitize=address \
-fno-omit-frame-pointer -funswitch-loops \
-Wvariadic-macros -Wvla -Wredundant-decls \
diff --git a/tools/ci/jobs/gcc49_sanitize_tests.sh b/tools/ci/jobs/gcc49_sanitize_tests.sh
index 329df4509..cfb30f2c7 100755
--- a/tools/ci/jobs/gcc49_sanitize_tests.sh
+++ b/tools/ci/jobs/gcc49_sanitize_tests.sh
@@ -15,6 +15,7 @@ export LOGFILE=gcc49_tests.log
source ./tools/ci/scripts/init.sh
export CXXFLAGS="$CXXFLAGS -ggdb3 -O2 -ffast-math \
+-D_GLIBCXX_SANITIZE_VECTOR \
-fsanitize=address \
-fno-omit-frame-pointer -funswitch-loops \
-Wvariadic-macros -Wvla -Wredundant-decls \
diff --git a/tools/ci/jobs/gcc5_sanitize.sh b/tools/ci/jobs/gcc5_sanitize.sh
index bfbbf75ce..cc8b0f9ae 100755
--- a/tools/ci/jobs/gcc5_sanitize.sh
+++ b/tools/ci/jobs/gcc5_sanitize.sh
@@ -15,6 +15,7 @@ export LOGFILE=gcc5_sanitize.log
source ./tools/ci/scripts/init.sh
export CXXFLAGS="$CXXFLAGS -ggdb3 -O2 -pipe -ffast-math \
+-D_GLIBCXX_SANITIZE_VECTOR \
-fsanitize=address -fsanitize=undefined \
-fsanitize=shift -fsanitize=integer-divide-by-zero -fsanitize=unreachable \
-fsanitize=vla-bound -fsanitize=null -fsanitize=return \
diff --git a/tools/ci/jobs/gcc5_sanitize_tests.sh b/tools/ci/jobs/gcc5_sanitize_tests.sh
index 35c671f21..24a2f7104 100755
--- a/tools/ci/jobs/gcc5_sanitize_tests.sh
+++ b/tools/ci/jobs/gcc5_sanitize_tests.sh
@@ -15,6 +15,7 @@ export LOGFILE=gcc5_tests.log
source ./tools/ci/scripts/init.sh
export CXXFLAGS="-ggdb3 -O2 -ffast-math \
+-D_GLIBCXX_SANITIZE_VECTOR \
-fsanitize=address -fsanitize=undefined \
-fsanitize=shift -fsanitize=integer-divide-by-zero -fsanitize=unreachable \
-fsanitize=vla-bound -fsanitize=null -fsanitize=return \
diff --git a/tools/ci/jobs/gcc6_sanitize.sh b/tools/ci/jobs/gcc6_sanitize.sh
index db805c2e6..a0f02ed7d 100755
--- a/tools/ci/jobs/gcc6_sanitize.sh
+++ b/tools/ci/jobs/gcc6_sanitize.sh
@@ -15,6 +15,7 @@ export LOGFILE=gcc6.log
source ./tools/ci/scripts/init.sh
export CXXFLAGS="$CXXFLAGS -pedantic -ggdb3 -O2 -pipe -Wstrict-aliasing=2 \
+-D_GLIBCXX_SANITIZE_VECTOR \
-Wstrict-overflow=1 -Wformat=1 -D_FORTIFY_SOURCE=2 \
-fsanitize=address -fsanitize=undefined \
-fsanitize=shift -fsanitize=integer-divide-by-zero -fsanitize=unreachable \
diff --git a/tools/ci/jobs/gcc6_sanitize_tests.sh b/tools/ci/jobs/gcc6_sanitize_tests.sh
index 8f584e8eb..a94d4ffcc 100755
--- a/tools/ci/jobs/gcc6_sanitize_tests.sh
+++ b/tools/ci/jobs/gcc6_sanitize_tests.sh
@@ -17,6 +17,7 @@ source ./tools/ci/scripts/init.sh
export CXXFLAGS="$CXXFLAGS -pedantic -ggdb3 -O2 -Wstrict-aliasing=2 \
-Wstrict-overflow=1 -Wformat=1 -D_FORTIFY_SOURCE=2 \
-fno-omit-frame-pointer \
+-D_GLIBCXX_SANITIZE_VECTOR \
-fsanitize=address -fsanitize=undefined \
-fsanitize=shift -fsanitize=integer-divide-by-zero -fsanitize=unreachable \
-fsanitize=vla-bound -fsanitize=null -fsanitize=return \
diff --git a/tools/ci/jobs/gcc7_sanitize.sh b/tools/ci/jobs/gcc7_sanitize.sh
index f442ed53d..79b6a80f8 100755
--- a/tools/ci/jobs/gcc7_sanitize.sh
+++ b/tools/ci/jobs/gcc7_sanitize.sh
@@ -15,6 +15,7 @@ export LOGFILE=gcc7.log
source ./tools/ci/scripts/init.sh
export CXXFLAGS="$CXXFLAGS -pedantic -ggdb3 -O2 -pipe -Wstrict-aliasing=2 \
+-D_GLIBCXX_SANITIZE_VECTOR \
-Wstrict-overflow=1 -Wformat=1 -D_FORTIFY_SOURCE=2 \
-fsanitize=address -fsanitize=undefined \
-fsanitize=shift -fsanitize=integer-divide-by-zero -fsanitize=unreachable \
diff --git a/tools/ci/jobs/gcc7_sanitize_tests.sh b/tools/ci/jobs/gcc7_sanitize_tests.sh
index 62c1ddc2d..30d596005 100755
--- a/tools/ci/jobs/gcc7_sanitize_tests.sh
+++ b/tools/ci/jobs/gcc7_sanitize_tests.sh
@@ -15,6 +15,7 @@ export LOGFILE=gcc7.log
source ./tools/ci/scripts/init.sh
export CXXFLAGS="$CXXFLAGS -pedantic -ggdb3 -O2 -Wstrict-aliasing=2 \
+-D_GLIBCXX_SANITIZE_VECTOR \
-Wstrict-overflow=1 -Wformat=1 -D_FORTIFY_SOURCE=2 \
-fno-omit-frame-pointer \
-fsanitize=address -fsanitize=undefined \
diff --git a/tools/ci/jobs/gcc8_sanitize.sh b/tools/ci/jobs/gcc8_sanitize.sh
index 2c9434e94..e93541e05 100755
--- a/tools/ci/jobs/gcc8_sanitize.sh
+++ b/tools/ci/jobs/gcc8_sanitize.sh
@@ -15,6 +15,7 @@ export LOGFILE=gcc8.log
source ./tools/ci/scripts/init.sh
export CXXFLAGS="$CXXFLAGS -pedantic -ggdb3 -O2 -pipe -Wstrict-aliasing=2 \
+-D_GLIBCXX_SANITIZE_VECTOR \
-Wstrict-overflow=1 -Wformat=1 -D_FORTIFY_SOURCE=2 \
-fsanitize=address -fsanitize=undefined \
-fsanitize=shift -fsanitize=integer-divide-by-zero -fsanitize=unreachable \
diff --git a/tools/ci/jobs/gcc8_sanitize_tests.sh b/tools/ci/jobs/gcc8_sanitize_tests.sh
index 991052a5b..8ed4a0af0 100755
--- a/tools/ci/jobs/gcc8_sanitize_tests.sh
+++ b/tools/ci/jobs/gcc8_sanitize_tests.sh
@@ -15,6 +15,7 @@ export LOGFILE=gcc8.log
source ./tools/ci/scripts/init.sh
export CXXFLAGS="$CXXFLAGS -pedantic -ggdb3 -O2 -Wstrict-aliasing=2 \
+-D_GLIBCXX_SANITIZE_VECTOR \
-Wstrict-overflow=1 -Wformat=1 -D_FORTIFY_SOURCE=2 \
-fno-omit-frame-pointer \
-fsanitize=address -fsanitize=undefined \
diff --git a/tools/ci/jobs/gccsnapshot_sanitize_tests.sh b/tools/ci/jobs/gccsnapshot_sanitize_tests.sh
index 5b0b3bb31..9fec80b7c 100755
--- a/tools/ci/jobs/gccsnapshot_sanitize_tests.sh
+++ b/tools/ci/jobs/gccsnapshot_sanitize_tests.sh
@@ -20,6 +20,7 @@ export PATH=/usr/lib/gcc-snapshot/bin:$PATH
source ./tools/ci/scripts/init.sh
export CXXFLAGS="$CXXFLAGS -pedantic -ggdb3 -O2 -Wstrict-aliasing=2 \
+-D_GLIBCXX_SANITIZE_VECTOR \
-fno-omit-frame-pointer \
-Wstrict-overflow=1 -Wformat=1 -D_FORTIFY_SOURCE=2 \
-fsanitize=address -fsanitize=undefined \