When adding -fsanitize=undefined to a bazel target's copt, it invokes clang with a series of options instead of -fsanitize=undefined:
/home/ubuntu/mongo/build/bazelisk build --//bazel/config:compiler_type=clang --//bazel/config:build_mode=opt_debug --//bazel/config:separate_debug=False --//bazel/config:libunwind=auto --//bazel/config:use_gdbserver=False --//bazel/config:spider_monkey_dbg=False --//bazel/config:allocator=system --//bazel/config:use_lldbserver=False --//bazel/config:use_wait_for_debugger=False --//bazel/config:use_ocsp_stapling=True --//bazel/config:use_disable_ref_track=False --//bazel/config:use_wiredtiger=True --//bazel/config:use_glibcxx_debug=False --//bazel/config:build_grpc=False --//bazel/config:use_libcxx=False --//bazel/config:detect_odr_violations=False --//bazel/config:linkstatic=True --//bazel/config:use_diagnostic_latches=False --//bazel/config:shared_archive=False --//bazel/config:linker=lld --//bazel/config:streams_release_build=True --//bazel/config:build_enterprise=False --//bazel/config:visibility_support=auto --platforms=//bazel/platforms:linux_arm64_clang --host_platform=//bazel/platforms:linux_arm64_clang --compilation_mode=dbg --//bazel/config:http_client=True --//bazel/config:ubsan=True --//bazel/config:asan=False //src/mongo/platform:visibility_test1 --config=local -fsanitize=alignment,array-bounds,bool,builtin,enum,float-cast-overflow,integer-divide-by-zero,nonnull-attribute,null,pointer-overflow,return,returns-nonnull-attribute,shift-base,shift-exponent,signed-integer-overflow,unreachable,vla-bound,vptr
It's possible there's logic in bazel's internals to perform this switch, but it's unclear why it's doing it and if it is actually equivalent to -fsanitize=undefined.
- is depended on by
-
SERVER-89697 remove function sanitizer coverage from wt bin
- Closed
-
SERVER-86610 Add tcmalloc back under UBSAN
- Closed