Commit Graph

368 Commits

Author SHA1 Message Date
Oliver Chang 7b87fafb5a [infra] Install deps in base-image, and separate out base-msan-builder. 2018-02-20 15:22:13 +11:00
Oliver Chang 9e5bbefc9b msan-builder: Set MSAN_NO_TRACK_ORIGINS in child environment too. 2018-02-12 16:43:30 +11:00
Oliver Chang d222c486db fix typo 2018-02-12 15:14:40 +11:00
Oliver Chang e9646525f5 msan-builder: support building without origin tracking. 2018-02-12 15:04:55 +11:00
Oliver Chang 8db9a9081b Blacklist __gxx_personality_* libcxxabi functions (#1099). 2018-02-07 10:51:47 +11:00
Oliver Chang 2809452c40 Revert unwinder changes (#1099).
Actually breaks msan.
2018-02-05 16:31:18 +11:00
Oliver Chang 99bd56b54c fix typo 2018-02-05 15:41:32 +11:00
Oliver Chang 7ff3be27fb Use llvm unwinder (#1099). 2018-02-05 11:36:16 +11:00
Oliver Chang 22b932b620 msan_builder: one more way to disable FORTIFY_SOURCE. 2018-01-25 10:36:49 +11:00
Oliver Chang e078aa41ae msan-builder: add ugly hack to prevent sqlite3 from failing tcl bindings build. 2018-01-24 16:09:59 +11:00
Oliver Chang f1fb0b4a6a msan-builder: properly disable asm for gnutls and libgcrypt 2018-01-24 10:40:20 +11:00
Oliver Chang 7152179c4a msan-builder: add zip 2018-01-22 10:36:15 +11:00
Oliver Chang cf76f81582 msan-builder: disable libcapnp-0.5.3
multiple compile failures with clang.
2018-01-19 13:37:02 +11:00
Oliver Chang 442891c4ef msan-builder: fix boost build. 2018-01-18 14:35:28 +11:00
Oliver Chang ce2ef93a4c msan-builder: Add hack to disable more tests during build. 2018-01-17 15:34:03 +11:00
Oliver Chang c701fb07cc msan-builder: Disable asm for libgcrypt20 build. 2018-01-17 14:35:37 +11:00
Oliver Chang 8dd186eb36 msan-builder: Fix pixman build. 2018-01-17 11:54:14 +11:00
Oliver Chang 5ed681d285
Fix bug in -Wl,--no-undefined removal 2018-01-17 00:26:18 +11:00
Oliver Chang 8dce262d2b
Update patch_build.py 2018-01-11 15:13:58 +11:00
Oliver Chang 5b3485b2d5 msan_builder: fix permission of patch_build.py 2018-01-11 13:28:19 +11:00
Oliver Chang 3d0c96c087
Make MSan builds with instrumented libraries (#608) (#1064) 2018-01-11 12:56:33 +11:00
Oliver Chang be4e8181b6
Update msan_build.py 2018-01-10 21:04:15 +11:00
Oliver Chang 55092e95a6
Remove unwanted change from last commit 2018-01-10 17:27:32 +11:00
Oliver Chang 127d0ac82f
msan_builder: overwrite existing files on extraction 2018-01-10 17:26:31 +11:00
Oliver Chang 40872f3217
msan_builder: don't create subdirs 2018-01-10 11:55:13 +11: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
Max Moroz 5c5d71f4b3 [infra] Fix broken markup in documentation files. 2017-12-22 09:09:40 -08:00
Oliver Chang f259fa92a9 msan_builder: include libraries under universe section. 2017-12-18 14:15:28 -08:00
Oliver Chang c9309a4983 msan_builder: nettle: disable assembler. 2017-12-18 14:07:06 -08:00
Oliver Chang a306a95093 msan_builder: use -fno-integrated-as to fix libffi build. 2017-12-18 11:14:20 -08:00
Oliver Chang a92e2358e2 msan_builder: enable more libraries 2017-12-18 09:22:37 -08:00
Oliver Chang 7c3acdbd45 msan_builder: automatically include corresponding -dev packages.
Rather than having to specify them manually.
2017-12-15 16:00:27 -08:00
Oliver Chang c2388b53fc msan_builder: Build -dev packages, and include .a libraries in output. 2017-12-15 12:57:55 -08:00
Oliver Chang 9bbde90864 msan_builder: build pcre and pcre2 2017-12-15 11:13:56 -08:00
Oliver Chang d0006f3728 msan_builder: Add initial build patching script. 2017-12-15 11:06:20 -08:00
Oliver Chang 787214e640
Update msan_build.py 2017-12-11 12:40:02 -08:00
robertswiecki 6f2b0b598a Use standard clang/clang++ to build binaries to-be-fuzzed (#1031) 2017-12-09 15:08:04 -08:00
Oliver Chang 8152732d30
Roll llvm (for #1030) 2017-12-09 15:05:37 -08:00
Oliver Chang 64e1595666 msan_builder: fix typo 2017-12-07 15:12:49 -08:00
Oliver Chang ebf50793af msan_builder: build openssl without asm, add tar override. 2017-12-07 13:49:21 -08:00
Oliver Chang 8ac62a9c5d msan_builder: improve dependency detection. 2017-12-06 23:40:01 -08:00
Oliver Chang 01b8929e3b msan_builder: fix more issues. 2017-12-06 22:33:03 -08:00
Oliver Chang 4305d7a1ef Build msan libs on our builders. 2017-12-06 18:58:36 -08:00
Oliver Chang 58d8b58cfb msan_builder: Make --build-deps the default, add option for creating subdirs in output. 2017-12-06 17:45:51 -08:00
Oliver Chang 12f1d9dc73 msan_builder: Add some helpers for creating wrappers, and fix systemd build. 2017-12-06 15:52:36 -08:00
Oliver Chang 7c7b54edda msan_builder: Improve -Wl,defs detection and removal.
Also write tests.
2017-12-05 14:06:57 -08:00
Oliver Chang 4ff18cdd15 msan_builder: various fixes.
- Do parallel build.
- Fix apt dependencies.
- Make msan report suppression better:
    - Use report_umrs option instead to suppress reports.
    - Use log_path to suppress the remainder of output (i.e. MSan report
      summaries).
- Increase stack size limit to avoid test failures during builds.
- Don't set nostrip in DEB_BUILD_OPTIONS. libpcre3 doesn't build
  properly with it because its build rules are wrong.
2017-12-05 13:03:14 -08:00
Oliver Chang 6a4d0f864c msan_builder: Inject MSan flags in wrapper if they don't exist.
Some packages build test binaries that don't use DEB_C(XX)FLAGS and fail
during linking.
2017-12-04 14:51:21 -08:00
Oliver Chang f402826092 msan_builder: remove unused import. 2017-12-04 14:32:11 -08:00
Oliver Chang ad476b52db msan_builder: collect and build dependencies.
Use python-apt to get dependencies. Also change source downloading to
use this module.
2017-12-04 14:30:51 -08:00
Oliver Chang 4af6f53266 msan_builder: support installing multiple packages at once.
Also, only install the built .deb packages that match the requested
package names.
2017-12-04 12:35:43 -08:00
Oliver Chang b5b5a2fb18 [infra] msan_builder: Preserve directory structure of libraries and patch rpaths. 2017-11-27 21:45:34 -08:00
Oliver Chang e3e7c02725 [infra] msan_builder: Add custom build hooks.
Add one for pulseaudio on xenial. ubuntu patches causes build failures
with recent clang.
2017-11-27 14:52:20 -08:00
Oliver Chang 838e4c4d0d [infra] msan builder: one more variation of -Wl,-z,defs 2017-11-22 16:22:36 -08:00
Oliver Chang d55fcf47e7 [infra] msan builder: don't strip. 2017-11-22 14:26:44 -08:00
Oliver Chang a023ed88c7 [infra] msan builder: wrap dpkg-gensymbols. 2017-11-22 14:01:06 -08:00
Oliver Chang 0b44a69baf [infra] msan builder: disable all warnings. 2017-11-22 13:37:02 -08:00
Oliver Chang 5ccbcb82b4 [infra] More msan builder fixes.
- Removing -Wl,-z,defs doesn't always work, since they can be passed as
  -Wl,-z -Wl,defs instead.
- Add more debugging functionality.
2017-11-22 13:13:30 -08:00
Oliver Chang 308be48767 [infra] msan builder: don't print anything extra at all in compiler wrapper.
configure scripts can test for output to stderr as an indication of
error.
2017-11-22 10:14:47 -08:00
Oliver Chang 7653ee8b69 [infra] msan builder fixes.
- wrapper: print actual clang invocation to stderr instead.
- add -fPIC -fno-omit-frame-pointer to c/cxxflags
- replace -g with -gline-tables-only
2017-11-22 09:34:58 -08:00
Oliver Chang b03a098eeb
Initial MSan library builder script. (#1004) 2017-11-21 09:47:51 -08:00
Robin Alexander Richtsfeld 2dfd739d38 Clean Shell Scripts (#999)
* Clean all.sh

Double quote array expansions, otherwise they're like $* and break on spaces.

* Clean dropbear/build.sh

In POSIX sh, 'pushd' is not supported.
In POSIX sh, 'popd' is not supported.

* Clean woff2/build.sh

Iterating over ls output is fragile. Use globs.

* Clean tinyxml2/build.sh

Add shebang
2017-11-20 12:22:57 -08:00
Max Moroz 6204899516
[infra] Use "-fsanitize=fuzzer-no-link" instead of coverage flags. (#975) 2017-11-14 07:32:06 -08:00
Oliver Chang ccfb26c04c
Add Chakra. (#937) 2017-11-01 10:11:00 +11:00
Oliver Chang 312cd47208 Add priliminary support for "engine-less" builds.
Needed for #925.
2017-10-31 15:22:58 +11:00
Max Moroz 5e8a407923 [infra] Remove UIO from UBSan flags as it may create a lot of noise in the logs (#910). 2017-10-28 22:34:41 -07:00
Max Moroz 2c23c20d8c
[infra] enable -fsanitize=unsigned-integer-overflow in non-faulting mode (#910). (#927) 2017-10-27 14:13:11 -07:00
Max Moroz 63a6cb31b4 [infra] Fix the check for COVERAGE_FLAGS overrides in "compile" script. (#907)
* [infra] Fix the check for COVERAGE_FLAGS overrides in "compile" script.

* Add -pthread to coverage flags ("profile" sanitizer).
2017-10-20 17:15:02 -07:00
Oliver Chang aea675714e Improve minijail script. 2017-10-17 08:55:54 -07:00
Oliver Chang fa41e6a949 Add script for testing sandbox. 2017-10-16 15:54:58 -07:00
Oliver Chang b598181e29 Don't set sanitizer coverage flags for profile builds (#891). 2017-10-13 15:23:44 -07:00
Oliver Chang 4862fdf384 Manually bump llvm revision to 315377 (#857).
Once chromium rolls past this, we will still update automatically.
2017-10-11 08:19:21 -07:00
Max Moroz 7c917865b1 [infra] Disable instrumentation checks for fuzzers built with honggfuzz.
Should fix the following issues:
- https://github.com/google/oss-fuzz/issues/825
- https://github.com/google/oss-fuzz/issues/828
- https://github.com/google/oss-fuzz/issues/829
- https://github.com/google/oss-fuzz/issues/830
2017-09-08 15:03:07 -07:00
Max Moroz 942b5fbbe1 [infra] Enable bad_build_checks without test_all step that runs all the fuzzers. (#814)
* [infra] Enable bad_build_checks without test_all step that runs all the fuzzers.

* [infra] Add COPY step for test_all_for_bad_build script.

* [infra] Use SKIP_TEST_TARGET_RUN=1 to avoid running all fuzz targets during test_all.

* [infra] Invern the condition in test_all script.

* [infra] Finally fix the condition in test_all.
2017-09-06 11:55:07 -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 78efe3f702 Use https for checking out llvm 2017-08-29 16:17:44 -07:00
Oliver Chang e1e4c337e4 Use new libFuzzer location.
Fixes #785
2017-08-21 18:10:12 -07:00
Max Moroz 4b73c4b308 [infra] Update bad_build_check to work with some edge cases. 2017-08-09 08:49:41 -07:00
Max Moroz 4e23946573 [infra] Pass FUZZER_BINARY to bad_build_check instead of FUZZER. 2017-08-08 15:07:45 -07:00
Max Moroz f6a3b09305 [infra] Make bad_build_check more verbose. 2017-08-08 13:03:41 -07:00
Max Moroz b1ea461e17 [infra] Add sancov binary to base-runner image in order to perform bad build checks. 2017-08-08 11:40:30 -07:00
Max Moroz f81476ca75 [infra] Add post build checks for catching and reporting bad builds + add test projects. (#754)
* [WIP] Add post build checks for catching and reporting bad builds + test projects.

* Move all type of issues into a single project. Tested all sanitizers.

* First version of the script for performing bad build checks. Still not ready to commit.\

* Added a valid example that should pass all the checks + fixed instrumentation check.

* Use SIGTERM and the handler calling _exit(0) for the startup crash case.

* Small fixes.

* Ignore startup_crash check_for fuzzing engines other than libFuzzer.

* Use "local" for local variables in the script, fix container name.

* Add COPY step for bad_build_check into base-runner Dockerfile.

* Make bad_build_check temporary noop unless EXPERIMENTAL_BAD_BUILD_CHECK is set to 1.

* Temporary remove test binaries step.

* Remove empty line.

* Remove unnecessary env variable.
2017-08-08 10:54:53 -07:00
Oliver Chang 621b2d4153 Update Dockerfile 2017-07-24 17:56:52 -07:00
Oliver Chang 75c9649979 base-runner run_fuzzer: pipe /dev/null to stdin
Targets could be incorrectly reading from stdin (e.g. #681).
2017-06-23 10:26:40 -07:00
Max Moroz 3cee68fa11 [infra] Remove "null" check from UBSan options. (#674)
There is not much value for us from this particular check:
- UBSan's "null" reports leading to real crashes are reported with ASan as well.
- Potential null references are not real crashes and might be considered
  as false positives, though it seems to be UB as per the standard.
2017-06-12 10:46:53 -07:00
robertswiecki fc451ca8af Practically revert 182f607f9b as it will force CC compiler for CXX in honggfuzz (#658) 2017-06-07 12:52:46 -07:00
robertswiecki 182f607f9b Use standard $CC as $HFUZZ_CC_ASAN to avoid expensive compiler search (#656) 2017-06-07 12:03:46 -07:00
Abhishek Arya e999b2cbab Enable 'return' feature for UBsan (#232) 2017-06-02 17:01:55 -07:00
robertswiecki 268d8052a2 Support honggfuzz as a FUZZING_ENGINE (#636) 2017-06-01 17:55:01 -07:00
Oliver Chang af86b0cbdb Use chromium clang revision for base-clang image. (#640)
We still use trunk libFuzzer (from chromium mirror).
2017-05-31 12:30:29 -07:00
Oliver Chang 6ee983a6a0 base-runner: use %fuzz_target%.dict if it exists.
For #619
2017-05-24 14:18:33 -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
Max Moroz 04e42ac17a [infra] Use only 'array-bounds' check of UBSan's 'bounds' check (#573).
For more info: https://github.com/google/oss-fuzz/pull/573#issuecomment-300494440
2017-05-10 16:13:28 +02:00
Max Moroz 19e73d89e9 [infra] Extend set of UBSan checks enabled. (#573) 2017-05-09 14:16:58 +02:00
Oliver Chang 4896be51cd Create a separate coverage build.
First part of #191.
2017-05-08 11:17:27 -07:00
Oliver Chang 38286301e3 [infra] Delete old infra code. 2017-03-30 12:22:22 -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 7df64d4ac4 [infra] ossfuzz/IMAGE -> gcr.io/oss-fuzz/IMAGE 2017-03-15 18:46:31 -07:00