Merge "trusty: clear fuzzer's extra counters directly" into main
This commit is contained in:
commit
49be29ed5b
2 changed files with 3 additions and 10 deletions
|
@ -41,9 +41,6 @@ cc_library {
|
|||
"utils.cpp",
|
||||
],
|
||||
export_include_dirs: ["include"],
|
||||
static_libs: [
|
||||
"libFuzzer",
|
||||
],
|
||||
shared_libs: [
|
||||
"libtrusty_coverage",
|
||||
"libbase",
|
||||
|
|
|
@ -16,12 +16,12 @@
|
|||
|
||||
#define LOG_TAG "trusty-fuzz-counters"
|
||||
|
||||
#include <FuzzerDefs.h>
|
||||
|
||||
#include <trusty/fuzz/counters.h>
|
||||
|
||||
#include <android-base/logging.h>
|
||||
#include <assert.h>
|
||||
#include <log/log.h>
|
||||
#include <string.h>
|
||||
#include <trusty/coverage/coverage.h>
|
||||
#include <trusty/coverage/tipc.h>
|
||||
|
||||
|
@ -45,9 +45,6 @@ ExtraCounters::ExtraCounters(coverage::CoverageRecord* record) : record_(record)
|
|||
return;
|
||||
}
|
||||
|
||||
assert(fuzzer::ExtraCountersBegin());
|
||||
assert(fuzzer::ExtraCountersEnd());
|
||||
|
||||
volatile uint8_t* begin = NULL;
|
||||
volatile uint8_t* end = NULL;
|
||||
record_->GetRawCounts(&begin, &end);
|
||||
|
@ -66,9 +63,8 @@ void ExtraCounters::Reset() {
|
|||
if (!record_->IsOpen()) {
|
||||
return;
|
||||
}
|
||||
|
||||
record_->ResetCounts();
|
||||
fuzzer::ClearExtraCounters();
|
||||
memset_explicit(const_cast<uint8_t*>(counters), 0, sizeof(counters));
|
||||
}
|
||||
|
||||
void ExtraCounters::Flush() {
|
||||
|
|
Loading…
Reference in a new issue