Add sanitizer support via score_cpp_policies#200
Conversation
License Check Results🚀 The license check job ran with the Bazel command: bazel run --lockfile_mode=error //:license-checkStatus: Click to expand output |
|
The created documentation from the pull request is available at: docu-html |
|
be aware there is also going work in that direction in score_cpp_policies repo |
9d8bad6 to
c564c1f
Compare
Should lifecycle continue with the self-contained sanitizer implementation in this PR as a short-term unblocker, planning a later migration to the shared score_cpp_policies module once its sanitizer structure stabilizes or do we want to pivot now and integrate directly with the centralized sanitizer infrastructure despite the potential dependency and release-readiness risks? |
|
My opinion: I would say we should bring in our thoughts into score_cpp_policies and not create silos. @NicolasFussberger @S-MOHAMD @pawelrutkaq any thoughts on this? |
c564c1f to
337377e
Compare
If we can bring in these changes into score_cpp_policies, I agree that this should be the preferred solution. I cannot judge how realistic this is. |
337377e to
a06a471
Compare
Description
Integrates ASan, UBSan, LSan, and TSan using the centralized score_cpp_policies infrastructure rather than a self-contained implementation, avoiding fragmentation across S-CORE modules.
Changes
MODULE.bazel - adds score_cpp_policies as a dev_dependency via git_override (not yet in the bazel_registry).
.bazelrc - adds sanitizer configs backed by score_cpp_policies' runtime infrastructure (wrapper script, suppression files, env templates):
Note: flags are applied via --copt/--linkopt directly rather than --features=score_asan_ubsan_lsan, because score_bazel_cpp_toolchains does not yet expose the cc_feature targets from score_cpp_policies. The wrapper, suppression files, and flag infrastructure from score_cpp_policies are fully used.
.github/workflows/sanitizers.yml - CI job running both configs against //src/... //tests/... on every PR, merge group, and push to main. The TSan job sets kernel.randomize_va_space=0 to satisfy TSan's shadow memory layout requirements in the GitHub Actions runner.
src/launch_manager_daemon/common/concurrency/BUILD - removes mpmc_concurrent_queue_tsan_test, which had hardcoded -fsanitize=thread copts/linkopts. Those flags would double-instrument the binary when running under --config=tsan. The regular mpmc_concurrent_queue_test now covers TSan via the global config.
Running locally
ASan + UBSan + LSan
ThreadSanitizer
Note: requires ASLR to be in conservative mode.
In a standard Linux environment:
Closes #50