alexcrichton transferred Issue #1235:
Summary
Add the ability to insert instrumentation to track code coverage.
Motivation
Besides the usual benefits for users who are interested in the code coverage of their own tests or what have you, this could help greatly improve our own testing and fuzzing infrastructure for Cranelift itself.
See Finding Deep Compiler Bugs via Guided Stochastic Program Mutation by Le et al, for example, where they:
- Find statically-reachable, but dynamically-unexecuted-for-some-inputs code
- Randomly mutate that code
- Re-compile and re-run the program over those same inputs
- Assert that the observable results are equivalent
This should help us find weird, unique bugs that differential fuzzing between cranelift optimized vs cranelift un-optimized or cranelift vs baldrmonkey or cranelift vs lightbeam on random test cases are unlikely to discover.
Last updated: Nov 22 2024 at 16:03 UTC