Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions centipede/engine_worker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -639,12 +639,10 @@ void WorkerDoMutate(const FuzzTestAdapter& adapter) {
mutant_bytes.clear();
adapter.SerializeInputContent(adapter.ctx, emitted_inputs[0],
&mutant_bytes_sink);
WORKER_CHECK_FOR_ERROR();
WorkerCheck(MutationResult::WriteMutant(MutantRef{mutant_bytes, origin},
*outputs_blobseq),
"failed to write mutant");
adapter.FreeInput(adapter.ctx, emitted_inputs[0]);
WORKER_CHECK_FOR_ERROR();
(void)MutationResult::WriteMutant(MutantRef{mutant_bytes, origin},
*outputs_blobseq);
}

for (auto input : origin_inputs) {
Expand Down
10 changes: 3 additions & 7 deletions centipede/runner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -704,13 +704,9 @@ static int MutateInputsFromShmem(BlobSequence& inputs_blobseq,
}
if (!callbacks.HasCustomMutator()) return EXIT_SUCCESS;

{
bool succ = true;
MutateInputs(callbacks, input_refs, num_mutants, [&](MutantRef mutant) {
succ = succ && MutationResult::WriteMutant(mutant, outputs_blobseq);
});
if (!succ) return EXIT_FAILURE;
}
MutateInputs(callbacks, input_refs, num_mutants, [&](MutantRef mutant) {
(void)MutationResult::WriteMutant(mutant, outputs_blobseq);
});

return EXIT_SUCCESS;
}
Expand Down
Loading