aboutsummaryrefslogtreecommitdiffhomepage
path: root/fuzz/Fuzz.h
Commit message (Collapse)AuthorAge
* Revert "Revert "SkTypes: extract SkTo""Gravatar Hal Canary2018-06-14
| | | | | | | | | | | | | | | | This reverts commit fdcfb8b7c23fbf18f872d2c31d27978235033876. > Original change's description: > > SkTypes: extract SkTo > > > > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 > > Reviewed-on: https://skia-review.googlesource.com/133620 > > Reviewed-by: Mike Klein <mtklein@google.com> Change-Id: Ida74fbc5c21248a724a5edbf9fae18a33bcb23aa Reviewed-on: https://skia-review.googlesource.com/134506 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Revert "SkTypes: extract SkTo"Gravatar Hal Canary2018-06-13
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2a2f67592602b18527bc3fd449132d420cd5b62e. Reason for revert: this appears to be what is holding up the Chrome roll. Original change's description: > SkTypes: extract SkTo > > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 > Reviewed-on: https://skia-review.googlesource.com/133620 > Reviewed-by: Mike Klein <mtklein@google.com> TBR=mtklein@google.com,halcanary@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Iafd738aedfb679a23c061a51afe4b98a8d4cdfae Reviewed-on: https://skia-review.googlesource.com/134504 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* SkTypes: extract SkToGravatar Hal Canary2018-06-12
| | | | | | Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 Reviewed-on: https://skia-review.googlesource.com/133620 Reviewed-by: Mike Klein <mtklein@google.com>
* Clean up a few IWYU issuesGravatar Mike Klein2018-06-11
| | | | | | | | | Spun off from the SkTFitsIn CL. Change-Id: I686d680df6a36ebc02db3847ad5e2cedcbcd67ef Reviewed-on: https://skia-review.googlesource.com/134083 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Add Encoder fuzzersGravatar Kevin Lubick2018-03-30
| | | | | | | | | | | | | | | This also includes a helper "fuzzer" for making a corpus. Point it at an image or folder of images and it will decode those images and write the SkPixmap's bytes to disk, such that the fuzzer will be able to read in those bytes as if it had decoded the image (or gotten it from another source). Bug: skia: Change-Id: Iaf223a39078f2b62908fb47929add5d63f22d973 Reviewed-on: https://skia-review.googlesource.com/117367 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com>
* Fix a tiny typoGravatar Yuqian Li2018-03-01
| | | | | | | | | | This shouldn't matter... But I just feel the impulsion to fix it. Bug: skia: Change-Id: Id3b6302071165b3abe98a3d89409d39715fac23c Reviewed-on: https://skia-review.googlesource.com/111002 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com>
* Tweak API fuzzers to run better in libfuzzerGravatar Kevin Lubick2018-02-27
| | | | | | | | | | | Prevents logging from cluttering the stats. Better handles limited memory. Bug: skia: Change-Id: I12c1a46875fd9120938cab520ef70de69c451ad8 Reviewed-on: https://skia-review.googlesource.com/110642 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Kevin Lubick <kjlubick@google.com>
* Port 3 API fuzzers to be oss-fuzz friendlyGravatar Kevin Lubick2018-02-27
| | | | | | | | | | Also Remove ScaleToSides, which we hadn't been running for a while. Bug: skia: Change-Id: I772dad722c34681392d5b635b3de716f3b00d597 Reviewed-on: https://skia-review.googlesource.com/110443 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Kevin Lubick <kjlubick@google.com>
* Add in Region SetPath FuzzerGravatar Kevin Lubick2018-01-11
| | | | | | | | | | Also refactor a few things to make it easier to use oss-fuzz. Bug: skia: Change-Id: Ie518a6cfc7d57a347b5d09089379f986d33f8b7f Reviewed-on: https://skia-review.googlesource.com/41740 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Change SkMemory to the more accurately named SkMalloc.Gravatar Herb Derby2017-03-27
| | | | | | | Change-Id: I6b08a74234b99bac866bad71014b94f7ec2d4bc8 Reviewed-on: https://skia-review.googlesource.com/10188 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Make SkMemory.h and adjust all files for usage.Gravatar Herb Derby2017-03-20
| | | | | | | | | | | | This will be rolled out in three stages: 1) make SkMemory.h and have SkTypes.h include it. 2) Adjust chromium and android. 3) no long include SkMemory.h in SkTypes.h Change-Id: If360ef5e1164d88f50b03f279e2e963ca2f57d5d Reviewed-on: https://skia-review.googlesource.com/9874 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Fuzz PDF, N32, and Null CanvasesGravatar Hal Canary2017-02-27
| | | | | | | | | | run `fuzz --type pdf_canvas` or `fuzz --type null_canvas` or `fuzz --type n32_canvas` Change-Id: Id70179d5578ed1e67006aef7823bf75fc1d7a4a6 Reviewed-on: https://skia-review.googlesource.com/8418 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* move SkTRegister.h into toolsGravatar Mike Reed2017-01-11
| | | | | | | | | BUG=skia: Change-Id: Ie7d4fac3024b361a281f456fec2b3a837e2bfe43 Reviewed-on: https://skia-review.googlesource.com/6881 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Fix fuzzRangeGravatar Kevin Lubick2016-11-29
| | | | | | | | | | | | Make the fuzzRange not crash if min == max, just set n to be min. BUG=skia: Change-Id: I138cefbec9b408d3b35e4258d770e6b396af0e5f Reviewed-on: https://skia-review.googlesource.com/5305 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Kevin Lubick <kjlubick@google.com>
* Add back in min/max check on fuzzer rangeGravatar Kevin Lubick2016-11-16
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4798 Change-Id: Ia93b4eeea82dd04f0c6bd287f61d26086a0aa740 Reviewed-on: https://skia-review.googlesource.com/4798 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com>
* Properly handle INT_MIN and relatedGravatar Kevin Lubick2016-11-14
| | | | | | | | | | | BUG=skia:5967 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4751 Change-Id: Ie846560ebdaf11e1a5247842b3549ade1e100af2 Reviewed-on: https://skia-review.googlesource.com/4751 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com>
* Avoid platform-dependent function params in FuzzerGravatar Kevin Lubick2016-11-10
| | | | | | | | | | | | | | | | | | | We use this approach instead of T next() because different compilers evaluate function parameters in different orders. If fuzz->next() returned 5 and then 7, foo(fuzz->next(), fuzz->next()) would be foo(5, 7) when compiled on GCC and foo(7, 5) when compiled on Clang. By requiring params to be passed in, we avoid the temptation to call next() in a way that does not consume fuzzed bytes in a single platform-independent order. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4392 Change-Id: I35de849f82e8be45378f662a48100eb732fa8895 Reviewed-on: https://skia-review.googlesource.com/4392 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Kevin Lubick <kjlubick@google.com>
* Make fuzzers use cleaner interfaceGravatar Kevin Lubick2016-11-01
| | | | | | | | | | | | | | | signalBoring() no longer exists. When the fuzzer runs out of randomness, it just returns 0. Fuzzers should not go into infinite loops if this happens. do while loops are particularly error-prone. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3963 Change-Id: Iebcfc14cc6b0a19c5dd015cd39875c81fa44003e Reviewed-on: https://skia-review.googlesource.com/3963 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Fix memory leak in FuzzGradientsGravatar kjlubick2016-10-25
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2446643003 Review-Url: https://codereview.chromium.org/2446643003
* Fix fuzzer's bools to be 0 or 1 onlyGravatar kjlubick2016-10-24
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2447823002 Review-Url: https://codereview.chromium.org/2447823002
* change SkStreams to work with sk_sp<SkData> instead of SkData*Gravatar reed2016-09-12
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2333713002 Review-Url: https://codereview.chromium.org/2333713002
* Convert SkAutoTUnref<SkData> to sk_sp<SkData>.Gravatar bungeman2016-08-03
| | | | | | | | | With the move from SkData::NewXXX to SkData::MakeXXX most SkAutoTUnref<SkData> were changed to sk_sp<SkData>. However, there are still a few SkAutoTUnref<SkData> around, so clean them up. Review-Url: https://codereview.chromium.org/2212493002
* Port FuzzPathop from chromiumGravatar kjlubick2016-07-19
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2148023002 Review-Url: https://codereview.chromium.org/2148023002
* Do an in-place replacement of SkRandom with Fuzz for FilterFuzzGravatar kjlubick2016-04-05
| | | | | | | | | | This feels rather clunky, because we aren't using the full potential of the fuzzer, but it works, it seems. BUG=skia:4969 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1710183002 Review URL: https://codereview.chromium.org/1710183002
* Create ParsePath API fuzzGravatar kjlubick2016-02-18
| | | | | | | | | This is based on https://codereview.chromium.org/1675053002 BUG=skia:4438 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1702383003 Review URL: https://codereview.chromium.org/1702383003
* fuzz: signalBug() / signalBoring()Gravatar mtklein2016-01-15
| | | | | | | | | | | | | | | Instead of a single ASSERT macro, this switches to two new methods: - signalBug(): tell afl-fuzz there's a bug caused by its inputs (by crashing) - signalBoring(): tell afl-fuzz these inputs are not worth testing (by exiting gracefully) I'm not seeing any effect on fuzz/s when I just always log verbosely. signalBug() now triggers SIGSEGV rather than SIGABRT. This should make it work with catchsegv more easily. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1585353002 Review URL: https://codereview.chromium.org/1585353002
* some fuzz hackingGravatar mtklein2016-01-14
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add new fuzz binary.Gravatar mtklein2016-01-13
This is designed to have short startup time, for maximum fuzzing throughput. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1589563002 Review URL: https://codereview.chromium.org/1589563002