[llvm] r309899 - Revert "[libFuzzer tests] Use substring comparison in libFuzzer tests"

George Karpenkov via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 2 16:09:57 PDT 2017


Author: george.karpenkov
Date: Wed Aug  2 16:09:57 2017
New Revision: 309899

URL: http://llvm.org/viewvc/llvm-project?rev=309899&view=rev
Log:
Revert "[libFuzzer tests] Use substring comparison in libFuzzer tests"

This reverts commit 3592d8049660dcdd07f7c2e797f2de9790f93111.

Breaks the bots, reverting for now.

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=309899&r1=309898&r2=309899&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/test/InitializeTest.cpp (original)
+++ llvm/trunk/lib/Fuzzer/test/InitializeTest.cpp Wed Aug  2 16:09:57 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) &&
-      !strnstr(reinterpret_cast<const char *>(Data), argv0, Size)) {
+      !strncmp(reinterpret_cast<const char *>(Data), argv0, Size)) {
     fprintf(stderr, "BINGO %s\n", argv0);
     exit(1);
   }




More information about the llvm-commits mailing list