feat(invariant): Support coverage-guided fuzzing #8665
Labels
A-testing
Area: testing
C-forge
Command: forge
Cmd-forge-test
Command: forge test
T-feature
Type: feature
T-post-V1
Area: to tackle after V1
Component
Forge
Describe the feature you would like
Currently, the forge fuzz testing and invariant testing don’t support coverage-guided fuzzing, which could generally improve the fuzzing performance. The forge fuzzer can’t find the correct sequence
B(2)->C(3)->A(1)->D(4)
with 10000 runs for the code below:If it’s coverage-guided and will store and mutate the previous sequences, the final sequence will be solved step by step like
B(2)->X->X->X
,B(2)->C(3)->X->X
, …,B(2)->C(3)->A(1)->D(4)
.For example, we can make two strategies: 1. Random Generator (the current one, 50%). 2. Coverage-guided (50%).
If the coverage-guided strategy is picked up, pop a sequence from the new coverage sequence deque and mutate on it (mutate on calldata is ignored here):
After getting the new mutated sequence:
Additional context
No response
The text was updated successfully, but these errors were encountered: