Mike Aizatsky via llvm-dev
2017-Mar-07 21:41 UTC
[llvm-dev] sancov reporting all locations as <invalid>:0
I'll need more details then. Maybe you can share the binary & its .sancov file? Or if you have a way to reproduce it? On Tue, Mar 7, 2017 at 1:23 PM Kostya Serebryany <kcc at google.com> wrote:> On Tue, Mar 7, 2017 at 12:50 PM, Mike Aizatsky <aizatsky at google.com> > wrote: > > Justin, > > I haven't seen this before. I suspect it is because of line-tables-only. > Can you try it with full debug info? > > > That would be strange. > -gline-tables-only is *the* recommended flag for all of the sanitizers, > I'd expect it to work. > > > > > On Tue, Mar 7, 2017 at 12:36 PM Kostya Serebryany <kcc at google.com> wrote: > > +aizatsky > > On Tue, Mar 7, 2017 at 12:34 PM, Justin Bogner <mail at justinbogner.com> > wrote: > > I'm working on a fuzzer using libFuzzer and I wanted to take a look at > how my coverage was doing, as per the instructions here: > > http://llvm.org/docs/LibFuzzer.html#how-good-is-my-fuzzer > > First of all, I suspect the instructions there are out of date, but > passing -dump_coverage=1 to the binary rather than setting ASAN_OPTIONS > generated a .sancov file for me. > > However, when I inspect this with the sancov tool, all of the line > numbers it reports are "<invalid>:0". I can list the covered and > uncovered functions successfully, but without locations it's really hard > to do anything with that information. > > I've built with -gline-tables-only, as is the default when building llvm > with sanitizers enabled. > > Have you seen this before? Am I doing something obviously wrong? > > > -- > Mike > Sent from phone > > --Mike Sent from phone -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170307/1cef08e5/attachment.html>
Justin Bogner via llvm-dev
2017-Mar-07 23:03 UTC
[llvm-dev] sancov reporting all locations as <invalid>:0
So I tried using full debug info and it fails the same way, which is probably to be expected. After poking around in test/tools/sancov I'm fairly sure the problem is that I'm on macOS, given that almost all of the tests there have "REQUIRES: x86_64-linux". Mike Aizatsky <aizatsky at google.com> writes:> I'll need more details then. Maybe you can share the binary & its .sancov > file? Or if you have a way to reproduce it? > > On Tue, Mar 7, 2017 at 1:23 PM Kostya Serebryany <kcc at google.com> wrote: > >> On Tue, Mar 7, 2017 at 12:50 PM, Mike Aizatsky <aizatsky at google.com> >> wrote: >> >> Justin, >> >> I haven't seen this before. I suspect it is because of line-tables-only. >> Can you try it with full debug info? >> >> >> That would be strange. >> -gline-tables-only is *the* recommended flag for all of the sanitizers, >> I'd expect it to work. >> >> >> >> >> On Tue, Mar 7, 2017 at 12:36 PM Kostya Serebryany <kcc at google.com> wrote: >> >> +aizatsky >> >> On Tue, Mar 7, 2017 at 12:34 PM, Justin Bogner <mail at justinbogner.com> >> wrote: >> >> I'm working on a fuzzer using libFuzzer and I wanted to take a look at >> how my coverage was doing, as per the instructions here: >> >> http://llvm.org/docs/LibFuzzer.html#how-good-is-my-fuzzer >> >> First of all, I suspect the instructions there are out of date, but >> passing -dump_coverage=1 to the binary rather than setting ASAN_OPTIONS >> generated a .sancov file for me. >> >> However, when I inspect this with the sancov tool, all of the line >> numbers it reports are "<invalid>:0". I can list the covered and >> uncovered functions successfully, but without locations it's really hard >> to do anything with that information. >> >> I've built with -gline-tables-only, as is the default when building llvm >> with sanitizers enabled. >> >> Have you seen this before? Am I doing something obviously wrong? >> >> >> -- >> Mike >> Sent from phone >> >> -- > Mike > Sent from phone
Justin Bogner via llvm-dev
2017-Mar-07 23:32 UTC
[llvm-dev] sancov reporting all locations as <invalid>:0
Are there instructions on how Inputs/foo.cpp was compiled to generate the binaries in the sancov tests? We should probably create .sancov and .symcov files for macOS so that we're actually testing it at all. Justin Bogner <mail at justinbogner.com> writes:> So I tried using full debug info and it fails the same way, which is > probably to be expected. After poking around in test/tools/sancov I'm > fairly sure the problem is that I'm on macOS, given that almost all of > the tests there have "REQUIRES: x86_64-linux". > > Mike Aizatsky <aizatsky at google.com> writes: >> I'll need more details then. Maybe you can share the binary & its .sancov >> file? Or if you have a way to reproduce it? >> >> On Tue, Mar 7, 2017 at 1:23 PM Kostya Serebryany <kcc at google.com> wrote: >> >>> On Tue, Mar 7, 2017 at 12:50 PM, Mike Aizatsky <aizatsky at google.com> >>> wrote: >>> >>> Justin, >>> >>> I haven't seen this before. I suspect it is because of line-tables-only. >>> Can you try it with full debug info? >>> >>> >>> That would be strange. >>> -gline-tables-only is *the* recommended flag for all of the sanitizers, >>> I'd expect it to work. >>> >>> >>> >>> >>> On Tue, Mar 7, 2017 at 12:36 PM Kostya Serebryany <kcc at google.com> wrote: >>> >>> +aizatsky >>> >>> On Tue, Mar 7, 2017 at 12:34 PM, Justin Bogner <mail at justinbogner.com> >>> wrote: >>> >>> I'm working on a fuzzer using libFuzzer and I wanted to take a look at >>> how my coverage was doing, as per the instructions here: >>> >>> http://llvm.org/docs/LibFuzzer.html#how-good-is-my-fuzzer >>> >>> First of all, I suspect the instructions there are out of date, but >>> passing -dump_coverage=1 to the binary rather than setting ASAN_OPTIONS >>> generated a .sancov file for me. >>> >>> However, when I inspect this with the sancov tool, all of the line >>> numbers it reports are "<invalid>:0". I can list the covered and >>> uncovered functions successfully, but without locations it's really hard >>> to do anything with that information. >>> >>> I've built with -gline-tables-only, as is the default when building llvm >>> with sanitizers enabled. >>> >>> Have you seen this before? Am I doing something obviously wrong? >>> >>> >>> -- >>> Mike >>> Sent from phone >>> >>> -- >> Mike >> Sent from phone