Kostya Serebryany via llvm-dev
2015-Sep-10 18:52 UTC
[llvm-dev] LibFuzzer and platforms availability
r247321 refactors the code so that it should build on Mac. I haven't actually tested it on Mac -- so please help me and send follow up patches if needed. check-fuzzer will still fail because some of the libFuzzer tests require dfsan. I'd use some help from someone with a Mac to modify lib/Fuzzer/test/CMakeLists.txt so that it does not run dfsan-dependent tests on Mac. Thanks, --kcc On Wed, Sep 9, 2015 at 9:41 AM, Kostya Serebryany <kcc at google.com> wrote:> > > On Wed, Sep 9, 2015 at 12:57 AM, AlexDenisov via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Hi there. >> >> I’m trying to use LibFuzzer on OSX and face some issues: >> I checked out LibFuzzer documentation[1] and managed to proceed until the >> final step of the first example. >> Now I see linker errors related to dfsan, dfsan’s documentation[2] states >> explicitly “DataFlowSanitizer is a work in progress, currently under >> development for x86_64 Linux.”. >> > > Yes, libFuzzer does not build on OSX today. > Marshall (CC-ed) has managed to make it work with a couple of #ifdefs > in FuzzerTraceState.cpp. > > I'll try to commit such patches later this week, but I don't have a Mac so > it will be harder for me to test. > If anyone wants it quicker -- patches are welcome. > I would also appreciate if someone can set up a build bot for libFuzzer on > Mac :) > (similar to lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fuzzer) > > >> >> Does it mean that LibFuzzer available only on Linux platform? Can >> somebody confirm or refute my conclusion? >> >> [1] http://llvm.org/docs/LibFuzzer.html >> [2] http://clang.llvm.org/docs/DataFlowSanitizer.html >> -- >> AlexDenisov >> Software Engineer, http://lowlevelbits.org >> >> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150910/811fed81/attachment.html>
AlexDenisov via llvm-dev
2015-Sep-10 21:14 UTC
[llvm-dev] LibFuzzer and platforms availability
That’s great, thank you for patch.> r247321 refactors the code so that it should build on Mac. > I haven't actually tested it on Mac -- so please help me and send follow up patches if needed.I can confirm that first example worked as expected (with some additions: '-I path_to_compiler_rt/include' when build LibFuzzer and ‘-lclang_rt.asan_osx_dynamic -L path_to_libs/clang/3.8.0/lib/darwin’).> check-fuzzer will still fail because some of the libFuzzer tests require dfsan.make doesn’t see check-fuzzer rule, seems it’s disabled somewhere in CMakeLists, I’m going to investigate.> I'll try to commit such patches later this week, but I don't have a Mac so it will be harder for me to test.Please, don’t hesitate to CC me and I’ll run tests on my machine.> If anyone wants it quicker -- patches are welcome.I’d be happy to send them, but I know nothing about LibFuzzer internals :) -- AlexDenisov Software Engineer, http://lowlevelbits.org> On 10 Sep 2015, at 20:52, Kostya Serebryany <kcc at google.com> wrote: > > r247321 refactors the code so that it should build on Mac. > I haven't actually tested it on Mac -- so please help me and send follow up patches if needed. > > check-fuzzer will still fail because some of the libFuzzer tests require dfsan. > I'd use some help from someone with a Mac to modify lib/Fuzzer/test/CMakeLists.txt so that it does not run dfsan-dependent tests on Mac. > > Thanks, > > --kcc > > On Wed, Sep 9, 2015 at 9:41 AM, Kostya Serebryany <kcc at google.com> wrote: > > > On Wed, Sep 9, 2015 at 12:57 AM, AlexDenisov via llvm-dev <llvm-dev at lists.llvm.org> wrote: > Hi there. > > I’m trying to use LibFuzzer on OSX and face some issues: > I checked out LibFuzzer documentation[1] and managed to proceed until the final step of the first example. > Now I see linker errors related to dfsan, dfsan’s documentation[2] states explicitly “DataFlowSanitizer is a work in progress, currently under development for x86_64 Linux.”. > > Yes, libFuzzer does not build on OSX today. > Marshall (CC-ed) has managed to make it work with a couple of #ifdefs in FuzzerTraceState.cpp. > > I'll try to commit such patches later this week, but I don't have a Mac so it will be harder for me to test. > If anyone wants it quicker -- patches are welcome. > I would also appreciate if someone can set up a build bot for libFuzzer on Mac :) > (similar to lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fuzzer) > > > Does it mean that LibFuzzer available only on Linux platform? Can somebody confirm or refute my conclusion? > > [1] http://llvm.org/docs/LibFuzzer.html > [2] http://clang.llvm.org/docs/DataFlowSanitizer.html > -- > AlexDenisov > Software Engineer, http://lowlevelbits.org > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > > >-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 496 bytes Desc: Message signed with OpenPGP using GPGMail URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150910/bcc5b647/attachment.sig>
Kostya Serebryany via llvm-dev
2015-Sep-10 22:11 UTC
[llvm-dev] LibFuzzer and platforms availability
On Thu, Sep 10, 2015 at 2:14 PM, AlexDenisov <1101.debian at gmail.com> wrote:> That’s great, thank you for patch. > > > r247321 refactors the code so that it should build on Mac. > > I haven't actually tested it on Mac -- so please help me and send follow > up patches if needed. > > > I can confirm that first example worked as expected (with some additions: > '-I path_to_compiler_rt/include' when build LibFuzzer and > ‘-lclang_rt.asan_osx_dynamic -L path_to_libs/clang/3.8.0/lib/darwin’). >Weird. This should not be needed if -fsanitize=address is provided to the link command.> > > check-fuzzer will still fail because some of the libFuzzer tests require > dfsan. > > make doesn’t see check-fuzzer rule, seems it’s disabled somewhere in > CMakeLists, I’m going to investigate. >check-fuzzer appears only with cmake option -DLLVM_USE_SANITIZE_COVERAGE=YES See http://llvm.org/docs/LibFuzzer.html#fuzzing-components-of-llvm I never tried it Mac though> > > I'll try to commit such patches later this week, but I don't have a Mac > so it will be harder for me to test. > > Please, don’t hesitate to CC me and I’ll run tests on my machine. > > > If anyone wants it quicker -- patches are welcome. > > I’d be happy to send them, but I know nothing about LibFuzzer internals :) >That should be done not in libFuzzer code, but in CMake files in lib/Fuzzer/test> -- > AlexDenisov > Software Engineer, http://lowlevelbits.org > > > On 10 Sep 2015, at 20:52, Kostya Serebryany <kcc at google.com> wrote: > > > > r247321 refactors the code so that it should build on Mac. > > I haven't actually tested it on Mac -- so please help me and send follow > up patches if needed. > > > > check-fuzzer will still fail because some of the libFuzzer tests require > dfsan. > > I'd use some help from someone with a Mac to modify > lib/Fuzzer/test/CMakeLists.txt so that it does not run dfsan-dependent > tests on Mac. > > > > Thanks, > > > > --kcc > > > > On Wed, Sep 9, 2015 at 9:41 AM, Kostya Serebryany <kcc at google.com> > wrote: > > > > > > On Wed, Sep 9, 2015 at 12:57 AM, AlexDenisov via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > Hi there. > > > > I’m trying to use LibFuzzer on OSX and face some issues: > > I checked out LibFuzzer documentation[1] and managed to proceed until > the final step of the first example. > > Now I see linker errors related to dfsan, dfsan’s documentation[2] > states explicitly “DataFlowSanitizer is a work in progress, currently under > development for x86_64 Linux.”. > > > > Yes, libFuzzer does not build on OSX today. > > Marshall (CC-ed) has managed to make it work with a couple of #ifdefs in > FuzzerTraceState.cpp. > > > > I'll try to commit such patches later this week, but I don't have a Mac > so it will be harder for me to test. > > If anyone wants it quicker -- patches are welcome. > > I would also appreciate if someone can set up a build bot for libFuzzer > on Mac :) > > (similar to lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fuzzer) > > > > > > Does it mean that LibFuzzer available only on Linux platform? Can > somebody confirm or refute my conclusion? > > > > [1] http://llvm.org/docs/LibFuzzer.html > > [2] http://clang.llvm.org/docs/DataFlowSanitizer.html > > -- > > AlexDenisov > > Software Engineer, http://lowlevelbits.org > > > > > > _______________________________________________ > > LLVM Developers mailing list > > llvm-dev at lists.llvm.org > > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > > > > > > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150910/88e6324a/attachment.html>