[llvm] r309982 - [libFuzzer] Un-reverting change in tests after fixing the failure on Linux.

George Karpenkov via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 3 13:28:16 PDT 2017


Author: george.karpenkov
Date: Thu Aug  3 13:28:16 2017
New Revision: 309982

URL: http://llvm.org/viewvc/llvm-project?rev=309982&view=rev
Log:
[libFuzzer] Un-reverting change in tests after fixing the failure on Linux.

Differential Revision: https://reviews.llvm.org/D36242

Modified:
    llvm/trunk/lib/Fuzzer/test/InitializeTest.cpp

Modified: llvm/trunk/lib/Fuzzer/test/InitializeTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/test/InitializeTest.cpp?rev=309982&r1=309981&r2=309982&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/test/InitializeTest.cpp (original)
+++ llvm/trunk/lib/Fuzzer/test/InitializeTest.cpp Thu Aug  3 13:28:16 2017
@@ -20,7 +20,7 @@ extern "C" int LLVMFuzzerInitialize(int
 
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   if (Size == strlen(argv0) &&
-      !strncmp(reinterpret_cast<const char *>(Data), argv0, Size)) {
+      !memmem(Data, Size, argv0, Size)) {
     fprintf(stderr, "BINGO %s\n", argv0);
     exit(1);
   }




More information about the llvm-commits mailing list