[llvm] r292681 - [libFuzzer] call __sanitizer_dump_coverage via EF
Kostya Serebryany via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 20 15:35:30 PST 2017
Author: kcc
Date: Fri Jan 20 17:35:29 2017
New Revision: 292681
URL: http://llvm.org/viewvc/llvm-project?rev=292681&view=rev
Log:
[libFuzzer] call __sanitizer_dump_coverage via EF
Modified:
llvm/trunk/lib/Fuzzer/FuzzerExtFunctions.def
llvm/trunk/lib/Fuzzer/FuzzerTracePC.cpp
Modified: llvm/trunk/lib/Fuzzer/FuzzerExtFunctions.def
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/FuzzerExtFunctions.def?rev=292681&r1=292680&r2=292681&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerExtFunctions.def (original)
+++ llvm/trunk/lib/Fuzzer/FuzzerExtFunctions.def Fri Jan 20 17:35:29 2017
@@ -48,3 +48,5 @@ EXT_FUNC(__sanitizer_set_death_callback,
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);
Modified: llvm/trunk/lib/Fuzzer/FuzzerTracePC.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/FuzzerTracePC.cpp?rev=292681&r1=292680&r2=292681&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerTracePC.cpp (original)
+++ llvm/trunk/lib/Fuzzer/FuzzerTracePC.cpp Fri Jan 20 17:35:29 2017
@@ -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.
More information about the llvm-commits
mailing list