[llvm] r298032 - [libFuzzer] inline the code of __sanitizer_cov_trace_pc_guard into it
Kostya Serebryany via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 16 18:45:16 PDT 2017
Author: kcc
Date: Thu Mar 16 20:45:15 2017
New Revision: 298032
URL: http://llvm.org/viewvc/llvm-project?rev=298032&view=rev
Log:
[libFuzzer] inline the code of __sanitizer_cov_trace_pc_guard into it
Modified:
llvm/trunk/lib/Fuzzer/FuzzerTracePC.cpp
llvm/trunk/lib/Fuzzer/FuzzerTracePC.h
Modified: llvm/trunk/lib/Fuzzer/FuzzerTracePC.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/FuzzerTracePC.cpp?rev=298032&r1=298031&r2=298032&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerTracePC.cpp (original)
+++ llvm/trunk/lib/Fuzzer/FuzzerTracePC.cpp Thu Mar 16 20:45:15 2017
@@ -45,13 +45,6 @@ uintptr_t *TracePC::PCs() const {
return __sancov_trace_pc_pcs;
}
-ATTRIBUTE_NO_SANITIZE_ALL
-void TracePC::HandleTrace(uint32_t *Guard, uintptr_t PC) {
- uint32_t Idx = *Guard;
- __sancov_trace_pc_pcs[Idx] = PC;
- __sancov_trace_pc_guard_8bit_counters[Idx]++;
-}
-
size_t TracePC::GetTotalPCCoverage() {
size_t Res = 0;
for (size_t i = 1, N = GetNumPCs(); i < N; i++)
@@ -289,7 +282,9 @@ ATTRIBUTE_INTERFACE
ATTRIBUTE_NO_SANITIZE_ALL
void __sanitizer_cov_trace_pc_guard(uint32_t *Guard) {
uintptr_t PC = reinterpret_cast<uintptr_t>(__builtin_return_address(0));
- fuzzer::TPC.HandleTrace(Guard, PC);
+ uint32_t Idx = *Guard;
+ __sancov_trace_pc_pcs[Idx] = PC;
+ __sancov_trace_pc_guard_8bit_counters[Idx]++;
}
ATTRIBUTE_INTERFACE
Modified: llvm/trunk/lib/Fuzzer/FuzzerTracePC.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/FuzzerTracePC.h?rev=298032&r1=298031&r2=298032&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerTracePC.h (original)
+++ llvm/trunk/lib/Fuzzer/FuzzerTracePC.h Thu Mar 16 20:45:15 2017
@@ -49,7 +49,6 @@ class TracePC {
public:
static const size_t kNumPCs = 1 << 21;
- void HandleTrace(uint32_t *guard, uintptr_t PC);
void HandleInit(uint32_t *start, uint32_t *stop);
void HandleCallerCallee(uintptr_t Caller, uintptr_t Callee);
template <class T> void HandleCmp(uintptr_t PC, T Arg1, T Arg2);
More information about the llvm-commits
mailing list