}
if (EF->__sanitizer_get_coverage_pc_buffer_pos)
PcBufferPos = EF->__sanitizer_get_coverage_pc_buffer_pos();
- TPC.ResetNewPCIDs();
}
void Fuzzer::PrepareCounters(Fuzzer::Coverage *C) {
assert(!F);
F = this;
TPC.ResetTotalPCCoverage();
- TPC.Reset();
+ TPC.ResetMaps();
+ TPC.ResetGuards();
ResetCoverage();
IsMyThread = true;
if (Options.DetectLeaks && EF->__sanitizer_install_malloc_and_free_hooks)
AllocTracer.Start();
UnitStartTime = system_clock::now();
ResetCounters(); // Reset coverage right before the callback.
+ TPC.ResetMaps();
int Res = CB(DataCopy, Size);
UnitStopTime = system_clock::now();
(void)Res;
size_t OldSize = Res.size();
for (int Iter = 0; Iter < 10; Iter++) {
ShuffleCorpus(&Res);
- TPC.Reset();
+ TPC.ResetMaps();
+ TPC.ResetGuards();
ResetCoverage();
for (auto &U : Initial)
void ResetNewPCIDs() { NumNewPCIDs = 0; }
uintptr_t GetPCbyPCID(uintptr_t PCID) { return PCs[PCID]; }
- void Reset() {
+ void ResetMaps() {
NumNewPCIDs = 0;
CounterMap.Reset();
ValueProfileMap.Reset();
- ResetGuards();
}
+ void ResetGuards();
+
void PrintModuleInfo();
void PrintCoverage();
NewPCIDs[(NumNewPCIDs++) % kMaxNewPCIDs] = PCID;
}
- void ResetGuards();
struct Module {
uintptr_t *Start, *Stop;