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

Dan Liew via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 9 21:42:05 PDT 2016


delcypher updated this revision to Diff 60306.
delcypher added a comment.

- Put preprocessor define in FuzzerUnittest.cpp rather than in the CMakeLists.txt file


http://reviews.llvm.org/D21049

Files:
  lib/Fuzzer/test/FuzzerUnittest.cpp

Index: lib/Fuzzer/test/FuzzerUnittest.cpp
===================================================================
--- lib/Fuzzer/test/FuzzerUnittest.cpp
+++ lib/Fuzzer/test/FuzzerUnittest.cpp
@@ -1,6 +1,10 @@
 // This file is distributed under the University of Illinois Open Source
 // License. See LICENSE.TXT for details.
 
+// Avoid ODR violations (LibFuzzer is built without ASan and this test is built
+// with ASan) involving C++ standard library types when using libcxx.
+#define _LIBCPP_HAS_NO_ASAN
+
 #include "FuzzerInternal.h"
 #include "gtest/gtest.h"
 #include <memory>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21049.60306.patch
Type: text/x-patch
Size: 580 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160610/8b64b926/attachment.bin>


More information about the llvm-commits mailing list