[PATCH] D27234: [libFuzzer] Diff 4 - Split FuzzerUtil implementation for Posix and Windows.

Kostya Serebryany via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 30 14:18:32 PST 2016


kcc added inline comments.


================
Comment at: lib/Fuzzer/FuzzerUtil.h:64
 
+#if LIBFUZZER_WINDOWS
+const void *memmem(const void *haystack, size_t haystacklen,
----------------
zturner wrote:
> kcc wrote:
> > No such ifdefs, please. 
> > Can this be moved to the win-specific file? 
> It is called directly from non platform specific code.  The alternative would be to add a function like `SearchMemory()`, and in Posix file it just calls memmem, and in Win32 it does its own algorithm.  Then update callsites to use `SearchMemory()` instead.
Yes, that would be fine. 


Repository:
  rL LLVM

https://reviews.llvm.org/D27234





More information about the llvm-commits mailing list