<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 10, 2015 at 2:14 PM, AlexDenisov <span dir="ltr"><<a href="mailto:1101.debian@gmail.com" target="_blank" onclick="window.open('https://mail.google.com/mail/?view=cm&tf=1&to=1101.debian@gmail.com&cc=&bcc=&su=&body=','_blank');return false;">1101.debian@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">That’s great, thank you for patch.<br>
<span class=""><br>
> r247321 refactors the code so that it should build on Mac.<br>
> I haven't actually tested it on Mac -- so please help me and send follow up patches if needed.<br>
<br>
<br>
</span>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’).<br></blockquote><div><br></div><div>Weird. This should not be needed if -fsanitize=address is provided to the link command. </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<span class=""><br>
> check-fuzzer will still fail because some of the libFuzzer tests require dfsan.<br>
<br>
</span>make doesn’t see check-fuzzer rule, seems it’s disabled somewhere in CMakeLists, I’m going to investigate.<br></blockquote><div><br></div><div>check-fuzzer appears only with cmake option <span style="color:rgb(0,0,0);font-family:Consolas,'Deja Vu Sans Mono','Bitstream Vera Sans Mono',monospace;font-size:0.95em;line-height:15.96px;background-color:rgb(248,248,248)"> -DLLVM_USE_SANITIZE_COVERAGE=YES</span></div><div><span style="color:rgb(0,0,0);font-family:Consolas,'Deja Vu Sans Mono','Bitstream Vera Sans Mono',monospace;font-size:0.95em;line-height:15.96px;background-color:rgb(248,248,248)">See </span><font color="#000000" face="Consolas, Deja Vu Sans Mono, Bitstream Vera Sans Mono, monospace"><span style="font-size:12.35px;line-height:15.96px"><a href="http://llvm.org/docs/LibFuzzer.html#fuzzing-components-of-llvm">http://llvm.org/docs/LibFuzzer.html#fuzzing-components-of-llvm</a></span></font></div>I never tried it Mac though <div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<span class=""><br>
> 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.<br>
<br>
</span>Please, don’t hesitate to CC me and I’ll run tests on my machine.<br>
<span class=""><br>
> If anyone wants it quicker -- patches are welcome.<br>
<br>
</span>I’d be happy to send them, but I know nothing about LibFuzzer internals :)<br></blockquote><div><br></div><div>That should be done not in libFuzzer code, but in CMake files in lib/Fuzzer/test</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<span class="im">--<br>
AlexDenisov<br>
Software Engineer, <a href="http://lowlevelbits.org" rel="noreferrer" target="_blank">http://lowlevelbits.org</a><br>
<br>
</span><div class=""><div class="h5">> On 10 Sep 2015, at 20:52, Kostya Serebryany <<a href="mailto:kcc@google.com" onclick="window.open('https://mail.google.com/mail/?view=cm&tf=1&to=kcc@google.com&cc=&bcc=&su=&body=','_blank');return false;">kcc@google.com</a>> wrote:<br>
><br>
> r247321 refactors the code so that it should build on Mac.<br>
> I haven't actually tested it on Mac -- so please help me and send follow up patches if needed.<br>
><br>
> check-fuzzer will still fail because some of the libFuzzer tests require dfsan.<br>
> 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.<br>
><br>
> Thanks,<br>
><br>
> --kcc<br>
><br>
> On Wed, Sep 9, 2015 at 9:41 AM, Kostya Serebryany <<a href="mailto:kcc@google.com" onclick="window.open('https://mail.google.com/mail/?view=cm&tf=1&to=kcc@google.com&cc=&bcc=&su=&body=','_blank');return false;">kcc@google.com</a>> wrote:<br>
><br>
><br>
> On Wed, Sep 9, 2015 at 12:57 AM, AlexDenisov via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" onclick="window.open('https://mail.google.com/mail/?view=cm&tf=1&to=llvm-dev@lists.llvm.org&cc=&bcc=&su=&body=','_blank');return false;">llvm-dev@lists.llvm.org</a>> wrote:<br>
> Hi there.<br>
><br>
> I’m trying to use LibFuzzer on OSX and face some issues:<br>
> I checked out LibFuzzer documentation[1] and managed to proceed until the final step of the first example.<br>
> 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.”.<br>
><br>
> Yes, libFuzzer does not build on OSX today.<br>
> Marshall (CC-ed) has managed to make it work with a couple of #ifdefs in FuzzerTraceState.cpp.<br>
><br>
> 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.<br>
> If anyone wants it quicker -- patches are welcome.<br>
> I would also appreciate if someone can set up a build bot for libFuzzer on Mac :)<br>
> (similar to <a href="http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fuzzer" rel="noreferrer" target="_blank">lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fuzzer</a>)<br>
><br>
><br>
> Does it mean that LibFuzzer available only on Linux platform? Can somebody confirm or refute my conclusion?<br>
><br>
> [1] <a href="http://llvm.org/docs/LibFuzzer.html" rel="noreferrer" target="_blank">http://llvm.org/docs/LibFuzzer.html</a><br>
> [2] <a href="http://clang.llvm.org/docs/DataFlowSanitizer.html" rel="noreferrer" target="_blank">http://clang.llvm.org/docs/DataFlowSanitizer.html</a><br>
> --<br>
> AlexDenisov<br>
> Software Engineer, <a href="http://lowlevelbits.org" rel="noreferrer" target="_blank">http://lowlevelbits.org</a><br>
><br>
><br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org" onclick="window.open('https://mail.google.com/mail/?view=cm&tf=1&to=llvm-dev@lists.llvm.org&cc=&bcc=&su=&body=','_blank');return false;">llvm-dev@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
><br>
><br>
><br>
<br>
</div></div></blockquote></div><br></div></div>