Skip to content

Commit 775126c

Browse files
fniksiccopybara-github
authored andcommitted
Use GetCrashesFromWorkdir for crash summary reporting in ReplayCrash.
PiperOrigin-RevId: 828547106
1 parent cd97059 commit 775126c

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

centipede/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,7 @@ cc_library(
753753
":centipede_lib",
754754
":command",
755755
":coverage",
756+
":crash_deduplication",
756757
":crash_summary",
757758
":distill",
758759
":environment",

centipede/centipede_interface.cc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
#include "./centipede/centipede_callbacks.h"
5252
#include "./centipede/command.h"
5353
#include "./centipede/coverage.h"
54+
#include "./centipede/crash_deduplication.h"
5455
#include "./centipede/crash_summary.h"
5556
#include "./centipede/distill.h"
5657
#include "./centipede/environment.h"
@@ -807,11 +808,12 @@ int ReplayCrash(const Environment& env,
807808
if (env.report_crash_summary) {
808809
CrashSummary crash_summary{target_config.binary_identifier,
809810
target_config.fuzz_tests_in_current_shard[0]};
810-
// There should be at most one crash, so no deduplication actually happens.
811-
DeduplicateAndOptionallyStoreNewCrashes(workdir, /*total_shards=*/1,
812-
/*crash_signatures=*/{},
813-
/*crashing_dir=*/std::nullopt,
814-
crash_summary);
811+
for (const auto& [signature, crash_details] :
812+
GetCrashesFromWorkdir(workdir, /*total_shards=*/1)) {
813+
crash_summary.AddCrash({env.crash_id,
814+
/*category=*/crash_details.description, signature,
815+
crash_details.description});
816+
}
815817
crash_summary.Report(&std::cerr);
816818
}
817819
return fuzz_result;

0 commit comments

Comments
 (0)