Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difficulty of Using afl-cov on Mac OS -- lacking readelf #45

Open
zhoulaifu opened this issue Oct 1, 2019 · 3 comments
Open

Difficulty of Using afl-cov on Mac OS -- lacking readelf #45

zhoulaifu opened this issue Oct 1, 2019 · 3 comments

Comments

@zhoulaifu
Copy link

I am using afl-cov on Mac OS. It seems that afl-cov depends on readelf, which does not exist on Mac. What would you suggest to deal with this?

$ afl-cov -d ./out --coverage-cmd "cat AFL_FILE | ./a.out" -c .
[*] Need a valid path to readelf, use --readelf-path
@hullalex-tek
Copy link

I was able to get afl-cov working on mac os a while ago. Make sure to specify the
--disable-gcov-check
Argument to your command.
You may run into future issues down the line, so reference my other comment if you run into other issues:
#31 (comment)

@zhoulaifu
Copy link
Author

Thanks. I may misunderstand the command line usage, but it is not working with --disable-gcov-check.

$ ~/Downloads/afl-cov/afl-cov --disable-gcov-check ./a.out -d out/ --coverage-cmd "cat AFL_FILE | ./a.out" -c .
[*] Need a valid path to readelf, use --readelf-path

Above, ./a.out refers to the binary compiled from the source code, out is the directory where afl dumps its results.

@hullalex-tek
Copy link

Try manually specifying the path to lcov and genthml. If I remember correctly, the default locations are different for linux and macOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants