<div dir="ltr">Yes, instructions are in Inputs/test.cpp (main test file).</div><br><div class="gmail_quote"><div dir="ltr">On Tue, Mar 7, 2017 at 3:32 PM Justin Bogner <<a href="mailto:mail@justinbogner.com">mail@justinbogner.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Are there instructions on how Inputs/foo.cpp was compiled to generate<br class="gmail_msg">
the binaries in the sancov tests? We should probably create .sancov and<br class="gmail_msg">
.symcov files for macOS so that we're actually testing it at all.<br class="gmail_msg">
<br class="gmail_msg">
Justin Bogner <<a href="mailto:mail@justinbogner.com" class="gmail_msg" target="_blank">mail@justinbogner.com</a>> writes:<br class="gmail_msg">
> So I tried using full debug info and it fails the same way, which is<br class="gmail_msg">
> probably to be expected. After poking around in test/tools/sancov I'm<br class="gmail_msg">
> fairly sure the problem is that I'm on macOS, given that almost all of<br class="gmail_msg">
> the tests there have "REQUIRES: x86_64-linux".<br class="gmail_msg">
><br class="gmail_msg">
> Mike Aizatsky <<a href="mailto:aizatsky@google.com" class="gmail_msg" target="_blank">aizatsky@google.com</a>> writes:<br class="gmail_msg">
>> I'll need more details then. Maybe you can share the binary & its .sancov<br class="gmail_msg">
>> file? Or if you have a way to reproduce it?<br class="gmail_msg">
>><br class="gmail_msg">
>> On Tue, Mar 7, 2017 at 1:23 PM Kostya Serebryany <<a href="mailto:kcc@google.com" class="gmail_msg" target="_blank">kcc@google.com</a>> wrote:<br class="gmail_msg">
>><br class="gmail_msg">
>>> On Tue, Mar 7, 2017 at 12:50 PM, Mike Aizatsky <<a href="mailto:aizatsky@google.com" class="gmail_msg" target="_blank">aizatsky@google.com</a>><br class="gmail_msg">
>>> wrote:<br class="gmail_msg">
>>><br class="gmail_msg">
>>> Justin,<br class="gmail_msg">
>>><br class="gmail_msg">
>>> I haven't seen this before. I suspect it is because of line-tables-only.<br class="gmail_msg">
>>> Can you try it with full debug info?<br class="gmail_msg">
>>><br class="gmail_msg">
>>><br class="gmail_msg">
>>> That would be strange.<br class="gmail_msg">
>>> -gline-tables-only is *the* recommended flag for all of the sanitizers,<br class="gmail_msg">
>>> I'd expect it to work.<br class="gmail_msg">
>>><br class="gmail_msg">
>>><br class="gmail_msg">
>>><br class="gmail_msg">
>>><br class="gmail_msg">
>>> On Tue, Mar 7, 2017 at 12:36 PM Kostya Serebryany <<a href="mailto:kcc@google.com" class="gmail_msg" target="_blank">kcc@google.com</a>> wrote:<br class="gmail_msg">
>>><br class="gmail_msg">
>>> +aizatsky<br class="gmail_msg">
>>><br class="gmail_msg">
>>> On Tue, Mar 7, 2017 at 12:34 PM, Justin Bogner <<a href="mailto:mail@justinbogner.com" class="gmail_msg" target="_blank">mail@justinbogner.com</a>><br class="gmail_msg">
>>> wrote:<br class="gmail_msg">
>>><br class="gmail_msg">
>>> I'm working on a fuzzer using libFuzzer and I wanted to take a look at<br class="gmail_msg">
>>> how my coverage was doing, as per the instructions here:<br class="gmail_msg">
>>><br class="gmail_msg">
>>>   <a href="http://llvm.org/docs/LibFuzzer.html#how-good-is-my-fuzzer" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/docs/LibFuzzer.html#how-good-is-my-fuzzer</a><br class="gmail_msg">
>>><br class="gmail_msg">
>>> First of all, I suspect the instructions there are out of date, but<br class="gmail_msg">
>>> passing -dump_coverage=1 to the binary rather than setting ASAN_OPTIONS<br class="gmail_msg">
>>> generated a .sancov file for me.<br class="gmail_msg">
>>><br class="gmail_msg">
>>> However, when I inspect this with the sancov tool, all of the line<br class="gmail_msg">
>>> numbers it reports are "<invalid>:0". I can list the covered and<br class="gmail_msg">
>>> uncovered functions successfully, but without locations it's really hard<br class="gmail_msg">
>>> to do anything with that information.<br class="gmail_msg">
>>><br class="gmail_msg">
>>> I've built with -gline-tables-only, as is the default when building llvm<br class="gmail_msg">
>>> with sanitizers enabled.<br class="gmail_msg">
>>><br class="gmail_msg">
>>> Have you seen this before? Am I doing something obviously wrong?<br class="gmail_msg">
>>><br class="gmail_msg">
>>><br class="gmail_msg">
>>> --<br class="gmail_msg">
>>> Mike<br class="gmail_msg">
>>> Sent from phone<br class="gmail_msg">
>>><br class="gmail_msg">
>>> --<br class="gmail_msg">
>> Mike<br class="gmail_msg">
>> Sent from phone<br class="gmail_msg">
</blockquote></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr">Mike<br>Sent from phone</div></div>