Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #110 - Folder structure overhaul #135

Merged
merged 73 commits into from
Oct 19, 2017
Merged
Show file tree
Hide file tree
Changes from 67 commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
301ac9a
Rename autoBisect folder to something that adheres to standards.
nth10sd Jul 28, 2017
f63310f
Modernise module import situation.
nth10sd Jul 27, 2017
33a01cf
Reorganise funfuzz directories to a format that appeases Python packa…
nth10sd Aug 21, 2017
740ee74
Remove executable bits from remaining python files that have it turne…
nth10sd Aug 25, 2017
82c2c87
Activate most pylint extensions and most disabled-by-default pylint m…
nth10sd Aug 1, 2017
14a3b22
Add more line-specific pylint messages.
nth10sd Aug 2, 2017
c8879f4
Rename some non-Python files and fix their references.
nth10sd Aug 26, 2017
500b9a6
Rename files in autobisectjs/ to better match standards.
nth10sd Aug 24, 2017
6880d03
Fix pylint issues for files in autobisectjs/ and move some to be line…
nth10sd Sep 16, 2017
f5e00ca
Rename "buildOptions" to "build_options".
nth10sd Aug 26, 2017
95317ad
Fix pylint issues in "build_options" and move some to be line-specific.
nth10sd Sep 16, 2017
18b0f9b
Rename "compareJIT" to "compare_jit".
nth10sd Aug 26, 2017
11a4489
Fix pylint issues in "compare_jit" and move some to be line-specific.
nth10sd Sep 17, 2017
cc63c73
Small reorder nit fix.
nth10sd Sep 18, 2017
6829769
Rename "compileShell" to "compile_shell".
nth10sd Sep 17, 2017
d5efd3e
Fix pylint issues in "compile_shell" and move some to be line-specific.
nth10sd Sep 17, 2017
93dec4c
Rename "inspectShell" to "inspect_shell".
nth10sd Aug 30, 2017
1e430e1
Fix pylint issues in "inspect_shell" and move some to be line-specific.
nth10sd Sep 17, 2017
7eae86b
Rename "jsInteresting" to "js_interesting".
nth10sd Sep 17, 2017
1a59c70
Fix pylint issues in "js_interesting" and move some to be line-specific.
nth10sd Sep 17, 2017
49324f4
Rename "loopjsfunfuzz" to "loop".
nth10sd Aug 26, 2017
c108c2d
Fix pylint issues in "loop" and move some to be line-specific.
nth10sd Sep 17, 2017
c22ab3b
Fix pylint issues in "pinpoint" and move some to be line-specific.
nth10sd Sep 17, 2017
3670326
Rename "shellFlags" to "shell_flags".
nth10sd Aug 30, 2017
3325c46
Fix pylint issues in "shell_flags" and move some to be line-specific.
nth10sd Sep 17, 2017
34dc8ed
Fix pylint issues in "crashesat" and move some to be line-specific.
nth10sd Aug 26, 2017
2e79ff0
Rename "createCollector" to "create_collector" and move its pylint ig…
nth10sd Sep 16, 2017
e82d721
Move pylint ignore statements to be line-specific in detect_malloc_er…
nth10sd Sep 16, 2017
c2f4222
Rename "downloadBuild" to "download_build".
nth10sd Sep 17, 2017
2a0791e
Fix pylint issues in "download_build" and move some to be line-specific.
nth10sd Sep 17, 2017
098e890
Rename "fileManipulation" to "file_manipulation", fix some pylint iss…
nth10sd Sep 16, 2017
c7d9af9
Rename "findIgnoreLists" to "find_ignore_lists", fix some pylint issu…
nth10sd Sep 16, 2017
3be8164
Rename "forkJoin" to "fork_join".
nth10sd Sep 17, 2017
f3b6dfc
Fix pylint issues in "fork_join" and move some to be line-specific.
nth10sd Sep 18, 2017
a657d19
Rename "hgCmds" to "hg_helpers".
nth10sd Sep 18, 2017
ab62658
Fix pylint issues in "hg_helpers" and move some to be line-specific.
nth10sd Sep 18, 2017
7f0ccdf
Rename "linkJS" to "link_js", fix some pylint issues and move others …
nth10sd Sep 16, 2017
f716526
Rename "lithOps" to "lithium_helpers".
nth10sd Sep 18, 2017
425b8e0
Fix pylint issues in "lithium_helpers" and move some to be line-speci…
nth10sd Sep 18, 2017
f11fdf8
Fix pylint issues in "LockDir" and move some to be line-specific.
nth10sd Sep 16, 2017
bcd7f95
Rename "reposUpdate" to "repos_update".
nth10sd Sep 18, 2017
2f76831
Fix pylint issues in "repos_update" and move some to be line-specific.
nth10sd Sep 18, 2017
2fd3725
Fix pylint issues in "s3cache" and move some to be line-specific.
nth10sd Aug 26, 2017
c674cf4
Fix pylint issues in "subprocesses" and move some to be line-specific.
nth10sd Sep 18, 2017
2a999fa
Fix pylint issues in "bot" and move some to be line-specific.
nth10sd Sep 18, 2017
53bc1b9
Rename "loopBot" to "loop_bot" and move its pylint ignore statements …
nth10sd Sep 18, 2017
a554fe3
Remove shebang lines from most files except tooltool for now.
nth10sd Sep 18, 2017
7e0bda2
Switch back to relative import in __main__.
nth10sd Sep 19, 2017
a5e399b
Move the "main()" execution block to "__main__" in autobisectjs/ dire…
nth10sd Sep 19, 2017
a4797e6
Bump version to "0.2.0".
nth10sd Sep 19, 2017
4379a3a
Add lithium-reducer as a requirement, now that it is on PyPi.
nth10sd Sep 19, 2017
ddfb78a
Tweak after-fix.txt to look for other python files in src/funfuzz/ as…
nth10sd Sep 20, 2017
ecae8fc
Fail explicitly for now if cannot to any FuzzManager server, and if c…
nth10sd Sep 20, 2017
6470931
Remove the refreshSignatures function - assume there should be a .fuz…
nth10sd Sep 20, 2017
6c9e2ae
Disable fuzzing via downloaded builds at least until tooltool is repl…
nth10sd Sep 20, 2017
90e3847
Minor documentation updates.
nth10sd Sep 20, 2017
1f6cbcf
Remove optparse help from documentation since they can be separately …
nth10sd Sep 20, 2017
1f596c5
More documentation tweaks.
nth10sd Sep 20, 2017
0d48f11
Convert compile_shell and compare_jit references to the new module us…
nth10sd Sep 20, 2017
309b7e3
Make sure build_options, which is called by compile_shell, fails grac…
nth10sd Sep 21, 2017
d9c5b3e
Make source_base in the linkFuzzer function not rely on p0.
nth10sd Sep 21, 2017
0e222bd
Make loop call js_interesting as a module invocation.
nth10sd Sep 21, 2017
2d542b2
Make pinpoint call autobisectjs as a module invocation.
nth10sd Sep 21, 2017
ce224c5
Make the pylint "invalid-name" issue line-specific in pinpoint.
nth10sd Sep 21, 2017
a6c231b
Make repos_update and loop_bot be able to deal with module invocations.
nth10sd Sep 21, 2017
4d4d0bf
Removed unused os import.
nth10sd Sep 21, 2017
cef10b0
Removing flake8 ignore line for setup.py should work.
nth10sd Sep 23, 2017
9e0bddd
Add FuzzManager as a requirement, now that it is on PyPi.
nth10sd Oct 11, 2017
b584ca1
Also make Travis test using PyPy and PyPy3.
nth10sd Oct 11, 2017
1f09773
PyPy3 does not seem to work easily yet. Remove it for now.
nth10sd Oct 11, 2017
3cb944e
Neither does PyPy, so remove it.
nth10sd Oct 11, 2017
b224740
Fix bug in loop.py preventing shellify from working properly.
nth10sd Oct 18, 2017
95b1045
Documentation updates.
nth10sd Oct 19, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
# Use multiple processes to speed up Pylint.
jobs=2

