mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-19 19:53:56 +00:00
Fix fuzzer
This commit is contained in:
@@ -50,7 +50,9 @@ namespace fuzzer
|
||||
++context.executions;
|
||||
context.generator.access_input([&](const std::span<const uint8_t> input) {
|
||||
uint64_t score{0};
|
||||
const auto result = executer.execute(input, [&](uint64_t) { ++score; });
|
||||
const auto result = executer.execute(input, [&](uint64_t) {
|
||||
++score; //
|
||||
});
|
||||
|
||||
if (result == execution_result::error)
|
||||
{
|
||||
@@ -84,7 +86,9 @@ namespace fuzzer
|
||||
|
||||
for (size_t i = 0; i < concurrency; ++i)
|
||||
{
|
||||
this->workers_.emplace_back([&context] { worker(context); });
|
||||
this->workers_.emplace_back([&context] {
|
||||
worker(context); //
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -71,6 +71,11 @@ namespace fuzzer
|
||||
{
|
||||
std::unique_lock lock{this->mutex_};
|
||||
|
||||
if (this->top_scorer_.empty())
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
double score{0.0};
|
||||
for (const auto& e : this->top_scorer_)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user