Commit Graph

59 Commits

Author SHA1 Message Date
fenner 37c4a2c8e5 Allow passing environment variables to reproducer (#1312) 2018-04-11 10:12:13 -07:00
Oliver Chang 52f5934785 helper: use return code from docker run for reproduce, run_fuzzer.
Fixes #1246.
2018-03-16 09:51:52 +11:00
htuch 9761e6519d Revert "infra/helper: persist /root directory via bind mount." (#1133)
* Revert "[Envoy] Add project. (#1130)"

This reverts commit d0fc0203d2.

* Revert "Fix Skia compile (#1132)"

This reverts commit 4bf9e7f8fc.

* Revert "Propose graphics magick for inclusion in OSS-Fuzz (#1131)"

This reverts commit cb277ccb68.

* Revert "[json-c] Add project (#1123)"

This reverts commit 31b00466ff.

* Revert "[infra] Update upload URL timeout to be the same as build timeout (#1112)"

This reverts commit 92152969c5.

* Revert "infra/helper: persist /root directory via bind mount. (#1125)"

This reverts commit b77745ab6c.
2018-02-02 12:51:22 -08:00
htuch b77745ab6c infra/helper: persist /root directory via bind mount. (#1125)
For Bazel builds, this preserves the Bazel cache across multiple
invocations of build_fuzzers, which significantly speeds up the build
and reduces the debug cycle for new projects.

Signed-off-by: Harvey Tuch <htuch@google.com>
2018-02-01 13:32:49 +11:00
htuch e4a484aabe coverage: docs and infra/helper.py fix. (#1126)
While trying to get a coverage report for a new project (Envoy),
building with the coverage sanitizer seemed necessary to get the
coverage files dumped.

Signed-off-by: Harvey Tuch <htuch@google.com>
2018-01-30 11:35:32 -08:00
Jonathan Rudenberg b382e89867 [infra] Allow passing environment variables to run_fuzzer (#1075)
This allows setting additional sanitizer options, for example:

    run_fuzzer -e ASAN_OPTIONS=-allocator_may_return_null=0
2018-01-15 10:42:16 -08:00
Max Moroz d2805976a2 [infra] Increase copyright year in the templates automatically. 2018-01-12 12:49:40 -08:00
Max Moroz c069a7c780 Revert of "[infra] Reland profile configuration needed for new code coverage.".
See more information in comments for PR #1050.
2017-12-28 15:10:53 -08:00
Max Moroz add7bbbb2d
[infra] Reland profile configuration needed for new code coverage. (#1050) 2017-12-28 11:10:47 -08:00
Oliver Chang f0a2aec376
Update helper.py 2017-12-08 12:45:59 -08:00
Oliver Chang 312cd47208 Add priliminary support for "engine-less" builds.
Needed for #925.
2017-10-31 15:22:58 +11:00
Max Moroz 55c0ea6d97 [infra] Temporarily disable sanitizer=profile build configuration. 2017-10-20 20:34:01 -07:00
Oliver Chang fa41e6a949 Add script for testing sandbox. 2017-10-16 15:54:58 -07:00
Max Moroz 6a6163110a [infra] Add another coverage build using Clang Source-based Code Coverage. (#804)
* [infra] Add another coverage build using Clang Source-based Code Coverage.

* [infra] Remove redundant compile_coverage script.
2017-08-31 13:43:06 -07:00
Oliver Chang 59ce244d97 [infra] helper: don't set BUILD_UID. 2017-07-17 19:07:27 -07:00
robertswiecki 268d8052a2 Support honggfuzz as a FUZZING_ENGINE (#636) 2017-06-01 17:55:01 -07:00
Oliver Chang c093b7101d [infra] Make coverage run with dict and options. 2017-05-31 12:44:25 -07:00
Oliver Chang f576b352b4 [helper] Add a check for valid project name when generating files. 2017-05-12 15:58:13 -07:00
Abhishek Arya 43838854c1 Add valgrind support in reproduce command (#596)
* Add valgrind support in infra/helper.py, fixes #592.

* Fix spacing.
2017-05-10 14:32:01 -07:00
Oliver Chang cfba9598d7 [helper] Add a prompt to build_image command for pulling base images. (#595) 2017-05-10 13:49:09 -07:00
Oliver Chang 75b9282e83 Add --pull argument to build_image. 2017-05-09 12:34:59 -07:00
Alex Gaynor 9db317d3b5 Added environment and sanitizer flag support to shell command (#519) 2017-04-05 18:13:20 -07:00
David Tardon 0f66138ef4 fix param name (#516) 2017-04-05 08:56:39 -07:00
Oliver Chang 649ab84a2f [infra] Remove --no-pull-base-images.
This is redundant. We can just call `build_image` directly to bypass
cache and not pull.
2017-03-30 14:00:22 -07:00
Oliver Chang f4716b0c1e [infra] helper.py: Bypass docker cache if build_image is called explicitly.
Fixes #479 and #487.
2017-03-30 13:53:19 -07:00
Oliver Chang 5a0b81b644 [infra] Clean up helper.py and don't pull project images (#487)
We still pull base-images by default, but this can be overriden by
passing `--no-pull-base-images`. e.g.

`python helper.py --no-pull-base-images build_image project`.
2017-03-30 13:32:56 -07:00
Oliver Chang 435e03555d [infra] helper: Actually fix base image name 2017-03-28 14:14:10 -07:00
Oliver Chang 1cf792d9b1 [infra] Fix helper base image project. 2017-03-28 14:04:34 -07:00
Oliver Chang 60835ac420 oss-fuzz/BASE_IMAGE -> oss-fuzz-base/BASE_IMAGE 2017-03-22 12:12:51 -07:00
Oliver Chang c2feab5746 More ossfuzz/IMAGE -> gcr.io/oss-fuzz/IMAGE. 2017-03-15 19:11:01 -07:00
Oliver Chang 2e00fe90d1 [infra] (experimental) Support building with AFL (#396) 2017-02-16 15:09:37 -08:00
Abhishek Arya 3c77078af2 Update helper.py 2017-02-02 19:55:39 -08:00
Abhishek Arya 5c344e9872 Fixes #225
trace-pc-guard is enabled everywhere, so this is unneeded.
2017-02-02 09:26:23 -08:00
Abhishek Arya 8699847a42 Fix breakage due to absolute paths in DockerFile 2017-01-26 18:27:42 -08:00
Alex Gaynor f858d8c7db Allow run_fuzzer command to run with nonlocal docker. (#306)
By setting the DOCKER_HOST environment variable, all docker invocations will be non-local. This allows run_fuzzer to work in such an environment (as will be the case for many OS X and Windows users).
2017-01-21 14:53:09 -08:00
Abhishek Arya 5faaddd044 Update helper.py 2017-01-03 13:28:28 -08:00
Abhishek Arya 66b19116bd Update helper.py 2017-01-03 11:07:58 -08:00
Abhishek Arya 6c4110d4a4 Fixes (#236)
* Add reproduce command.
* Remove unneeded run and just_run command with duplicate code as run_fuzzer.
* Fix docs for reproduction.
2017-01-03 10:47:05 -08:00
Mike Aizatsky f62a882408 [infra] -e build_fuzzers flag to set environment variable (#229)
* [infra] -e helper flag to set environment variable

Can be used to switch sanitizer or fuzzing engine.

* removed unneeded class

* nit
2016-12-29 13:08:47 -08:00
Mike Aizatsky 0bbedbda65 [infra] --nopull option for helper.py (#219)
The options is useful when changing base-images.
2016-12-27 17:14:33 -08:00
Mike Aizatsky 5a4daf8980 [infra] use $BUILD_UID if it is defined (fixes #30) (#211)
If $BUILD_UID is defined, then compile script will create a user
with a given UID and switch to it prior to calling project's build.sh.
2016-12-21 15:01:44 -08:00
Caolán McNamara b57371a098 add SYS_PTRACE capability (#9 #212)
I'm finding that with e.g.

python infra/helper.py build_fuzzers libpng

all builds fail for me with...

configure:3443: checking whether we are cross compiling
configure:3451: clang -o conftest -g -fsanitize=address -fsanitize-coverage=edge,indirect-calls,8bit-counters   conftest.c  >&5
configure:3455: $? = 0
configure:3462: ./conftest
==1014==LeakSanitizer has encountered a fatal error.
==1014==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1
==1014==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)
configure:3466: $? = 1
configure:3473: error: in `/src/libpng':
configure:3475: error: cannot run C compiled programs.

with the defaults of...
CC=clang
CXX=clang++
CFLAGS=-g -fsanitize=address -fsanitize-coverage=edge,indirect-calls,8bit-counters
CXXFLAGS=-g -fsanitize=address -fsanitize-coverage=edge,indirect-calls,8bit-counters -stdlib=libc++

but adding --cap-add SYS_PTRACE makes it work
2016-12-21 12:58:01 -08:00
inferno-chromium f9b3680dee Fix run_fuzzer to use base-runner image for building. (#178) 2016-12-13 11:59:53 -08:00
Mike Aizatsky 7747c34d2d [infra] using base-runner for running 2016-12-13 11:27:45 -08:00
Caolán McNamara 07ac1eab14 bind mount work dir (#176)
with python infra/helper.py build_fuzzers <PROJECT>

out of the box I get /work as a dir in the docker image root with approx 6 gigs
free after dependencies are installed, i.e.

Filesystem             Size  Used Avail Use% Mounted on
/dev/mapper/docker-..   10G  3.9G  6.2G  39% /

which is limiting for a very large project, how about binding /work to the host
like /out already is, eg. for me afterwards, plenty of work space

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       440G  291G  128G  70% /work

(cherry picked from commit fffffb107dc7421b91b884c0019c62e43779c4b1)
2016-12-13 10:27:23 -08:00
Alex Gaynor cedcb65d4a Fixes #148 -- use --rm when running docker locally (#149) 2016-12-07 11:43:37 -08:00
Oliver Chang 9761e79223 helper coverage: add message about the command taking a long time.
Also suppresses output from the fuzzer itself.
2016-11-29 15:10:58 -08:00
Mike Aizatsky a182b62f5e [infra] generate project.yaml instead of Jenkinsfile 2016-11-29 11:25:33 -08:00
Mike Aizatsky e16ee1785b [infra] using project instead of target 2016-11-29 11:23:30 -08:00
Mike Aizatsky 5dfb810427 [infra] setting current directory to src checkout (#87) 2016-11-17 09:49:34 -08:00