<div dir="ltr">+mascasa@ FYI<div><br></div><div>Also, I am going to file a bug to implement some improvements in the way we build and use fuzz targets in LLVM.</div><div><br></div><div>And, take a look at the last night's trophies: <a href="https://bugs.chromium.org/p/oss-fuzz/issues/list?q=label:Proj-llvm">https://bugs.chromium.org/p/oss-fuzz/issues/list?q=label:Proj-llvm</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 24, 2017 at 11:47 AM, George Karpenkov <span dir="ltr"><<a href="mailto:ekarpenkov@apple.com" target="_blank">ekarpenkov@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Indeed, I can reproduce in release build. Looking into it.<br>
As a workaround, for now you could try to use debug build of fuzzers.<br>
<div class="HOEnZb"><div class="h5">> On Aug 24, 2017, at 11:39 AM, Justin Bogner <<a href="mailto:mail@justinbogner.com">mail@justinbogner.com</a>> wrote:<br>
><br>
> George Karpenkov <<a href="mailto:ekarpenkov@apple.com">ekarpenkov@apple.com</a>> writes:<br>
>> Should -DCMAKE_CXX_COMPILER be also specified?<br>
><br>
> CMake is smart enough to infer that from C_COMPILER:<br>
><br>
>  % grep CMAKE_CXX_COMPILER CMakeCache.txt<br>
>  CMAKE_CXX_COMPILER:FILEPATH=/<wbr>Users/bogner/llvm-lkgc/bin/<wbr>clang++<br>
><br>
>>> On Aug 24, 2017, at 11:29 AM, Justin Bogner <<a href="mailto:mail@justinbogner.com">mail@justinbogner.com</a>> wrote:<br>
>>><br>
>>> (kcc, george: sorry for the re-send, the first was from a non-list email<br>
>>> address)<br>
>>><br>
>>> My configuration for building the fuzzers in the LLVM tree doesn't seem to<br>
>>> work any more (possibly as of moving libFuzzer to compiler-rt, but there<br>
>>> have been a few other changes in the last week or so that may be related).<br>
>>><br>
>>> I'm building with a fresh top-of-tree clang and setting<br>
>>> -DLLVM_USE_SANITIZER=Address and -DLLVM_USE_SANITIZE_COVERAGE=<wbr>On, which<br>
>>> was working before:<br>
>>><br>
>>> % cmake -GNinja \<br>
>>>         -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=On \<br>
>>>         -DLLVM_ENABLE_WERROR=On \<br>
>>>         -DLLVM_USE_SANITIZER=Address -DLLVM_USE_SANITIZE_COVERAGE=<wbr>On \<br>
>>>         -DCMAKE_C_COMPILER=$HOME/llvm-<wbr>lkgc/bin/clang \<br>
>>>         $HOME/code/llvm-src<br>
>>><br>
>>> But when I run any of the fuzzers, it looks like the sanitizer coverage<br>
>>> hasn't been set up correctly:<br>
>>><br>
>>> % ./bin/llvm-as-fuzzer                                                                                   2017-08-24 11:14:33<br>
>>> INFO: Seed: 4089166883<br>
>>> INFO: Loaded 1 modules   (50607 guards): 50607 [0x10e14ef80, 0x10e18063c),<br>
>>> INFO: Loaded 1 PC tables (0 PCs): 0 [0x10e2870a8,0x10e2870a8),<br>
>>> ERROR: The size of coverage PC tables does not match the number of instrumented PCs. This might be a bug in the compiler, please contact the libFuzzer developers.<br>
>>><br>
>>> From the build logs, it looks like we're now building objects with these<br>
>>> sanitizer flags:<br>
>>><br>
>>> -fsanitize=address<br>
>>> -fsanitize-address-use-after-<wbr>scope<br>
>>> -fsanitize=fuzzer-no-link<br>
>>><br>
>>> We're then linking the fuzzer binaries with these:<br>
>>><br>
>>> -fsanitize=address<br>
>>> -fsanitize-address-use-after-<wbr>scope<br>
>>> -fsanitize=fuzzer-no-link<br>
>>> -fsanitize=fuzzer<br>
>>><br>
>>> Any idea what's wrong or where to start looking?<br>
<br>
</div></div></blockquote></div><br></div>