| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
They are shorter, more readable, and don't require temp vars.
|
| |
|
|
|
|
|
|
| |
Also adjust number of mutations per image.
We do one per 128K of interesting data. But we have no single seed
that has so much interesting data. Here is the amount of interesting data in seeds:
https://gist.github.com/dvyukov/566b20364610d80e5d0534524546c3f0
Reduce this cuhnk size to 4K.
|
| |
|
|
|
|
| |
Provide NumMutations method instead of Size.
It allows HeatMap to choose number of mutations better
(e.g. for completely empty/flat images w/o interesting data).
|
|
|
In this context, a heatmap is a flexible mechanism to choose where to
mutate some collection of bytes with some underlying probability
distribution, which could be dependent on the bytes themselves.
This commit defines the interface for heatmaps, implements a generic
one, and adds a test for it.
The expected usage of the heatmap inferface is:
- Caller selects heatmap type based on program type (or other logic),
and calls the appropriate `MakeXYZHeatmap`.
Currently there is only one, but over time we will add more with differing
probability distributions.
- Caller queries the heatmap using `hm.ChooseLocation(r)` for random
input `r`.
The generic heatmap is based on the current compression for disk images. It
avoids mutating within long runs of constant bytes by viewing the file
as a series of 64-byte chunks, and ignoring chunks which consist of a
single repeated byte.
|