Repository navigation
Open
Labels
infraShared CMake, github, etc infrastructure
Description
Is this a duplicate?
- I confirmed there appear to be no duplicate issues for this request and that I agree to the Code of Conduct
Area
Infrastructure
Is your feature request related to a problem? Please describe.
Sanitizers are extremely useful for detecting hard-to-find and subtle bugs. They include UB sanitizer, address sanitizer, memory sanitizer, and thread sanitizer. They can work in conjunction with CUDA code with a few workarounds. They are complementary to CUDA compute-sanitizer. Compiler-provided sanitizers are also lightweight and much more efficient than external tools such as valgrind.
I don't see such support for the current build configurations. It would be great to add them to make the CCCL libraries even more robust.
Other optional tools are the static analyzers provided by the main compilers
- GCC
-fanalyzerhttps://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html - Clang
scan-buildhttps://clang.llvm.org/docs/analyzer/user-docs/CommandLineUsage.html#scan-build - MSVC
/analyzehttps://learn.microsoft.com/en-us/cpp/build/reference/analyze-code-analysis?view=msvc-170
Risks: very low detection rate and false positives
Describe the solution you'd like
Add common compiler flags for GCC/Clang:
- https://clang.llvm.org/docs/AddressSanitizer.html
- https://clang.llvm.org/docs/ThreadSanitizer.html
- https://clang.llvm.org/docs/MemorySanitizer.html
- https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
- https://clang.llvm.org/docs/LeakSanitizer.html
- https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fsanitize_003daddress
- https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fsanitize_003dundefined
Describe alternatives you've considered
No response
Additional context
No response
Reacted by Bernhard Manfred Gruber and alliepiper
Metadata
Metadata
Assignees
Labels
infraShared CMake, github, etc infrastructure
Type
Projects
- StatusShow more project fieldsTodo
Activity
Artem-B commentedon Nov 13, 2024
#2789 is a related tactical issue.