diff --git a/Makefile b/Makefile index 5d2f07145f2..8b42ac70655 100644 --- a/Makefile +++ b/Makefile @@ -210,12 +210,15 @@ LDFLAGS_mutrace = -rdynamic DEFINES_mutrace = _DEBUG DEBUG VALID_CONFIG_esan = 1 -CC_esan = $(DEFAULT_CC) -CXX_esan = $(DEFAULT_CXX) -LD_esan = $(DEFAULT_CC) -LDXX_esan = $(DEFAULT_CXX) -CPPFLAGS_esan = -O0 +REQUIRE_CUSTOM_LIBRARIES_esan = 1 +CC_esan = clang +CXX_esan = clang++ +LD_esan = clang +LDXX_esan = clang++ +CPPFLAGS_esan = -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument -fPIE -pie -DGPR_NO_DIRECT_SYSCALLS +LDFLAGS_esan = -fsanitize=thread -fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,) DEFINES_esan = _DEBUG DEBUG GRPC_EXECUTION_CONTEXT_SANITIZER +DEFINES_esan += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=5 diff --git a/build.yaml b/build.yaml index c025b250e93..81fcf4f6a8c 100644 --- a/build.yaml +++ b/build.yaml @@ -2725,8 +2725,18 @@ configs: CPPFLAGS: -O0 DEFINES: _DEBUG DEBUG esan: - CPPFLAGS: -O0 + CC: clang + CPPFLAGS: -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument + -fPIE -pie -DGPR_NO_DIRECT_SYSCALLS + CXX: clang++ DEFINES: _DEBUG DEBUG GRPC_EXECUTION_CONTEXT_SANITIZER + LD: clang + LDFLAGS: -fsanitize=thread -fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,) + LDXX: clang++ + compile_the_world: true + test_environ: + TSAN_OPTIONS: suppressions=tools/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1 + timeout_multiplier: 5 gcov: CC: gcc CPPFLAGS: -O0 -fprofile-arcs -ftest-coverage -Wno-return-type diff --git a/tools/run_tests/configs.json b/tools/run_tests/configs.json index 47ce7862fd4..cd5f99908e7 100644 --- a/tools/run_tests/configs.json +++ b/tools/run_tests/configs.json @@ -65,6 +65,10 @@ "config": "mutrace" }, { - "config": "esan" + "config": "esan", + "environ": { + "TSAN_OPTIONS": "suppressions=tools/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1" + }, + "timeout_multiplier": 5 } ]