зеркало из https://github.com/mozilla/gecko-dev.git
Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
4ce6f81fee
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 --HG-- rename : tools/fuzzing/libfuzzer/harness/LibFuzzerRunner.cpp => tools/fuzzing/interface/harness/FuzzerRunner.cpp rename : tools/fuzzing/libfuzzer/harness/LibFuzzerRunner.h => tools/fuzzing/interface/harness/FuzzerRunner.h rename : tools/fuzzing/libfuzzer/harness/LibFuzzerTestHarness.h => tools/fuzzing/interface/harness/FuzzerTestHarness.h rename : tools/fuzzing/libfuzzer/harness/moz.build => tools/fuzzing/interface/harness/moz.build rename : tools/fuzzing/libfuzzer/harness/LibFuzzerRegistry.cpp => tools/fuzzing/registry/FuzzerRegistry.cpp rename : tools/fuzzing/libfuzzer/harness/LibFuzzerRegistry.h => tools/fuzzing/registry/FuzzerRegistry.h extra : rebase_source : 7d0511ca0591dbf4d099376011402e063a79ee3b |
||
---|---|---|
.cargo | ||
.vscode | ||
accessible | ||
browser | ||
build | ||
caps | ||
chrome | ||
config | ||
db | ||
devtools | ||
docshell | ||
dom | ||
editor | ||
embedding | ||
extensions | ||
gfx | ||
gradle/wrapper | ||
hal | ||
image | ||
intl | ||
ipc | ||
js | ||
layout | ||
media | ||
memory | ||
mfbt | ||
mobile | ||
modules | ||
mozglue | ||
netwerk | ||
nsprpub | ||
other-licenses | ||
parser | ||
python | ||
rdf | ||
security | ||
services | ||
servo | ||
startupcache | ||
storage | ||
taskcluster | ||
testing | ||
third_party | ||
toolkit | ||
tools | ||
uriloader | ||
view | ||
widget | ||
xpcom | ||
xpfe | ||
.arcconfig | ||
.clang-format | ||
.clang-format-ignore | ||
.cron.yml | ||
.eslintignore | ||
.eslintrc.js | ||
.flake8 | ||
.gdbinit | ||
.gdbinit_python | ||
.gitignore | ||
.hgignore | ||
.hgtags | ||
.inferconfig | ||
.lldbinit | ||
.taskcluster.yml | ||
.yamllint | ||
.ycm_extra_conf.py | ||
AUTHORS | ||
CLOBBER | ||
GNUmakefile | ||
LEGAL | ||
LICENSE | ||
Makefile.in | ||
README.txt | ||
aclocal.m4 | ||
build.gradle | ||
client.mk | ||
client.py | ||
configure.in | ||
configure.py | ||
gradle.properties | ||
gradlew | ||
mach | ||
moz.build | ||
moz.configure | ||
mozilla-config.h.in | ||
npm-shrinkwrap.json | ||
old-configure.in | ||
package.json | ||
settings.gradle | ||
test.mozbuild |
README.txt
An explanation of the Mozilla Source Code Directory Structure and links to project pages with documentation can be found at: https://developer.mozilla.org/en/Mozilla_Source_Code_Directory_Structure For information on how to build Mozilla from the source code, see: https://developer.mozilla.org/en/docs/Build_Documentation To have your bug fix / feature added to Mozilla, you should create a patch and submit it to Bugzilla (https://bugzilla.mozilla.org). Instructions are at: https://developer.mozilla.org/en/docs/Creating_a_patch https://developer.mozilla.org/en/docs/Getting_your_patch_in_the_tree If you have a question about developing Mozilla, and can't find the solution on https://developer.mozilla.org, you can try asking your question in a mozilla.* Usenet group, or on IRC at irc.mozilla.org. [The Mozilla news groups are accessible on Google Groups, or news.mozilla.org with a NNTP reader.] You can download nightly development builds from the Mozilla FTP server. Keep in mind that nightly builds, which are used by Mozilla developers for testing, may be buggy. Firefox nightlies, for example, can be found at: https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/ - or - https://nightly.mozilla.org/