ci: add sanitizer runs
This looks strange...
2025-08-07T07:34:25.0960973Z [ RUN ] BadBufferTest.test_truncated_shm_file
2025-08-07T07:34:25.0961120Z unknown file: Failure
2025-08-07T07:34:25.0961462Z C++ exception with description "Timeout waiting for condition" thrown in the test body.
2025-08-07T07:34:25.0961486Z
That's a timeout of std::chrono::seconds{10 * TEST_TIMEOUT_MULTIPLIER} - and happens less than a microsecond after the test starts. Is TEST_TIMEOUT_MULTIPLIER something stupid?
Seems not. Just that the timestamp prefixes are skewed by buffering the console output
@Saviq Is this still equivalent to the old PR? No need to explicitly specify -DWLCS_BUILD_* since they're already specified in CMakeLists.txt
@Saviq Is this still equivalent to the old PR?
"The old PR"?
This actually runs the sanitizer versions in CI. But it didn't work out well when I filed this.
This actually runs the sanitizer versions in CI. But it didn't work out well when I filed this.
I just rebased it and noticed that a bunch of stuff isn't needed anymore. Hence, double-checking with you.
noticed that a bunch of stuff isn't needed anymore
Looks sane, yeah. Don't see the previous diff to confirm beyond doubt, though :shrug:
EDIT:
Looked through the old commits, seems fine.
So we fail some tests on asan, some on ubsan, and tsan straight up crashes. Will look into this again tomorrow.
Didn't take a look at this. But I just noticed that it's just clang builds that are failing. @Saviq Did something similar happen before?
Did something similar happen before?
Some history available in:
https://github.com/canonical/wlcs/actions/workflows/spread.yml?query=branch%3Aadd-sanitizer-builds
I can reproduce this locally. WLCS with clang refuses to run on ASan even with both Mir and WLCS built with ASan, and TSan straight up crashes immediately with 100k stack frames of __interceptor__cxa_atexit() (yes, one hundred thousand frames) right as TSan initializes. The failures with NoSan and UBSan in CI match with the expected failures list.
@Saviq Any clues what might be happening with ASan and TSan?
TICS Quality Gate
:heavy_check_mark: Passed
wlcs
Coding Standards: :heavy_check_mark: Passed
:heavy_check_mark: Condition “No new Coding Standard Violations for level 1, 2, 3 with respect to Previous analysis” passed.
See the results in the TICS Viewer
The following files have been checked for this project
- src/helpers.cpp
@Saviq I'll leave it to you to review and merge.
I'll leave it to you to review and merge.
Can't review my own PR, here's my ACK: :+1:, but you have to Approve :)