Merge pull request #10826 from ctiller/ubsan

Slow down timers for ubsan builds
reviewable/pr10522/r10^2
Craig Tiller 8 years ago committed by GitHub
commit dc2e0843dc
  1. 2
      Makefile
  2. 2
      build.yaml
  3. 10
      test/core/util/test_config.c

@ -174,7 +174,7 @@ LD_ubsan = clang
LDXX_ubsan = clang++
CPPFLAGS_ubsan = -O0 -fsanitize-coverage=edge -fsanitize=undefined -fno-omit-frame-pointer -Wno-unused-command-line-argument -Wvarargs
LDFLAGS_ubsan = -fsanitize=undefined,unsigned-integer-overflow
DEFINES_ubsan = NDEBUG
DEFINES_ubsan = NDEBUG GRPC_UBSAN
VALID_CONFIG_tsan = 1
REQUIRE_CUSTOM_LIBRARIES_tsan = 1

@ -4467,7 +4467,7 @@ configs:
CPPFLAGS: -O0 -fsanitize-coverage=edge -fsanitize=undefined -fno-omit-frame-pointer
-Wno-unused-command-line-argument -Wvarargs
CXX: clang++
DEFINES: NDEBUG
DEFINES: NDEBUG GRPC_UBSAN
LD: clang
LDFLAGS: -fsanitize=undefined,unsigned-integer-overflow
LDXX: clang++

@ -348,6 +348,14 @@ bool BuiltUnderMsan() {
#endif
}
bool BuiltUnderUbsan() {
#ifdef GRPC_UBSAN
return true;
#else
return false;
#endif
}
int64_t grpc_test_sanitizer_slowdown_factor() {
int64_t sanitizer_multiplier = 1;
if (BuiltUnderValgrind()) {
@ -358,6 +366,8 @@ int64_t grpc_test_sanitizer_slowdown_factor() {
sanitizer_multiplier = 3;
} else if (BuiltUnderMsan()) {
sanitizer_multiplier = 4;
} else if (BuiltUnderUbsan()) {
sanitizer_multiplier = 5;
}
return sanitizer_multiplier;
}

Loading…
Cancel
Save