oss-fuzz: Missing asan_blacklist.txt when building via Bazel
We have the following error in the fuzz build: https://oss-fuzz-build-logs.storage.googleapis.com/index.html#oak
Step #4: ERROR: /builder/home/.cache/bazel/_bazel_root/872aac72dffae06b4e2a5b0308508d03/external/com_google_absl/absl/base/BUILD.bazel:171:1: undeclared inclusion(s) in rule '@com_google_absl//absl/base:base':
Step #4: this rule is missing dependency declarations for the following files included by 'external/com_google_absl/absl/base/internal/unscaledcycleclock.cc':
Step #4: '/usr/local/lib/clang/10.0.0/share/asan_blacklist.txt'
And each time we run fuzzing - the library that causes the problem randomly changes.
I have found a flag, that causes this behavior:
$ bazel build --cxxopt=-fsanitize=address //oak/server:wasm_node
INFO: Analyzed target //oak/server:wasm_node (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /root/.cache/bazel/_bazel_root/872aac72dffae06b4e2a5b0308508d03/external/com_google_absl/absl/numeric/BUILD.bazel:27:1: undeclared inclusion(s) in rule '@com_google_absl//absl/numeric:int128':
this rule is missing dependency declarations for the following files included by 'external/com_google_absl/absl/numeric/int128.cc':
'/usr/local/lib/clang/10.0.0/share/asan_blacklist.txt'
Target //oak/server:wasm_node failed to build
I get this error even after bazel clean --expunge
.
It seems that the address sanitizer implicitly adds a dependency on /usr/local/lib/clang/10.0.0/share/asan_blacklist.txt
in every compiled file (even external ones). And Bazel could not compile targets because all dependencies should be explicitly included in BUILD
files.
Another project that has the same issue is gRPC: https://oss-fuzz-build-logs.storage.googleapis.com/index.html#grpc cc @tiziano88 @yang-g @Dor1s
More information on the issue: https://github.com/project-oak/oak/issues/349
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 40 (40 by maintainers)
Commits related to this issue
- [ESPv2] Use latest base-builder image No need for workaround since ESPv2 was updated to Bazel 3.0.0 Ref: #3093 Signed-off-by: Teju Nareddy <nareddyt@google.com> — committed to nareddyt/oss-fuzz by nareddyt 4 years ago
- [ESPv2] Use latest base-builder image (#3635) No need for workaround since ESPv2 was updated to Bazel 3.0.0 Ref: #3093 Signed-off-by: Teju Nareddy <nareddyt@google.com> — committed to google/oss-fuzz by nareddyt 4 years ago
- Add config to build with asan (#2490) Building with RBE will require upgrading to Bazel 3.0+ because of https://github.com/google/oss-fuzz/issues/3093. TF is already on 3.1.0, so we should probably u... — committed to iree-org/iree by GMNGeoffrey 4 years ago
- Add the compiler's resource_dir/share folder to the default inc path. As discussed here (https://github.com/google/oss-fuzz/issues/3093), clang was updated to include the sanitizer ignorelist within ... — committed to google/tsl by BrianWieder 2 years ago
- Add the compiler's resource_dir/share folder to the default inc path. As discussed here (https://github.com/google/oss-fuzz/issues/3093), clang was updated to include the sanitizer ignorelist within ... — committed to openxla/xla by BrianWieder 2 years ago
- Add the compiler's resource_dir/share folder to the default inc path. As discussed here (https://github.com/google/oss-fuzz/issues/3093), clang was updated to include the sanitizer ignorelist within ... — committed to tensorflow/tensorflow by BrianWieder 2 years ago
Cross-FYI bazel 3.0 is released and contains the fix. https://github.com/bazelbuild/bazel/releases/tag/3.0.0 I’m updating upstream project first so I don’t revert the clang version workaround and break our build.