[llvm] r227252 - Add a Fuzzer library
chisophugis at gmail.com
Wed Jan 28 14:34:48 PST 2015
On Wed, Jan 28, 2015 at 10:23 PM, Kostya Serebryany <kcc at google.com> wrote:
> On Wed, Jan 28, 2015 at 1:54 PM, Pasi Parviainen <pasi.parviainen at iki.fi>
>> On 28.1.2015 0:08, Kostya Serebryany wrote:
>>> Author: kcc
>>> Date: Tue Jan 27 16:08:41 2015
>>> New Revision: 227252
>>> URL: http://llvm.org/viewvc/llvm-project?rev=227252&view=rev
>>> Add a Fuzzer library
>>> A simple genetic in-process coverage-guided fuzz testing library.
>>> I've used this fuzzer to test clang-format
>>> (it found 12+ bugs, thanks djasper@ for the fixes!)
>>> and it may also help us test other parts of LLVM.
>>> So why not keep it in the LLVM repository?
>>> I plan to add the cmake build rules later (in a separate patch, if
>>> that's ok)
>>> and also add a clang-format-fuzzer target.
>>> See README.txt for details.
>>> Test Plan: Tests will follow separately.
>>> Reviewers: djasper, chandlerc, rnk
>>> Reviewed By: rnk
>>> Subscribers: majnemer, ygribov, dblaikie, llvm-commits
>>> Differential Revision: http://reviews.llvm.org/D7184
>> Putting this library directly under lib/ tree feels a little bit out of
>> place. Perhaps utils/ or even tools/ trees would be more appropriate
>> locations for this library, since most of its value is in testing (on
>> limited environments, see below).
> I don't have any strong opinion here. But none of the reviewers objected.
I somewhat agree with Pasi, but we already have precedent for having stuff
that is sort of out of place in lib so I'm not too worried. E.g.
lib/TableGen (builds a compile-time tool), clang/lib/Headers (contains
builtin headers for user code).
-- Sean Silva
>> Modified: llvm/trunk/lib/CMakeLists.txt
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/
>>> --- llvm/trunk/lib/CMakeLists.txt (original)
>>> +++ llvm/trunk/lib/CMakeLists.txt Tue Jan 27 16:08:41 2015
>>> @@ -17,3 +17,4 @@ add_subdirectory(Target)
>>> Added: llvm/trunk/lib/Fuzzer/CMakeLists.txt
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/
>>> --- llvm/trunk/lib/Fuzzer/CMakeLists.txt (added)
>>> +++ llvm/trunk/lib/Fuzzer/CMakeLists.txt Tue Jan 27 16:08:41 2015
>>> @@ -0,0 +1,9 @@
>>> +add_library(LLVMFuzzer STATIC
>>> + EXCLUDE_FROM_ALL # Do not build if you are not building fuzzers.
>>> + FuzzerCrossOver.cpp
>>> + FuzzerIO.cpp
>>> + FuzzerLoop.cpp
>>> + FuzzerMain.cpp
>>> + FuzzerMutate.cpp
>>> + FuzzerUtil.cpp
>>> + )
>> This target should only be added when build environment can satisfy its
>> requirements (sufficient posix interfaces + asan support), otherwise there
>> will be a build target which is known to fail. Fuzzers depending on this
>> library can then simply enable themselves by existence of this target.
> That's what EXCLUDE_FROM_ALL is for, right?
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits