Skip to content

Commit

Permalink
[libFuzzer] call __sanitizer_dump_coverage via EF
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292681 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
kcc committed Jan 20, 2017
1 parent 31027cd commit 02e6813
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/Fuzzer/FuzzerExtFunctions.def
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,5 @@ EXT_FUNC(__sanitizer_set_death_callback, void, (void (*)(void)), true);
EXT_FUNC(__sanitizer_set_report_fd, void, (void*), false);
EXT_FUNC(__sanitizer_update_counter_bitset_and_clear_counters, uintptr_t,
(uint8_t*), false);
EXT_FUNC(__sanitizer_dump_coverage, void, (const uintptr_t *, uintptr_t),
false);
3 changes: 2 additions & 1 deletion lib/Fuzzer/FuzzerTracePC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ void TracePC::PrintCoverage() {
}

void TracePC::DumpCoverage() {
__sanitizer_dump_coverage(PCs, GetNumPCs());
if (EF->__sanitizer_dump_coverage)
EF->__sanitizer_dump_coverage(PCs, GetNumPCs());
}

// Value profile.
Expand Down

0 comments on commit 02e6813

Please sign in to comment.