Add ASan/TSan sanitizer support and CI jobs#98
Open
siddimore wants to merge 2 commits intolivekit:mainfrom
Open
Add ASan/TSan sanitizer support and CI jobs#98siddimore wants to merge 2 commits intolivekit:mainfrom
siddimore wants to merge 2 commits intolivekit:mainfrom
Conversation
siddimore
commented
Apr 15, 2026
- Add LIVEKIT_SANITIZER CMake option (address, thread, undefined)
- 'address' enables ASan + UBSan with -fno-omit-frame-pointer
- 'thread' enables TSan
- 'undefined' enables UBSan standalone
- Blocked on Windows (MSVC lacks TSan/UBSan); works on Linux and macOS
- Add linux-debug-asan and linux-debug-tsan CMake presets with corresponding build and test presets
- Add 'sanitizers' CI job in builds.yml with ASan and TSan matrix
- Fix reversed markdown link syntax in README.md
- Add LIVEKIT_SANITIZER CMake option (address, thread, undefined) - 'address' enables ASan + UBSan with -fno-omit-frame-pointer - 'thread' enables TSan - 'undefined' enables UBSan standalone - Blocked on Windows (MSVC lacks TSan/UBSan); works on Linux and macOS - Add linux-debug-asan and linux-debug-tsan CMake presets with corresponding build and test presets - Add 'sanitizers' CI job in builds.yml with ASan and TSan matrix - Fix reversed markdown link syntax in README.md
The TSan CI job referenced tsan_suppressions.txt with a relative path, which resolved against the test binary directory instead of the repo root. - Create tsan_suppressions.txt with Rust FFI suppressions - Use $GITHUB_WORKSPACE absolute path in TSAN_OPTIONS
| - name: Build | ||
| run: cmake --build --preset ${{ matrix.preset }} | ||
|
|
||
| - name: Run unit tests |
Contributor
There was a problem hiding this comment.
Hi there @siddimore: can you explain the decision to make this a separate stage (Sanitizer - <arch>) vs. incorporating the sanitizer steps into the existing build steps?
There's a lot of duplication in setup here, and definitely a tradeoff between parallelizing the workflow vs. too much duplication.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.