This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch dev-1.0.1
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git

commit a4697fd76cc75c01e7e7c426b5854b7e398f8b27
Author: Lightman <31928846+lchangli...@users.noreply.github.com>
AuthorDate: Sat Apr 9 19:17:28 2022 +0800

    [fix] fix the problem that using tsan to compile,BE will stack overflow 
when start (#8904)
    
    Currently TSAN can only be compiled using CLang, not GCC.
    And when compiling with -o0, stack overflow occurs at startup, issue #8868.
    A function definition will be reported missing at compile time, the file 
provided in PR #8665 is required.
---
 be/CMakeLists.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt
index ebd9542875..14183cf0d7 100644
--- a/be/CMakeLists.txt
+++ b/be/CMakeLists.txt
@@ -425,7 +425,8 @@ SET(CXX_FLAGS_UBSAN "${CXX_GCC_FLAGS} -O0 -fno-wrapv 
-fsanitize=undefined")
 # Set the flags to the thread sanitizer, also known as "tsan"
 # Turn on sanitizer and debug symbols to get stack traces:
 # Use -Wno-builtin-declaration-mismatch to mute warnings like "new declaration 
‘__tsan_atomic16 __tsan_atomic16_fetch_nand(..."
-SET(CXX_FLAGS_TSAN "${CXX_GCC_FLAGS} -O0 -fsanitize=thread -DTHREAD_SANITIZER 
-Wno-builtin-declaration-mismatch")
+# If use -O0 to compile, BE will stack overflow when start. 
https://github.com/apache/incubator-doris/issues/8868
+SET(CXX_FLAGS_TSAN "${CXX_GCC_FLAGS} -O1 -fsanitize=thread -DTHREAD_SANITIZER 
-Wno-missing-declarations")
 
 # Set compile flags based on the build type.
 if ("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG")


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to