Distinguish between undetected and failing custom mutator (fail on the latter). #1565
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Distinguish between undetected and failing custom mutator (fail on the latter).
I extended the IPC protocol for mutation via external binary: the binary now
first writes a marker to indicate whether it has a custom mutator. If it does,
it proceeds by writing mutants, otherwise it successfully exits.
On the Centipede side, this allows distinguishing between an undetected custom
mutator (indicated by the marker) and a failure (indicated by a failed
execution).
The protocol is implemented using a new type of runner result,
MutationResult
,similarly to the
ExecutionResult
andBatchResult
.In addition, I cleaned up the
Mutate()
API so that the results are passed asreturn values instead of using output parameters. This results in cleaner, less
error-prone, and more efficient code (e.g., the number of mallocs in the
malloc-counting test went down significantly, so I updated the expected count
there as well).
With this change, we no longer need to perform the "domain setup check" as part
of executing an input. The check happens implicitly during mutation. If the
mutation fails, either due to an ineffective domain or other reasons, Centipede
itself fails.