<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/63287>63287</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
The llvm-cov is unable to generate coverage reports for fuzzer target
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
zhaosonggo
</td>
</tr>
</table>
<pre>
Background:
I want to generate a coverage report for my fuzzer target code, but when I run llvm-cov, I get an error saying "No coverage data found".
Step:
1. build fuzzer target. eg: demo_fuzzer , use -fprofile-instr-generate, -fcoverage-mapping, -fsanitize=fuzzer, -fsanitize=fuzzer-no-link
2. run ./demo_fuzzer --max_total_time=10
3. llvm-profdata merge -sparse default.profraw -o default.profdata [success]
4. llvm-cov show ./demo_fuzzer --instr-profile=default.profdata [error: ./demo_fuzzer No coverage data found]
It's even more confusing that this issue only happens on Linux, as I was able to successfully generate a coverage report with llvm-cov on my Mac after copying the complete default.profdata file generated on Linux.
System Info: Debian GNU/Linux 10 (buster) Linux 5.4.143.bsk.8-amd64 x86_64
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8VE1zpDYQ_TXi0oUKxMDAgYO9k0m5KtlLkrOrgQaUFRKlD4_Hvz4lGI_j7G4uUKWWXr9-70nonJw0UcvKR1aeEgx-NrZ9m9E4o6fJJJ0Zru0j9t8ma4IeWPHAshPLHp7ggtqDNzCRJoueAKE3L2RxIrC0GuthNBaWK4zh7Y0seLQTeejNQEx8gS54uMyk4Qls0KDUy5L25iWWniBuRA1krbHg8Cr1BEyIr-ajx4AeYdxICcFhp7V___C03pnmHLog1fCZBgeaWPEAAy3m-VaJrYMjSMfVmlEqSqV23qbvE8Z6Or4TSBdcV6mnfdWhll6-EStOO9pPllNtUiX1t52b4LANz5k4_5tJmi74-uyNR_Xs5RKP59l-pOC7VJHiJsFCdiJI3YrWEQw0YlCex7LFC6Tm09J2gpWPLvQ9OcfK04564HcDwM3m8gNGuxY3ZVhx-hHs5hf75cwev7Dm4TuQn9j3TuKWLM_E0QG9kIbFWILe6DG4mAA_owc_SwfSuUBgtLrCjOtK2oHR8JvU4TUKjw5iQB1gpyiG9DbvGJS6_l9iL9LPH0oYHeP7O_aAoycLvVmvO4_IalkVefpe3qjPvcdw58U_JfTqPC3wpEcTU3iiTqKGX7_-xcR52w15BkzUXXA-ZqnZMaDkB54fCt65b7xOcRmqA7zW1XN12HGToS2GpmgwoTav6qoqD01WJXPbDUdqqmNZY1P3xz5rmpJqMVJXlzRUTZfIVmSiyKq8yPO8zCpelB0euz5vqMvGsijYIaMFpeJRHm7slGwmtFUh6mOisCPltndECE2X3SEmRHxWbLtJ2oXJsUOmpPPuA8VLr6j9c6YP3aWDoN-tu7v1H6_c9rx8utRJsKqdvV9dvP3izMR5kn4OHe_NwsQ5Nrj9YpD_pt4zcd6YOibO2yT_BAAA___h2rLg">