diff options
author | mtklein <mtklein@chromium.org> | 2016-01-14 04:59:42 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-14 04:59:42 -0800 |
commit | 24a22c7de8890642e43d6ae1115ecd59e2f8f0db (patch) | |
tree | 347144a6771c3132ac176ef02b09ad81e351ed93 /fuzz/Fuzz.h | |
parent | 702501ddca7cf9b7b941ad286a0c9aa37fda86ef (diff) |
some fuzz hacking
Try to start faster:
- remove flags dependency
- print nothing
- strip unused symbols from the binary on Mac (smaller binary)
- only create one fuzz object
- only run one DEF_FUZZ
I am not sure if any of these things mattered, but I thought you may like to look.
Good stuff:
- make nextU() / nextF() work
- drop nextURange() / nextFRange() for now
- add nextB() for a single byte
As you may have guessed, I have figured out how to use afl-fuzz on my laptop.
Syntax to run becomes:
$ afl-fuzz ... out/Release/fuzz <DEF_FUZZ name> @@
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1581203003
Review URL: https://codereview.chromium.org/1581203003
Diffstat (limited to 'fuzz/Fuzz.h')
-rw-r--r-- | fuzz/Fuzz.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fuzz/Fuzz.h b/fuzz/Fuzz.h index cf5bcb9ead..f5083ef8e6 100644 --- a/fuzz/Fuzz.h +++ b/fuzz/Fuzz.h @@ -17,15 +17,13 @@ class Fuzz : SkNoncopyable { public: explicit Fuzz(SkData*); + uint8_t nextB(); uint32_t nextU(); float nextF(); - // These return a value in [min, max). - uint32_t nextURange(uint32_t min, uint32_t max); - float nextFRange(float min, float max); - private: SkAutoTUnref<SkData> fBytes; + int fNextByte; }; struct Fuzzable { |