Adopt sanitizers from @score_cpp_policies#182
Adopt sanitizers from @score_cpp_policies#182RSingh1511 wants to merge 5 commits intoeclipse-score:mainfrom
Conversation
89f4eed to
06f8f78
Compare
06f8f78 to
9efe87c
Compare
9efe87c to
0cf7b35
Compare
0cf7b35 to
b1978f6
Compare
b1978f6 to
28ebb8a
Compare
28ebb8a to
e71f80a
Compare
e71f80a to
cbf77bf
Compare
| cc_test( | ||
| name = "tsan_fail_data_race", | ||
| srcs = ["tsan_fail_data_race.cpp"], | ||
| # Re-package suppressions from @score_cpp_policies for integration testing |
There was a problem hiding this comment.
why re-package here?
OK in case the repo has its own suppressions..?
There was a problem hiding this comment.
re-packaging is needed for integration tests running in Docker so the suppression files from @score_cpp_policies are available at /sanitizers/suppressions/
There was a problem hiding this comment.
We should have a way to specify our suppressions in this repository. There might be some that can be centralized (stdlib ones for example) but we will likely have some here that are exlusive to this repository.
There was a problem hiding this comment.
Added repo-specific suppression files that merge with centralized ones from @score_cpp_policies in integration tests
cbf77bf to
de6f1df
Compare
5d9465d to
3f5b905
Compare
quality/sanitizer/sanitizer.bazelrc
Outdated
| test:tsan --linkopt -fsanitize-link-c++-runtime | ||
| test:tsan --platform_suffix=tsan | ||
| test:tsan --cxxopt=-O1 | ||
| test:tsan --test_tag_filters=-no-tsan |
There was a problem hiding this comment.
We should decide on one way:
Either tagging or target_compatible_with.
I prefer the latter since it is more expressive in the targets and is not susceptible to typos.
There was a problem hiding this comment.
Done. replaced all --test_tag_filters in .bazelrc with target_compatible_with
# Conflicts: # .bazelrc
5be026d to
6372e0a
Compare
quality/sanitizer/sanitizer.bazelrc
Outdated
| test:tsan --linkopt -fsanitize=thread | ||
| test:tsan --linkopt -fsanitize-link-c++-runtime | ||
| test:tsan --platform_suffix=tsan | ||
| test:tsan --cxxopt=-O1 |
There was a problem hiding this comment.
This should also go to the central feature. It is a recommended setting of Clang for ThreadSanitizer runs.
See usage section here: https://clang.llvm.org/docs/ThreadSanitizer.html
| # Debug symbols for sanitizer stack traces | ||
| test:with_debug_symbols --cxxopt=-g1 | ||
| test:with_debug_symbols --strip=never |
There was a problem hiding this comment.
This should also go to the central cc_feature.
Without this sanitizer outputs are without symbol resolution. Debugging is then nearly impossible.
cf56b3a to
042d217
Compare
042d217 to
747dd91
Compare
No description provided.