Follow-up B: Add TSan + ASan CI matrix entries for SNMALLOC_PROFILE=ON - #28
Merged
Merged
Conversation
- Adds two ubuntu-24.04 clang Debug matrix legs to the existing
ubuntu job in .github/workflows/main.yml so the heap-profiling
code paths exercised by perf-profile_stress and the func-profile_*
suite are run under ThreadSanitizer and AddressSanitizer.
- Both legs configure -DSNMALLOC_PROFILE=ON and the project's
existing SNMALLOC_SANITIZER cmake option (=thread / =address)
instead of raw CMAKE_CXX_FLAGS=-fsanitize=...; this is the
idiomatic mechanism already used by the existing "TSan + UBSan"
matrix entries (CMakeLists.txt:73-75, 580-606, 668-672) and
correctly wires -fsanitize through to test-target compile and
link lines plus the SNMALLOC_THREAD_SANITIZER_ENABLED define
the codebase guards on.
- The TSan leg installs libc++-dev and uses -stdlib=libc++ to
match the existing TSan + UBSan legs (libstdc++ on Ubuntu is
not TSan-instrumented). The ASan leg uses the default
libstdc++ runtime, which is ASan-compatible.
- Both legs pass `-R profile_` via test-extra-args so ctest runs
only the profile suite (perf-profile_stress-{fast,check} +
func-profile_*). This bounds sanitizer overhead within the
CI time budget while still exercising the new snapshot-under-
churn workload from PR #24.
- Local validation: configured + built + ran perf-profile_stress-fast
on darwin-arm64 with -DSNMALLOC_SANITIZER=address; the fast
variant ran ~5s under ASan with no diagnostics. TSan was not
validated locally because the macOS toolchain available here
does not ship a TSan-instrumented libc++; relying on the
GitHub ubuntu-24.04 runner for that leg as called out in the
ticket.
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.
Summary
Two new matrix entries in
.github/workflows/main.ymlmirroring the existing SNMALLOC_PROFILE=ON legs:SNMALLOC_SANITIZER=thread, libc++ (libstdc++ on Ubuntu isn't TSan-instrumented — mirrors existing TSan+UBSan legs)SNMALLOC_SANITIZER=address, default libstdc++Both run
ctest -R 'profile_'coveringperf-profile_stress-{fast,check}+ allfunc-profile_*tests.Used the existing
SNMALLOC_SANITIZERplumbing (CMakeLists.txt:73-75) — wires-fsanitizeinto BOTH compile and link lines + activates source-level TSan guards. RawCMAKE_CXX_FLAGSwould only flow to compile, silently failing to link the runtime.Closes ClickUp ticket 86aj0h864.
Test plan
perf-profile_stress-fastran 5.38s under ASan, no diagnosticsIf TSan surfaces a race on the runner, fix goes in a separate ticket per scope.