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

Colored html output based on @samalws code #816

Merged
merged 5 commits into from
Sep 23, 2022

Conversation

ggrieco-tob
Copy link
Member

Replaces #709

@arcz
Copy link
Member

arcz commented Sep 21, 2022

The last commit fixes coverage display for non-runtime lines.

Before After
before after

@disconnect3d
Copy link

If we are on this, what kind of information are we gathering here? Is it only whether we hit a particular line or is it the number of hits?

Or: can we display the number of hits since this may also be useful?

When fuzzing a complex target and ending up with e.g. 100k corpus inputs, I like to generate coverage report and look for both A) paths that were not visited at all and B) paths that were visited only few times.

So for C/C++/Rust programs I could see sth like:

3.5k |  if (...) {
5    | ...
     | }

Which tells me that maybe I should also be interested in getting into this condition more often than just 5 times (and then I can e.g. hardcode the harness code to always get there and fuzz again etc).

@arcz
Copy link
Member

arcz commented Sep 21, 2022

@disconnect3d This is something worth implementing after this PR is merged. I would need to look if we gather the number of hits per line.

@ggrieco-tob
Copy link
Member Author

I think @disconnect3d suggestion makes sense, however, for smart contracts is not so easy. We will need several numbers to show how many hits we had per result (e.g. reverted or not). We need to experiment with this too see which is the most useful output here. I agree that we should merge this and then implement more features in future PRs

src/Main.hs Show resolved Hide resolved
@ggrieco-tob ggrieco-tob merged commit 6504a4b into master Sep 23, 2022
@ggrieco-tob ggrieco-tob deleted the dev-html-colored-output branch September 23, 2022 12:21
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

Successfully merging this pull request may close these issues.

3 participants