<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 1, 2017 at 8:45 AM, Mehdi Amini <span dir="ltr"><<a href="mailto:mehdi.amini@apple.com" target="_blank">mehdi.amini@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-m_-3571478534143144400gmail-"><br>
> On Feb 1, 2017, at 8:34 AM, Michael Kruse via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
><br>
> Hi all,<br>
><br>
> The blog entry [1] suggest that one of the buildbots constantly fuzzes<br>
> clang and clang-format. However, the actual bot [2] only tests the<br>
> fuzzer itself over a well-known set of bugs in standard software (eg.<br>
> Heartbleed [3] seems to be among them).<br>
<br>
</span>Isn’t it this stage? <a href="http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fuzzer/builds/2755/steps/stage2%2Fasan%2Bassertions%20check-fuzzer/logs/stdio" rel="noreferrer" target="_blank">http://lab.llvm.org:8011/build<wbr>ers/sanitizer-x86_64-linux-<wbr>fuzzer/builds/2755/steps/<wbr>stage2%2Fasan%2Bassertions%<wbr>20check-fuzzer/logs/stdio</a><br>
<span class="gmail-m_-3571478534143144400gmail-"><br>
> Has there actually ever been a<br>
> buildbot that fuzzes clang/LLVM itself?<br></span></blockquote><div><br></div><div>Yes, I used to run clang-fuzzer and clang-format-fuzzer on this bot, but not any more. </div><div>The reason is simple -- the bot was always red (well, orange) and the bugs were never fixed. </div><div><br></div><div>Currently we run clang-fuzzer (but not clang-format-fuzzer) on our internal fuzzing infra</div><div>and Richard has fixed at least one bug found this way. </div><div><a href="http://llvm.org/viewvc/llvm-project?view=revision&revision=291030">http://llvm.org/viewvc/llvm-project?view=revision&revision=291030</a><br></div><div><br></div><div>My llvm fuzzing bot was pretty naive and simple. </div><div>If we want proper continuous fuzzing for parts of LLVM we either need to</div><div>build a separate "real" continuous fuzzing process,</div><div>or use an existing one. Luckily, there is one :) </div><div>As a pilot I've recently added the cxa_demangler_fuzzer to <a href="https://github.com/google/oss-fuzz">OSS-Fuzz</a>: </div><div><a href="https://github.com/google/oss-fuzz/tree/master/projects/llvm_libcxxabi" target="_blank">https://github.com/google/oss-<wbr>fuzz/tree/master/projects/<wbr>llvm_libcxxabi</a><br></div><div>It even found one bug which Mehdi already fixed!</div><div><a href="http://llvm.org/viewvc/llvm-project?view=revision&revision=293330">http://llvm.org/viewvc/llvm-project?view=revision&revision=293330</a> </div><div>The bug report itself will become public in ~4 days: </div><div><a href="https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=370">https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=370</a><br></div><div><br></div><div>If we want to run some more llvm fuzzers on OSS-Fuzz I'd be happy to (help) set them up. </div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-m_-3571478534143144400gmail-">
><br>
> Another (obvious?) fuzzing candidate would be the LLVM's bitcode<br>
> reader. I ran afl-fuzz on it and it found lots of failed assertions<br>
> within seconds. Isn't fuzzing done on a regular basis as [1] suggests<br>
> should be done? Should I report the crashes found by it?<br>
<br>
</span>The bitcode reader is known to not be robust against malformed inputs.<br></blockquote><div><br></div><div>Yes, I afraid the bitcode reader (as some other parts of LLVM) are not robust enough to withstand fuzzing. :( </div><div>Note that if we want to use libFuzzer (which is an in-process fuzzer) the target should not assert/abort/exit on any input (if it's not a bug).</div><div><br></div><div>--kcc </div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
—<br>
<span class="gmail-m_-3571478534143144400gmail-HOEnZb"><font color="#888888">Mehdi</font></span></blockquote></div><br></div></div>