[llvm] r291918 - Fix UBSan bots by blacklisting bits/stl_tree.h.
Ivan Krasin via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 13 09:30:11 PST 2017
Author: krasin
Date: Fri Jan 13 11:30:10 2017
New Revision: 291918
URL: http://llvm.org/viewvc/llvm-project?rev=291918&view=rev
Log:
Fix UBSan bots by blacklisting bits/stl_tree.h.
Summary:
libstdc++ has some undefined behavior in bits/stl_tree.h that
has recently became excercised by some of the LLVM code.
Given that fixing libstdc++ will take years, adding the file
into a blacklist to fix bots seems like a necessity.
Reviewers: vitalybuka
Subscribers: llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D28686
Added:
llvm/trunk/utils/sanitizers/
llvm/trunk/utils/sanitizers/ubsan_blacklist.txt
Modified:
llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
Modified: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/HandleLLVMOptions.cmake?rev=291918&r1=291917&r2=291918&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Fri Jan 13 11:30:10 2017
@@ -555,6 +555,8 @@ if(LLVM_USE_SANITIZER)
append_common_sanitizer_flags()
append("-fsanitize=undefined -fno-sanitize=vptr,function -fno-sanitize-recover=all"
CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-fsanitize-blacklist=${CMAKE_SOURCE_DIR}/utils/sanitizers/ubsan_blacklist.txt"
+ CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
elseif (LLVM_USE_SANITIZER STREQUAL "Thread")
append_common_sanitizer_flags()
append("-fsanitize=thread" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
Added: llvm/trunk/utils/sanitizers/ubsan_blacklist.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/sanitizers/ubsan_blacklist.txt?rev=291918&view=auto
==============================================================================
--- llvm/trunk/utils/sanitizers/ubsan_blacklist.txt (added)
+++ llvm/trunk/utils/sanitizers/ubsan_blacklist.txt Fri Jan 13 11:30:10 2017
@@ -0,0 +1,7 @@
+# This blacklist should be applied when LLVM is built
+# with -fsanitize=undefined instrumentation. It exists
+# because libstdc++ has some undefined behavior issues
+# in some of the headers, in particular, stl_tree.h.
+
+# upcast of address with insufficient space for an object of type std::_Rb_tree_node<...>
+src:*bits/stl_tree.h
More information about the llvm-commits
mailing list