aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar yang-g <yangg@google.com>2016-05-12 16:43:17 -0700
committerGravatar yang-g <yangg@google.com>2016-05-12 16:43:17 -0700
commit6ce4d0b3350b81a932d545011aa966af25bb5350 (patch)
tree9bc88345ce42f4f1918096ac6619d4e8ff965734
parent26dd2b8d6b298b7225f317b66a05646aaefb6a48 (diff)
prepare to enable ubsan in continuous build
-rw-r--r--Makefile4
-rw-r--r--build.yaml8
-rw-r--r--tools/run_tests/configs.json3
-rwxr-xr-xtools/run_tests/dockerize/docker_run_tests.sh1
4 files changed, 11 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index f0a0ebd3eb..220c0c8a4a 100644
--- a/Makefile
+++ b/Makefile
@@ -187,8 +187,8 @@ CC_ubsan = clang
CXX_ubsan = clang++
LD_ubsan = clang
LDXX_ubsan = clang++
-CPPFLAGS_ubsan = -O1 -fsanitize-coverage=edge -fsanitize=undefined -fno-omit-frame-pointer -Wno-unused-command-line-argument
-LDFLAGS_ubsan = -fsanitize=undefined
+CPPFLAGS_ubsan = -O0 -fsanitize-coverage=edge -fsanitize=undefined,unsigned-integer-overflow -fno-omit-frame-pointer -Wno-unused-command-line-argument -Wvarargs
+LDFLAGS_ubsan = -fsanitize=undefined,unsigned-integer-overflow
DEFINES_ubsan = NDEBUG
DEFINES_ubsan += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=1.5
diff --git a/build.yaml b/build.yaml
index 187eb9ca8c..acf630593d 100644
--- a/build.yaml
+++ b/build.yaml
@@ -3255,14 +3255,16 @@ configs:
timeout_multiplier: 5
ubsan:
CC: clang
- CPPFLAGS: -O1 -fsanitize-coverage=edge -fsanitize=undefined -fno-omit-frame-pointer
- -Wno-unused-command-line-argument
+ CPPFLAGS: -O0 -fsanitize-coverage=edge -fsanitize=undefined,unsigned-integer-overflow
+ -fno-omit-frame-pointer -Wno-unused-command-line-argument -Wvarargs
CXX: clang++
DEFINES: NDEBUG
LD: clang
- LDFLAGS: -fsanitize=undefined
+ LDFLAGS: -fsanitize=undefined,unsigned-integer-overflow
LDXX: clang++
compile_the_world: true
+ test_environ:
+ UBSAN_OPTIONS: print_stacktrace=1
timeout_multiplier: 1.5
defaults:
boringssl:
diff --git a/tools/run_tests/configs.json b/tools/run_tests/configs.json
index 325e9aa929..bcc4118d2f 100644
--- a/tools/run_tests/configs.json
+++ b/tools/run_tests/configs.json
@@ -56,6 +56,9 @@
},
{
"config": "ubsan",
+ "environ": {
+ "UBSAN_OPTIONS": "print_stacktrace=1"
+ },
"timeout_multiplier": 1.5
},
{
diff --git a/tools/run_tests/dockerize/docker_run_tests.sh b/tools/run_tests/dockerize/docker_run_tests.sh
index 2fc66c21f5..8c6143d24f 100755
--- a/tools/run_tests/dockerize/docker_run_tests.sh
+++ b/tools/run_tests/dockerize/docker_run_tests.sh
@@ -35,6 +35,7 @@ set -e
export CONFIG=$config
export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer
+export PATH=$PATH:/usr/bin/llvm-symbolizer
# Ensure that programs depending on current-user-ownership of cache directories
# are satisfied (it's being mounted from outside the image).