Commit Graph
11 Commits
Author SHA1 Message Date
Jesse Schwartzentruber 0a3622a2f4 Bug 1895369 - Support MOZ_FUZZ_TESTFILE for AFL++ fuzzing targets r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D209621
2024-05-07 10:38:41 +00:00
cat 32647f0fca Bug 1879171 - Add AFL++ fuzzing build r=decoder,taskgraph-reviewers,bhearsum
Differential Revision: https://phabricator.services.mozilla.com/D208401
2024-04-25 22:16:22 +00:00
Steve Fink 5d735ee976 Bug 1744806 - Fix gcc + --enable-fuzzing missing header r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D133121
2021-12-08 17:00:24 +00:00
Christian Holler 58cc33fb0b Bug 1530773 - Add log module and macro for fuzzing. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D21251
2019-03-04 14:13:28 +00:00
Gurzau Raul ec87e9fbd1 Backed out changeset 2a034c02b842 (bug 1530773) for bustage at interface/FuzzingInterface.h 2019-02-27 06:01:39 +02:00
Christian Holler cfad41ce00 Bug 1530773 - Add log module and macro for fuzzing. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D21251
2019-02-26 21:10:02 +00:00
Christian Holler da96299906 Bug 1431090 - Prepare tools/fuzzing/ to be used with JS_STANDALONE. r=froydnj
This patch adjusts tools/fuzzing/ in such a way that the relevant parts can be
reused in the JS engine. Changes in detail include:

* Various JS_STANDALONE checks to exclude parts that cannot be included in
  those builds.

* Turn LibFuzzerRegistry and LibFuzzerRunner into generic FuzzerRegistry and
  FuzzerRunner classes and use them for AFL as well. Previously, AFL was
  piggy-backing on gtests which was kind of an ugly solution anyway (besides
  that it can't work in JS). Now more code like registry and harness is
  shared between the two and they follow almost the same call paths and entry
  points. AFL macros in FuzzingInterface have been rewritten accordingly.
  This also required name changes in various places. Furthermore, this unifies
  the way, the fuzzing target is selected, using the FUZZER environment
  variable rather than LIBFUZZER (using LIBFUZZER in browser builds will give
  you a deprecation warning because I know some people are using this already
  and need time to switch). Previously, AFL target had to be selected using
  GTEST_FILTER, so this is also much better now.

* I had to split up FuzzingInterface* such that the STREAM parts are in a
  separate set of files FuzzingInterfaceStream* because they use nsStringStream
  which is not allowed to be included into the JS engine even in a full browser
  build (error: "Using XPCOM strings is limited to code linked into libxul.").
  I also had to pull FuzzingInterface.cpp (the RAW part only) into the header
  and make it static because otherwise, would have to make not only separate
  files but also separate libraries to statically link to the JS engine, which
  seemed overkill for a single small function. The streaming equivalent of the
  function is still in a cpp file.

* LibFuzzerRegister functions are now unique by appending the module name to
  avoid redefinition errors.

MozReview-Commit-ID: 44zWCdglnHr
2018-01-17 15:20:35 +01:00
Coroiu Cristina f45b60d1d4 Backed out 2 changesets (bug 1431090) for Bf bustage at src/tools/fuzzing/interface/harness/FuzzerTestHarness.h
Backed out changeset 2e98bda3f397 (bug 1431090)
Backed out changeset eb6acc9e44ad (bug 1431090)
2018-01-23 13:49:26 +02:00
Christian Holler 313f4d9830 Bug 1431090 - Prepare tools/fuzzing/ to be used with JS_STANDALONE. r=froydnj
This patch adjusts tools/fuzzing/ in such a way that the relevant parts can be
reused in the JS engine. Changes in detail include:

* Various JS_STANDALONE checks to exclude parts that cannot be included in
  those builds.

* Turn LibFuzzerRegistry and LibFuzzerRunner into generic FuzzerRegistry and
  FuzzerRunner classes and use them for AFL as well. Previously, AFL was
  piggy-backing on gtests which was kind of an ugly solution anyway (besides
  that it can't work in JS). Now more code like registry and harness is
  shared between the two and they follow almost the same call paths and entry
  points. AFL macros in FuzzingInterface have been rewritten accordingly.
  This also required name changes in various places. Furthermore, this unifies
  the way, the fuzzing target is selected, using the FUZZER environment
  variable rather than LIBFUZZER (using LIBFUZZER in browser builds will give
  you a deprecation warning because I know some people are using this already
  and need time to switch). Previously, AFL target had to be selected using
  GTEST_FILTER, so this is also much better now.

* I had to split up FuzzingInterface* such that the STREAM parts are in a
  separate set of files FuzzingInterfaceStream* because they use nsStringStream
  which is not allowed to be included into the JS engine even in a full browser
  build (error: "Using XPCOM strings is limited to code linked into libxul.").
  I also had to pull FuzzingInterface.cpp (the RAW part only) into the header
  and make it static because otherwise, would have to make not only separate
  files but also separate libraries to statically link to the JS engine, which
  seemed overkill for a single small function. The streaming equivalent of the
  function is still in a cpp file.

* LibFuzzerRegister functions are now unique by appending the module name to
  avoid redefinition errors.

MozReview-Commit-ID: 44zWCdglnHr
2018-01-17 15:20:35 +01:00
Andrea Marchesini 304820957d Bug 1409327 - NS_NewBufferedInputStream should take the ownership of the inputStream, r=smaug 2017-10-19 11:39:30 +02:00
Christian Holler (:decoder) 8328f7de87 Bug 1303757 - Add unified fuzzing interface. r=froydnj
MozReview-Commit-ID: Dk5ajWlVHQj
2016-10-19 01:18:12 +02:00