diff options
author | Fabian Meumertzheim <meumertzheim@code-intelligence.com> | 2021-08-10 21:09:43 +0200 |
---|---|---|
committer | Fabian Meumertzheim <fabian@meumertzhe.im> | 2021-08-11 19:10:05 +0200 |
commit | e4f4fc0aef5000a3de19ede676de465976c9548c (patch) | |
tree | 35867ddc600115127a48f127927167f25c4a7b4a | |
parent | 016c0adda7cb1a1ab7850abdd9229037d9097bda (diff) | |
download | jazzer-api-e4f4fc0aef5000a3de19ede676de465976c9548c.tar.gz |
Link the UBSan C++ runtime library
Since Bazel uses clang as its linker instead of clang++, the UBSan
C++ runtime library is not linked automatically. We request it
explicitly.
-rw-r--r-- | driver/BUILD.bazel | 1 | ||||
-rw-r--r-- | examples/src/main/native/BUILD.bazel | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/driver/BUILD.bazel b/driver/BUILD.bazel index 8e095559..656df7cb 100644 --- a/driver/BUILD.bazel +++ b/driver/BUILD.bazel @@ -128,6 +128,7 @@ cc_binary( "-fsanitize=undefined", # Link UBSan statically, even on macOS. "-static-libsan", + "-fsanitize-link-c++-runtime", "-rdynamic", ] + select({ "@platforms//os:linux": ["-fuse-ld=lld"], diff --git a/examples/src/main/native/BUILD.bazel b/examples/src/main/native/BUILD.bazel index 12bbc120..255e3509 100644 --- a/examples/src/main/native/BUILD.bazel +++ b/examples/src/main/native/BUILD.bazel @@ -28,8 +28,6 @@ cc_shared_library( copts = [ "-fsanitize=fuzzer-no-link,undefined", "-fno-sanitize-recover=all", - # Workaround for https://github.com/bazelbuild/bazel/issues/11122. - "-fno-sanitize=vptr,function", ], linkopts = select({ "@platforms//os:linux": ["-fuse-ld=lld"], |