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
Перейти к файлу
Christian Holler 4ce6f81fee 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

--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
2018-01-17 15:20:35 +01:00
.cargo bug 1401647 - Fix spidermonkey mozjs / rust-bindings builds. r=nalexander 2018-01-03 14:51:52 -05:00
.vscode Bug 1423565 - Update tasks.json as per documentation. r=rillian 2017-12-06 14:59:35 +01:00
accessible Bug 1431964 part 10. Remove nsIDOMAttr. r=mccr8 2018-01-21 12:07:31 -05:00
browser Bug 1431428 - use DOM instead of innerHTML for extension messaging in prefs, r=jaws 2018-01-18 18:19:10 +00:00
build Bug 1431314 - Update clang 3.9 and 5.0 toolchains. r=froydnj 2018-01-23 13:48:05 +09:00
caps Bug 1431204 - Make nsIURI.spec readonly r=mayhemer 2018-01-19 15:26:07 +01:00
chrome Bug 1426501 - Change JS code to use nsIURIMutator instead of the nsIURI.spec setter r=mayhemer 2018-01-08 15:20:29 +01:00
config Bug 1432298 - Make sm-fuzzing build ready for libfuzzer. r=sfink 2018-01-22 21:23:47 +01:00
db Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium 2017-12-07 22:09:15 +01:00
devtools Merge mozilla-inbound to mozilla-central r=merge a=merge 2018-01-23 12:02:17 +02:00
docshell Bug 1431854: Remove a bit of indirection in nsSHEntryShared::SetContentViewer. r=smaug 2018-01-19 23:50:13 +01:00
dom Merge mozilla-inbound to mozilla-central r=merge a=merge 2018-01-23 12:02:17 +02:00
editor Bug 1430785 - Make mozInlineSpellChecker not derived from nsIEditActionListener r=m_kato 2018-01-17 14:05:06 +09:00
embedding
extensions Bug 1430785 - Make mozInlineSpellChecker not derived from nsIEditActionListener r=m_kato 2018-01-17 14:05:06 +09:00
gfx Merge mozilla-inbound to mozilla-central r=merge a=merge 2018-01-23 12:02:17 +02:00
gradle/wrapper Backed out 20 changesets (bug 1411654) for incorrect android:debuggable. r=nalexander, a=RyanVM 2018-01-17 15:55:38 -05:00
hal Bug 1423552: Use BaseRect access methods instead of member variables in hal/ r=gsvelto 2018-01-10 11:17:58 -05:00
image Bug 1431090 - Prepare tools/fuzzing/ to be used with JS_STANDALONE. r=froydnj 2018-01-17 15:20:35 +01:00
intl Bug 1431672 - Add a pref to control whether underscore is treated as a word-forming character. r=m_kato 2018-01-22 10:19:30 +00:00
ipc Backed out 5 changesets (bug 1255485) for mochitest failures on test/mochitest/test_hangui.xul 2018-01-23 02:01:43 +02:00
js Bug 1432298 - Make sm-fuzzing build ready for libfuzzer. r=sfink 2018-01-22 21:23:47 +01:00
layout Bug 1430982 - part 6: Rename nsEditorSpellCheck to mozilla::EditorSpellCheck and expose its header r=m_kato 2018-01-18 21:01:13 +09:00
media Bug 1431090 - Prepare tools/fuzzing/ to be used with JS_STANDALONE. r=froydnj 2018-01-17 15:20:35 +01:00
memory Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj 2017-11-05 19:37:28 -08:00
mfbt Bug 1430708 - Update lz4 to version 1.8.1.2. r=froydnj 2018-01-22 08:48:44 -05:00
mobile Merge inbound to mozilla-central. a=merge 2018-01-23 02:21:47 +02:00
modules Merge inbound to mozilla-central. a=merge 2018-01-19 12:10:24 +02:00
mozglue Bug 1423999: Improved UIA detection that eliminates handle duplication; r=Jamie 2017-12-07 12:13:14 -07:00
netwerk Bug 1430738 - Fix the channel timing info if a halfOpenSocket is opened with a non-null httpTransaction. r=mcmanus 2018-01-22 12:10:00 -05:00
nsprpub Bug 1420407, uplift NSPR_4_18_RTM, no code change, only version number. Require version 4.18 for building. r=me 2018-01-18 14:02:42 +01:00
other-licenses Backed out 5 changesets (bug 1418425) requested per comment #83. on a CLOSED TREE a=backout 2018-01-15 15:30:30 +02:00
parser Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2018-01-16 18:00:21 +02:00
python Backed out 5 changesets (bug 1255485) for mochitest failures on test/mochitest/test_hangui.xul 2018-01-23 02:01:43 +02:00
rdf Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj 2017-11-05 19:37:28 -08:00
security Merge inbound to mozilla-central. a=merge 2018-01-23 02:21:47 +02:00
services Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2018-01-22 11:19:18 +00:00
servo servo: Merge #19841 - stylo: Avoid separate monomorphizations of CSS serialization for utf-8 and utf-16 (from bholley:single_tocss); r=emilio 2018-01-22 16:58:30 -06:00
startupcache Bug 1431204 - Change calls to nsIURI.spec setter to use nsIURIMutator instead r=mayhemer 2018-01-19 15:19:42 +01:00
storage Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj 2017-11-05 19:37:28 -08:00
taskcluster Bug 1432298 - Make sm-fuzzing build ready for libfuzzer. r=sfink 2018-01-22 21:23:47 +01:00
testing Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-01-23 02:25:48 +02:00
third_party No bug - Revendor rust dependencies 2018-01-22 23:25:01 +00:00
toolkit Bug 1431090 - Prepare tools/fuzzing/ to be used with JS_STANDALONE. r=froydnj 2018-01-17 15:20:35 +01:00
tools Bug 1431090 - Prepare tools/fuzzing/ to be used with JS_STANDALONE. r=froydnj 2018-01-17 15:20:35 +01:00
uriloader Bug 1411579 - add system handler when Firefox runs in flatpak; r=stransky 2018-01-12 16:32:53 +01:00
view Bug 1423551: Use BaseRect access methods instead of member variables in view/. r=jet 2018-01-10 11:16:22 -05:00
widget Merge inbound to mozilla-central. a=merge 2018-01-23 02:21:47 +02:00
xpcom Bug 1431090 - Prepare tools/fuzzing/ to be used with JS_STANDALONE. r=froydnj 2018-01-17 15:20:35 +01:00
xpfe Bug 1383876 - Part 3: Remove prerendering methods from nsIWebBrowserChrome3.idl, r=freesamael 2018-01-12 17:52:56 -05:00
.arcconfig Bug 1424950: Add missing repository.callsign to .arcconfig. r=dkl 2017-12-13 15:38:18 +01:00
.clang-format Bug 1414764 - Remove Mozilla specific options to avoid build warnings with gcc and -Wcomment enabled. r=sylvestre 2017-11-06 11:47:40 +02:00
.clang-format-ignore Bug 1430792 - ExampleStylesheet.h should not be formatted r=andi 2018-01-16 16:37:01 +01:00
.cron.yml Bug 1418188 - Run Searchfox indexing in TaskCluster on a daily basis (r=dustin,chmanchester) 2017-11-23 07:25:12 -08:00
.eslintignore Bug 1419102 - Implement the Enterprise Policies feature to provide enterprise users with easier control and setup of deployments of Firefox. r=Mossop 2018-01-22 17:01:48 -02:00
.eslintrc.js Bug 1429701 - Enable ESLint rule mozilla/use-services for dom/indexedDB. r=bevis 2018-01-10 17:25:52 +00:00
.flake8 Bug 1395126 - Support cascading configuration for flake8, r=bc 2017-08-29 17:32:31 -04:00
.gdbinit Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro. 2017-10-03 09:05:19 +11:00
.gdbinit_python
.gitignore Bug 1429511 - Move Rust port of mozrunner to central. r=ahal 2018-01-12 15:31:20 +00:00
.hgignore Bug 1431177 - Update hgignore for talos webkit tests; r=jmaher 2018-01-17 13:59:55 -05:00
.hgtags Added tag FIREFOX_NIGHTLY_59_END for changeset 5faab9e61990 2018-01-22 11:14:37 +00:00
.inferconfig
.lldbinit Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro. 2017-10-03 09:05:19 +11:00
.taskcluster.yml bug 1328719 - task.extra.cron + task.payload.env.ACTION_TASK_GROUP_ID. r=bstack r=dustin 2018-01-12 22:17:39 -08:00
.yamllint
.ycm_extra_conf.py
AUTHORS
CLOBBER Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2018-01-22 11:19:18 +00:00
GNUmakefile
LEGAL
LICENSE
Makefile.in Bug 1424651: Remove unused SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE mozconfig variable; r=ted.mielczarek 2017-12-10 23:05:05 -07:00
README.txt
aclocal.m4
build.gradle Backed out 20 changesets (bug 1411654) for incorrect android:debuggable. r=nalexander, a=RyanVM 2018-01-17 15:55:38 -05:00
client.mk Bug 1417264 - Write .mozconfig.json from Python; r=nalexander 2017-11-13 17:45:03 -08:00
client.py Bug 1399100 - fix client.py follow-up, r=kaie 2017-09-20 09:13:14 +02:00
configure.in
configure.py Bug 1412460 - Don't write make variables in configure.d; r=mshal 2017-11-01 15:02:11 -07:00
gradle.properties Backed out 20 changesets (bug 1411654) for incorrect android:debuggable. r=nalexander, a=RyanVM 2018-01-17 15:55:38 -05:00
gradlew
mach
moz.build Bug 1403519 - only build docs when necessary r=gps 2017-10-02 18:22:56 +00:00
moz.configure Bug 1425035 - move --enable-ui-locale to moz.configure; r=gps 2017-12-18 14:21:26 -08:00
mozilla-config.h.in Bug 1426898 - Stop including Char16.h everywhere. r=Waldo 2017-12-23 00:53:12 +09:00
npm-shrinkwrap.json Bug 1371293 - Upgrade ESLint to version 4.8.0, configuration changes. r=mossop 2017-10-09 10:54:16 +01:00
old-configure.in Bug 1420060, uplift NSS_3_35_RTM, no code change, only version number. Require version 3.35 for building. r=me 2018-01-18 15:33:36 +01:00
package.json Bug 1371293 - Upgrade ESLint to version 4.8.0, configuration changes. r=mossop 2017-10-09 10:54:16 +01:00
settings.gradle Bug 1360587 - Part 2. Remove bouncer apk build config; source; docs, r=nalexander 2017-10-25 22:51:44 +08:00
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/