fix #1, #2, #7 and #9. Propose solutions for #4 #5 and #6 #10
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.
Hello I backported some patches I made to this version of Lain.
It should fix #1, #2, #7 and #9. It also address my comments on #4 #5 and #6 about favoring some mutations that I think are better.
I ran a small micro benchmark with a very big structure, involving a main structure only containing a list of "commands" which were made of other structs and enum, that I can't share.
I also ran it on some dummy examples to show there is little difference in the results.
The benchmark looks like so:
With my private structure I have these results.
With a dummy structure with the top structure also only containing a
Vec
like this:The results are pretty similar, there are more collisions as the space of the possible inputs is small and I believe it matches with the dangerous number generation chance:
The repartition is uniform when I replace the
instance.mutate
line in the loop withlet instance = MyStruct::new_fuzzed
.When mutating this dummy structure which looks a bit similar and could correspond to a TLV encoded example:
The results are still similar to the first benchmark (note that it's impossible to serialize to something empty in that case):