Repository navigation
Add sanitizers job - #57
bratpiorka wants to merge 1 commit into
Conversation
szymon-zadworny
left a comment
There was a problem hiding this comment.
lgtm but I have some concerns regarding OpenCL runtime leak suppression. Also - this job takes the longest to complete. This is probably caused by having to install the nightly toolchain, but it's also worth checking whether all the sanitizer flags (e.g. fast_unwind_on_malloc) are actually necessary.
| ASAN_OPTIONS: fast_unwind_on_malloc=0 | ||
| LSAN_OPTIONS: suppressions=${{ github.workspace }}/.github/lsan-suppressions.txt:fast_unwind_on_malloc=0 | ||
| run: | | ||
| for sanitizer in address leak; do |
There was a problem hiding this comment.
Consider adding a thread sanitizer to the list
https://doc.rust-lang.org/beta/unstable-book/compiler-flags/sanitizer.html#threadsanitizer
| env: | ||
| # Test only CPU to avoid issues with GPU drivers and sanitizers | ||
| ONEAPI_DEVICE_SELECTOR: opencl:cpu | ||
| ASAN_OPTIONS: fast_unwind_on_malloc=0 |
There was a problem hiding this comment.
Do we need to disable fast unwind?
There was a problem hiding this comment.
I might be wrong on this but if the OpenCL runtime manages all allocations then all SYCL-related leaks will happen inside the runtime. If we suppress this then we won't get any leak reports caused by wrong runtime usage by the C++ shims/Rust bindings.
Add a new
sanitizersjob that builds and tests the project using Rust nightly with hardening flags and runs tests with AddressSanitizer and LeakSanitizer enabled. The job is configured to run only on CPU devices to avoid compatibility issues with GPU drivers and sanitizers.