Commit Graph

24 Commits

Author SHA1 Message Date
Catena cyber a35e3e96de
Fix tensorflow build (#6860)
* Fix tensorflow build

* Remove MSAN from tensorflow

as when building, Protobuf trips on it

* Restrict tensorflow to libfuzzer

due to ugly hack
2021-11-19 14:25:40 +00:00
Mihai Maruseac 6c2bed9d03
Only remove `external/org_tensorflow` if it exists (#5494)
This should fix coverage build broken again today. It seems that a
recent change in TF toolchains removed the creation of `org_tensorflow`
but it is likely that this change will be rolled back in the future.
Hence, to keep OSSFuzz working, we conditionally remove this symlink.
2021-03-24 21:23:42 +00:00
Mihai Maruseac 8b205da3bc
Fix TensorFlow coverage build. (#5309)
It seems that due to some recent change in `BUILD` rules, `bazel`
creates a copy of the code tree under
`bazel-tensorflow/external/org_tensorflow` symlink. However, the tree
contains a `bazel-tensorflow` symlink so we get to an infinite symlink
expansion issue. This breaks coverage build.

The fix is simple: before copying `bazel-tensorflow/external` to
`${OUT}` in coverage builds, remove `org_tensorflow` symlink. This is
not an issue for the coverage build since we copy the entire source tree
to the coverage directory in a previous step.
2021-03-05 21:13:14 -08:00
Amit Patankar 4f3158373d
Remove manual denylisting in tensorflow (#5210)
* Remove manual denylisting in tensorflow

Remove manual denylisting of fuzzing targets using bazel query via tags.

* Add a space in the bazel query.

* Update the tag we should denylist.

* Update the comment.
2021-02-17 18:30:47 -08:00
Amit Patankar ca22eb6f12
Select only C++ fuzzers (#5021)
Specify only C++ fuzzers using [bazel query filters for C++](https://docs.bazel.build/versions/master/query-how-to.html#Which_of_those_are_C_tests_).
2021-01-20 13:38:19 -08:00
Amit Patankar 5321d64ee7
Remove the constant fuzzer from oss-fuzz. (#4952)
We are adding a `tf.constant` fuzzer for Python in oss-fuzz. We do not want it to run on oss-fuzz yet until we are confident it works. Sorry for the repeated PRs into the oss-fuzz directory. Working to alleviate this.
2021-01-11 14:42:43 -08:00
Amit Patankar 5ebefe4cff
Remove bfloat fuzzer from tensorflow (#4927)
Remove the bfloat fuzzer from open source fuzzing due to linking issues.
2021-01-06 17:04:53 -08:00
Amit Patankar 825bbd8e1b
Ignore the AttrValues fuzzer for tensorflow (#4852)
Fix the build breakage caused by the AttrValues fuzzer in OSS. The target requires large artifacts to link against which are not optimal for OSS fuzzing.
2020-12-15 15:23:07 -08:00
Gabriel Rasskin 7b9a3a895c
[tensorflow] Add assert compilation flag (#4119) 2020-07-13 13:41:19 -07:00
Mihai Maruseac 8603f6a6cd
Enable more fuzzing for TensorFlow (#4004)
* Link against `libc++` with proper config in `.bazelrc`

* Add support for `undefined` build, link against proper `clang_rt` library

* Don't rsync in verbose mode.

* Support `undefined` and `memory` sanitizers

* Support more fuzzers than just `libfuzzer`.
2020-06-17 10:10:29 -07:00
Mihai Maruseac 7a059f4355
Cleanup build script, fix tensorflow build (#3952)
* Need to manually install numpy now as it is used in the toolchain

* Handle review

* Remove bazel install since we install bazelisk

* Force symlink python3 -> python

* Refactor build script

* Remove `-stdlib=libc++` as that causes link errors

* Remove `identity_fuzz` as it results in a huge fuzzer. Will work on reducing size and then enable back

* Copy fuzzer to `$OUT`, not move

* Handle coverage support
2020-06-15 09:38:48 -07:00
Mihai Maruseac b918240b08
Fix TensorFlow build (#3930)
* Remove dga@google.com as he left Google

* Use python3 as python2 is deprecated

* Need to manually install numpy now as it is used in the toolchain

* Use bazelisk instead of the grep configure -> get Bazel version -> curl hack

* Remove C++11 constraint as TF now builds and uses C++14

* Handle review

* Remove source sed/replace as it is no longer needed
2020-06-03 15:42:49 -07:00
Mihai Maruseac f16a6781fa Fix tensorflow/build.sh after TF commit 44000ad64a (#2528)
We are changing the location of the maximum/minimum bazel version in the
configure.py script so we need to update the way we're looking for the
version to install.

Breaking commit: 44000ad64a
2019-06-18 09:51:05 -07:00
jonathanmetzman 3049c50d48
Migrate projects using -lFuzzingEngine to $LIB_FUZZING_ENGINE (#2325)
Migrate from -lFuzzingEngine to $LIB_FUZZING_ENGINE where possible and not causing breakage
2019-05-01 11:09:55 -04:00
Mihai Maruseac 922ea7c8fe [TensorFlow] Ensure we're always using a valid Bazel (#2293)
* Determine Bazel version from configure.py script

* Install Bazel at the version from configure.py

* Don't downgrade Bazel on Dockerfile

* Make sure we were able to install proper Bazel

* Comment update
2019-04-04 23:35:11 -07:00
Mihai Maruseac 2fa5eca226 [tensorflow] Update Bazel version and check that it is compatible (#2288)
* Update Bazel to 0.24.0

* Always run ./configure
2019-04-03 09:57:58 -07:00
Mihai Maruseac 4bc64932b5 Copy more files on coverage runs (#2092) 2019-01-17 21:58:13 -08:00
Mihai Maruseac 9d22200634 [tensorflow] Add missing directory to the rsync path (#2086) 2019-01-14 09:32:40 -08:00
Mihai Maruseac 4feaf99b36 [tensorflow] Try to get coverage build to progress (#2068)
* No need for configure hack as it is covered internally.

* Try to get coverage build to progress

* Remove extra mkdir
2019-01-03 12:22:27 -08:00
Mihai Maruseac 4c8a28e400 [tensorflow] Updates to get coverage build pass (#2052)
* Allow bazel to use version 0.21.0.

* Build only 5 fuzzers to get coverage build to also succeed.
2018-12-26 09:46:04 -08:00
Mihai Maruseac ec533162c2 Remove -L flag from rsync to make coverage builds run (#2033) 2018-12-18 10:30:53 -08:00
Mihai Maruseac 0165b7b91c [tensorflow] Limit the amount of parallel bazel jobs to not get into an OOM (#2015) 2018-12-10 08:52:05 -08:00
Max Moroz ef89a87d64 [tensorflow] Fix seed corpus archive names (follow-up for #1937). 2018-12-07 10:35:29 -08:00
Mihai Maruseac f6ca754ed1 [tensorflow] Integrate tensorflow with OSSfuzz (#1937)
* Integrate tensorflow with OSSfuzz

* Don't install already installed dependencies

* Add environment variable to disable logging.

Some fuzzers are outputting too much information due to logging and
that's not ok when fuzzing. Use TF_CPP_MIN_LOG_LEVEL envvar to disable
printing of the log messages.

* Remove the environment variable as it is not used at runtime and we have a workaround in the pipeline

* Workaround bazel bug (bazelbuild/bazel#6697)

* Don't compile with -O2, instead remove line causing bazel bug

* Downgrade Bazel to use the last version that TF supports

* Speed-up building by building fuzzers in parallel

* Add corpora and dictionaries
2018-12-07 10:34:27 -08:00