Skip to content

Pin the sanitizer collector's pattern arms, close its trailing-dir hole - #1416

Open
xroche wants to merge 2 commits into
masterfrom
fix-1405-sanitizer-collector
Open

Pin the sanitizer collector's pattern arms, close its trailing-dir hole#1416
xroche wants to merge 2 commits into
masterfrom
fix-1405-sanitizer-collector

Conversation

@xroche

@xroche xroche commented Aug 24, 2026

Copy link
Copy Markdown
Owner

tools/ci-sanitizer-report.sh is the only path from a sanitizer finding to a red build, and its pattern also gates msan (MemorySanitizer, clang), a required check. Before this PR only the runtime error: arm (gcc's UBSan) had a fixture. Mutation testing against tests/349_sanitizer-stderr-capture.test found ten more pattern pieces that could be dropped with the test staying green. That covers every other name in the ERROR-group, the whole WARNING arm, the SUMMARY arm, DEADLYSIGNAL, and the two combinations that fully blind the collector to LeakSanitizer or MemorySanitizer. This predates #1404, so it isn't a regression, just newly load-bearing now that msan is required.

Each gap gets its own fixture, carrying only the marker for the arm it pins so a different arm can't catch it and hide the gap. ASan and LeakSanitizer's own ERROR lines and a SUMMARY-only line cover the ERROR-group and SUMMARY arms. MemorySanitizer and ThreadSanitizer get both their WARNING form (their own findings) and their ERROR form, since compiler-rt's crash-reporting path is shared and a crash makes either one report through the ERROR-group instead. A bare DEADLYSIGNAL marker line comes from a real ASan crash report, where it appears on its own with no ERROR: prefix. Two full multi-line reports pin the LeakSanitizer- and MemorySanitizer-blind combinations. ERROR: UndefinedBehaviorSanitizer and ERROR: libFuzzer stay unpinned on purpose: gcc's UBSan never emits the former, and the fuzz job never calls this script, so the latter can't fire here either.

need_dir already refused a missing -s STDERR_DIR or LOG_PATH_DIR (#1374); a missing trailing TEST_LOG_DIR was silently skipped instead, so a typo'd log path read as clean rather than broken. Closed the same way, with a test row for it.

Closes #1405

xroche and others added 2 commits August 24, 2026 22:35
…r hole

tools/ci-sanitizer-report.sh is the only path from a sanitizer finding to a
red build, and its pattern also gates `msan`, a required check. Only the
UBSan and DEADLYSIGNAL arms had a fixture; mutation testing showed the
Leak alternative, the WARNING:(Memory|Thread)Sanitizer arm, and the
SUMMARY:.*Sanitizer arm could all be dropped -- singly or in the two
combinations that fully blind the collector to LeakSanitizer or
MemorySanitizer -- with tests/349_sanitizer-stderr-capture.test staying
green throughout. This predates #1404 and is not a regression; it was only
newly load-bearing once msan became required.

Add an isolated fixture per runtime (ASan, LeakSanitizer, MemorySanitizer,
ThreadSanitizer, a SUMMARY-only line) plus two full multi-line reports that
pin the LeakSanitizer- and MemorySanitizer-blind combinations. Verified by
mutation: each of the seven pattern deletions now turns the test red.

need_dir already refused a missing -s STDERR_DIR or LOG_PATH_DIR (#1374),
but a missing trailing TEST_LOG_DIR was silently skipped, so a typo'd log
path read as a clean run instead of a broken one. Close that the same way,
with a test row for it.

Closes #1405

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
Review of #1416 found three more pattern pieces the fixtures never
exercised: DEADLYSIGNAL, and MemorySanitizer/ThreadSanitizer's ERROR-group
form. compiler-rt's signal handler is shared, so a crash makes MSan or
TSan report through `ERROR: (Memory|Thread)Sanitizer`, not the WARNING
form the earlier fixtures pinned -- exactly the shape a real `msan` crash
would take. Add isolated fixtures for all three, sourced from real crash
reports (a ThreadSanitizer SEGV, a MemorySanitizer SEGV, and the bare
"AddressSanitizer:DEADLYSIGNAL" marker a sanitizer writes ahead of its
full report). All three now turn the test red when dropped.

Also: drop a stale cross-file comment reference, expand an "e.g.", and
tighten a run-on comment.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
@xroche
xroche enabled auto-merge (squash) August 24, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The sanitizer collector can go blind to LeakSanitizer and MemorySanitizer with nothing to catch it

1 participant