afl-cov

781 views
Skip to first unread message

mark....@gmail.com

unread,
Nov 20, 2017, 6:51:25 PM11/20/17
to afl-users
I am using the link https://github.com/mrash/afl-cov for finding out coverage 

and i use the following command 

afl-cov -d ./results/ -c `pwd`  --live --coverage-cmd \ "cat AFL_FILE | LD_LIBRARY_PATH=./lib/.libs ./bin/.libs/somebin -a-b-c"\ --enable-branch-coverage --coverage-include-lines --lcov-web-all  --overwrite

but i get the following reply and the file mentioned is empty. any suggestions what might be wrong

*** Imported 6 new test cases from: ./results//queue

 

    [+] AFL test case: id:000000,orig:test.txt (0 / 6), cycle: 0

lcov: ERROR: no valid records found in tracefile ./results//cov/lcov/id:000000,orig:test.txt.lcov_info

Traceback (most recent call last):

  File "/usr/bin/afl-cov", line 724, in <module>

    sys.exit(main())

  File "/usr/bin/afl-cov", line 72, in main

    return not process_afl_test_cases(gpaths, cargs)

  File "/usr/bin/afl-cov", line 140, in process_afl_test_cases

    gen_coverage(gpaths, cov_paths, f, cargs)

  File "/usr/bin/afl-cov", line 447, in gen_coverage

    + cov_paths['lcov_info_final'], cargs, WANT_OUTPUT)

  File "/usr/bin/afl-cov", line 536, in run_cmd

    out = subprocess.check_output(cmd.split())

  File "/usr/lib/python2.7/dist-packages/subprocess32.py", line 635, in check_output

    raise CalledProcessError(retcode, process.args, output=output)

subprocess32.CalledProcessError: Command '['lcov', '--rc', 'lcov_branch_coverage=1', '--no-checksum', '-r', './results//cov/lcov/id:000000,orig:test.txt.lcov_info', '/usr/include/*', '--output-file', './results//cov/lcov/id:000000,orig:test.txt.lcov_info_final']' returned non-zero exit status 255

 

Michael Rash

unread,
Nov 20, 2017, 7:35:11 PM11/20/17
to afl-users
 Judging from the line numbers in the trace above, I'd guess that you are using an older version of afl-cov. The latest version is 0.6. Further, given the error you are seeing, I would also guess that your targeted binary has not been compiled with code coverage support. Note that afl-cov 0.6 automatically tries to verify coverage support before proceeding, so I would recommend that you upgrade. If afl-cov 0.6 throws an error like 'Binary somebin is not compiled with code coverage support', then you will need to recompile your binary with flags like '-fprofile-arcs -ftest-coverage'.

Thanks,

--Mike

IOhannes m zmölnig

unread,
Nov 21, 2017, 12:44:11 PM11/21/17
to afl-...@googlegroups.com, Michael Rash
On 11/21/2017 01:35 AM, Michael Rash wrote:
> The latest version is 0.6.

speaking of which: would it be possible to do a new (point?) release?
i really like the new options added in the last year but would like to
stick to "stable" versions (as shipped by Debian).

fgamrds
IOhannes

signature.asc

Michael Rash

unread,
Nov 27, 2017, 9:53:26 PM11/27/17
to afl-users
Certainly. afl-cov 0.6.1 is available now:


Thanks,

--Mike

 

fgamrds
IOhannes



Daniel Stender

unread,
Nov 28, 2017, 6:37:43 PM11/28/17
to afl-users
... packaged for Debian today (currently in Sid).

Quick rebuild against stretch: http://www.danielstender.com/uploads/afl-cov_0.6.1-1~stretch_all.deb

Official package for stretch-backports is coming up shortly.

Cheers,
Daniel Stender

On 11/28/2017 03:53 AM, Michael Rash wrote:
>
>
> On Tue, Nov 21, 2017 at 12:43 PM, IOhannes m zmölnig <zmoe...@umlaeute.mur.at <mailto:zmoe...@umlaeute.mur.at>> wrote:
>
> On 11/21/2017 01:35 AM, Michael Rash wrote:
> > The latest version is 0.6.
>
> speaking of which: would it be possible to do a new (point?) release?
> i really like the new options added in the last year but would like to
> stick to "stable" versions (as shipped by Debian).
>
>
> Certainly. afl-cov 0.6.1 is available now:
>
> https://github.com/mrash/afl-cov/releases/tag/0.6.1
>
> Thanks,
>
> --Mike


--
4096R/DF5182C8 (ste...@debian.org)
http://www.danielstender.com/
Reply all
Reply to author
Forward
0 new messages