# List of plugins (as comma separated values of python modules names) to load,
# usually to register additional checkers.
#
# Whole list retrieved on 2017-07-28 from: https://pylint.readthedocs.io/en/latest/technical_reference/extensions.html
# Remaining disabled: pylint.extensions.comparetozero,pylint.extensions.emptystring
load-plugins=pylint.extensions.bad_builtin,pylint.extensions.check_elif,pylint.extensions.docparams,pylint.extensions.docstyle,pylint.extensions.mccabe,pylint.extensions.overlapping_exceptions,pylint.extensions.redefined_variable_type
accept-no-param-doc=no
accept-no-raise-doc=no
accept-no-return-doc=no
accept-no-yields-doc=no

[MESSAGES CONTROL]

# Disable the message, report, category or checker with the given id(s). You
Expand All @@ -14,9 +25,13 @@ jobs=2
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
#
# Ignore here until autobisect-js is no longer around
disable=invalid-name
disable=locally-disabled,no-absolute-import,suppressed-message,useless-suppression

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once). See also the "--disable" option for examples.
enable=apply-builtin,backtick,bad-inline-option,bad-python3-import,basestring-builtin,buffer-builtin,cmp-builtin,cmp-method,coerce-builtin,coerce-method,delslice-method,deprecated-pragma,deprecated-str-translate-call,deprecated-string-function,dict-iter-method,dict-view-method,div-method,eq-without-hash,exception-message-attribute,execfile-builtin,file-builtin,file-ignored,filter-builtin-not-iterating,getslice-method,hex-method,idiv-method,import-star-module-level,indexing-exception,input-builtin,intern-builtin,invalid-str-codec,locally-enabled,long-builtin,long-suffix,map-builtin-not-iterating,metaclass-assignment,next-method-called,nonzero-method,oct-method,old-division,old-ne-operator,old-octal-literal,old-raise-syntax,parameter-unpacking,print-statement,raising-string,range-builtin-not-iterating,raw-checker-failed,raw_input-builtin,rdiv-method,reduce-builtin,reload-builtin,round-builtin,setslice-method,standarderror-builtin,sys-max-int,unichr-builtin,unicode-builtin,unpacking-in-except,using-cmp-argument,xrange-builtin,zip-builtin-not-iterating

