Skip to content

Commit

Permalink
Fix SetCurrentTest always failing with the legacy engine class
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 722683782
  • Loading branch information
FuzzTest Team authored and copybara-github committed Feb 3, 2025
1 parent 4fe5ffb commit 0e77100
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fuzztest/internal/compatibility_mode.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ bool FuzzTestExternalEngineAdaptor::RunInFuzzingMode(
SetExternalEngineCallback(this);
runtime_.SetRunMode(RunMode::kFuzz);
auto& impl = GetFuzzerImpl();
runtime_.SetCurrentTest(&impl.test_, &configuration);
runtime_.EnableReporter(&impl.stats_, [] { return absl::Now(); });

FUZZTEST_INTERNAL_CHECK(impl.fixture_driver_ != nullptr,
Expand Down Expand Up @@ -124,7 +125,6 @@ void FuzzTestExternalEngineAdaptor::RunOneInputData(absl::string_view data) {
// Use _Exit instead of exit so libFuzzer does not treat it as a crash.
std::_Exit(0);
}
runtime_.SetCurrentTest(&impl.test_, nullptr);
if (IsEnginePlaceholderInput(data)) return;
auto input = impl.TryParse(data);
if (!input.ok()) return;
Expand Down

0 comments on commit 0e77100

Please sign in to comment.