[llvm] r253526 - Don't search for third party libraries while using MSan

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 16:05:22 PST 2015


Author: rnk
Date: Wed Nov 18 18:05:21 2015
New Revision: 253526

URL: http://llvm.org/viewvc/llvm-project?rev=253526&view=rev
Log:
Don't search for third party libraries while using MSan

On the average user's system, those libraries will not be compiled with
MSan. Prior to this change, the LLVM test suite was full of false
positives from calls from third party libraries to MSan interceptors
like strlen.

We can remove this check if MSan ever grows a suppression mechanism
similar to TSan's.

Modified:
    llvm/trunk/cmake/config-ix.cmake

Modified: llvm/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/config-ix.cmake?rev=253526&r1=253525&r2=253526&view=diff
==============================================================================
--- llvm/trunk/cmake/config-ix.cmake (original)
+++ llvm/trunk/cmake/config-ix.cmake Wed Nov 18 18:05:21 2015
@@ -105,6 +105,12 @@ if( NOT PURE_WINDOWS )
   endif()
   check_library_exists(dl dlopen "" HAVE_LIBDL)
   check_library_exists(rt clock_gettime "" HAVE_LIBRT)
+endif()
+
+# Don't look for these libraries on Windows. Also don't look for them if we're
+# using MSan, since uninstrmented third party code may call MSan interceptors
+# like strlen, leading to false positives.
+if( NOT PURE_WINDOWS AND NOT LLVM_USE_SANITIZER MATCHES "Memory.*")
   if (LLVM_ENABLE_ZLIB)
     check_library_exists(z compress2 "" HAVE_LIBZ)
   else()




More information about the llvm-commits mailing list