[BASIC]

Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[![Build Status](https://travis-ci.org/MozillaSecurity/funfuzz.svg?branch=master)](https://travis-ci.org/MozillaSecurity/funfuzz) [![Build status](https://ci.appveyor.com/api/projects/status/m8gw5echa7f2f26r/branch/master?svg=true)](https://ci.appveyor.com/project/MozillaSecurity/funfuzz/branch/master)

This repository contains several JavaScript-based fuzzers. [jsfunfuzz](js/jsfunfuzz) tests JavaScript engines and can run in a JavaScript shell, compareJIT compares output from SpiderMonkey using different flags, while randorderfuzz throws in random tests from the mozilla-central directory into generated jsfunfuzz output.
This repository contains several JavaScript-based fuzzers. [jsfunfuzz](js/jsfunfuzz) tests JavaScript engines and can run in a JavaScript shell, compare_jit compares output from SpiderMonkey using different flags, while randorderfuzz throws in random tests from the mozilla-central directory into generated jsfunfuzz output.

Most of the code other than testcase generation is written in Python: restarting the program when it exits or crashes, noticing evidence of new bugs from the program's output, [reducing testcases](https://github.com/MozillaSecurity/lithium/), and [identifying when regressions were introduced](autobisect-js/README.md).
Most of the code other than testcase generation is written in Python: restarting the program when it exits or crashes, noticing evidence of new bugs from the program's output, [reducing testcases](https://github.com/MozillaSecurity/lithium/), and [identifying when regressions were introduced](src/funfuzz/autobisectjs/README.md).


## Setup
Expand All @@ -25,7 +25,7 @@ Here's a guide to [pip and virtualenv](https://www.dabapps.com/blog/introduction

### Windows (only 64-bit supported)

1. Install [MozillaBuild](https://wiki.mozilla.org/MozillaBuild) (Using compileShell for SpiderMonkey requires at least version 2.2.0) to get an msys shell.
1. Install [MozillaBuild](https://wiki.mozilla.org/MozillaBuild) (Using compile_shell for SpiderMonkey requires at least version 2.2.0) to get an msys shell.
2. Install [Git for Windows](https://msysgit.github.io/) to get Git for Windows in order to clone these funfuzz repositories. (32-bit works best for now)
3. Install [Debugging Tools for Windows](https://msdn.microsoft.com/en-us/windows/hardware/hh852365.aspx) to get cdb.exe and thus stacks from crashes.
4. Make sure you install at least Microsoft Visual Studio 2015 (Community Edition is recommended) as per the build instructions above in the Setup section.
Expand All @@ -35,7 +35,7 @@ Here's a guide to [pip and virtualenv](https://www.dabapps.com/blog/introduction

### Mac

1. On Mac OS X 10.9, you must first install a newer version of unzip than the one that comes with the OS. (Old versions [hit an error](https://bugzilla.mozilla.org/show_bug.cgi?id=1032391) on large zip files, such as the "mac64.tests.zip" file that [downloadBuild.py](util/downloadBuild.py) grabs.)
1. On Mac OS X 10.9, you must first install a newer version of unzip than the one that comes with the OS. (Old versions [hit an error](https://bugzilla.mozilla.org/show_bug.cgi?id=1032391) on large zip files, such as the "mac64.tests.zip" file that [download_build.py](util/download_build.py) grabs.)

```
brew install homebrew/dupes/unzip
Expand Down Expand Up @@ -77,21 +77,21 @@ especially after updating major/minor OS versions. This sometimes manifests on M

To run **only the js fuzzers** which compiles shells with random configurations every 8 hours and tests them:

`python -u funfuzz/loopBot.py -b "--random" -t "js" --target-time 28800 | tee ~/log-loopBotPy.txt`
`python -u funfuzz.loop_bot -b "--random" -t "js" --target-time 28800 | tee ~/log-loop_botPy.txt`

To test **a patch** (assuming patch is in ~/patch.diff) against a specific branch (assuming **Mercurial** mozilla-inbound is in ~/trees/mozilla-inbound), using a debug 64-bit deterministic shell configuration, every 8 hours:

`python -u funfuzz/loopBot.py -b "--enable-debug --enable-more-deterministic -R ~/trees/mozilla-inbound -P ~/patch.diff" -t "js" --target-time 28800 | tee ~/log-loopBotPy.txt`
`python -u funfuzz.loop_bot -b "--enable-debug --enable-more-deterministic -R ~/trees/mozilla-inbound -P ~/patch.diff" -t "js" --target-time 28800 | tee ~/log-loop_botPy.txt`

In js mode, loopBot.py makes use of:
In js mode, loop_bot makes use of:

* [compileShell](js/compileShell.py)
* [jsfunfuzz](js/jsfunfuzz)
* [compareJIT](js/compareJIT.py) (if testing deterministic builds)
* randorderfuzz (included in jsfunfuzz, if tests are present in the mozilla repository)
* [autoBisect](autobisect-js/README.md) (if the mozilla repository is present).
* [compile_shell](js/compile_shell.py)
* [jsfunfuzz](src/funfuzz/js/jsfunfuzz)
* [compare_jit](src/funfuzz/js/compare_jit.py) (if testing deterministic builds)
* randorderfuzz (included in funfuzz, if tests are present in the mozilla repository)
* [autoBisect](src/funfuzz/autobisectjs/README.md) (if the mozilla repository is present).

The parameters in `-b` get passed into [compileShell](js/compileShell.py) and [autoBisect](autobisect-js/README.md).
The parameters in `-b` get passed into [compile_shell](js/compile_shell.py) and [autoBisect](src/funfuzz/autobisectjs/README.md).

FuzzManager support got landed, so you will also need to create a ~/.fuzzmanagerconf file, similar to:

Expand All @@ -111,7 +111,7 @@ Replace anything between "<" and ">" with your desired parameters.

**Q: What platforms does funfuzz run on?**

**A:** compileShell has been tested on:
**A:** compile_shell has been tested on:

* Windows 10, 7 and Windows Server 2012 R2, with [MozillaBuild 2.2.0](https://wiki.mozilla.org/MozillaBuild). It should also work with MozillaBuild 3.0.
* Mac OS X 10.12
Expand Down
Empty file removed __init__.py
Empty file.
11 changes: 5 additions & 6 deletions after-fix.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# https://github.com/jruderman/after-fix

contents bot.py
contents util/*.py
contents detect/*.py
contents js/*.py
contents js/shared/*.js
contents js/jsfunfuzz/*.js
contents src/funfuzz/*.py
contents src/funfuzz/util/*.py
contents src/funfuzz/js/*.py
contents src/funfuzz/js/shared/*.js
contents src/funfuzz/js/jsfunfuzz/*.js
80 changes: 0 additions & 80 deletions autobisect-js/README.md

This file was deleted.

Empty file removed autobisect-js/__init__.py
Empty file.
47 changes: 0 additions & 47 deletions autobisect-js/examples-autoBisect.md

This file was deleted.

66 changes: 0 additions & 66 deletions autobisect-js/findCsetsIntersection.py

This file was deleted.

Empty file removed detect/__init__.py
Empty file.
50 changes: 0 additions & 50 deletions detect/detect_malloc_errors.py

This file was deleted.

Loading