[PATCH] D21049: [LibFuzzer] Fix some unit test crashes on OSX.

Dan Liew via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 7 16:46:59 PDT 2016


delcypher updated the summary for this revision.
delcypher updated this revision to Diff 59971.
delcypher added a comment.

- Always pass define when building unit test to simplify CMake code.


http://reviews.llvm.org/D21049

Files:
  lib/Fuzzer/test/CMakeLists.txt

Index: lib/Fuzzer/test/CMakeLists.txt
===================================================================
--- lib/Fuzzer/test/CMakeLists.txt
+++ lib/Fuzzer/test/CMakeLists.txt
@@ -127,6 +127,11 @@
   "${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include"
   )
 
+# For libcxx: Avoid ODR violations by using the same implementation of standard
+# library container types in both LibFuzzer (not built with ASan) and the unit
+# test (built with ASan).
+target_compile_definitions(LLVMFuzzer-Unittest PRIVATE _LIBCPP_HAS_NO_ASAN)
+
 set(TestBinaries ${TestBinaries} LLVMFuzzer-Unittest)
 set_target_properties(LLVMFuzzer-Unittest
   PROPERTIES RUNTIME_OUTPUT_DIRECTORY


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21049.59971.patch
Type: text/x-patch
Size: 668 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160607/2518ca5b/attachment.bin>


More information about the llvm-commits mailing list