Tests: add disclosed sanitizer diagnostic reruns for CPU-side failures #2563

Open
opened 2026-11-26 05:33:49 +00:00 by github-bot · 0 comments
Owner

@⁠mokkamokacaffe on GitHub · 2026-11-25 23:01 UTC · original

Tests: add disclosed sanitizer diagnostic reruns for CPU-side failures

Summary

Add opt-in and scheduled sanitizer configurations for CPU-side memory corruption, undefined behavior and concurrency failures. Reports should distinguish the ordinary test result from the sanitizer rerun and disclose the added duration and instrumentation overhead.

Motivation

Shader translation, cache workers, command-list interception and asynchronous resource retirement contain unsafe code and shared state. A crash or hang observed during a GPU-oriented test can originate in CPU memory ownership, invalid shifts, stale pointers or a race. A sanitizer rerun can provide a useful second diagnosis, but its timing and memory behavior differ from an ordinary build.

Proposed lanes

  • AddressSanitizer for out-of-bounds access, use-after-free and heap corruption.
  • UndefinedBehaviorSanitizer where supported for invalid shifts, alignment and arithmetic assumptions in native dependencies.
  • ThreadSanitizer on a supported host configuration for worker queues, caches and retirement state.
  • Windows Application Verifier or Page Heap as a documented Windows-specific manual lane.

Execution policy

  • Keep the ordinary build and test result as the primary result.
  • Run focused sanitizer jobs for changes touching unsafe or concurrent code.
  • Run broader sanitizer suites on a schedule or through an explicit workflow dispatch.
  • A failure report may suggest one exact rerun command. The rerun result must name the sanitizer and configuration separately.
  • Do not use sanitized runs for frame-rate, translation-time, PSO-time or memory-budget comparisons.

Required report fields

XCL commit:
OS and toolchain:
sanitizer and version:
optimization level:
ordinary command and result:
sanitized command and result:
ordinary duration:
sanitized duration:
excluded or skipped tests:
diagnostic artifact:

Initial implementation

  1. Document one supported AddressSanitizer command and run it against a focused unit-test group.
  2. Record the baseline failures and unsupported tests on main.
  3. Add a manually dispatched workflow after the command is reproducible.
  4. Evaluate a scheduled broader run before making any sanitizer job required for pull requests.

Success criteria

  • The documented command reproduces locally and in its selected runner environment.
  • Reports make the ordinary and sanitized outcomes unambiguous.
  • Added execution time is visible.
  • Failures retain sanitizer logs or dumps as artifacts.
  • The sanitizer lane does not become a hidden prerequisite for unrelated GPU tests.

AI use

OpenAI Codex reviewed XCL's diagnostic goals and drafted this sanitizer-rerun proposal.

**@⁠mokkamokacaffe** on GitHub · 2026-11-25 23:01 UTC · [original](https://github.com/xcl-dev/xcl/issues/2563) # Tests: add disclosed sanitizer diagnostic reruns for CPU-side failures ## Summary Add opt-in and scheduled sanitizer configurations for CPU-side memory corruption, undefined behavior and concurrency failures. Reports should distinguish the ordinary test result from the sanitizer rerun and disclose the added duration and instrumentation overhead. ## Motivation Shader translation, cache workers, command-list interception and asynchronous resource retirement contain unsafe code and shared state. A crash or hang observed during a GPU-oriented test can originate in CPU memory ownership, invalid shifts, stale pointers or a race. A sanitizer rerun can provide a useful second diagnosis, but its timing and memory behavior differ from an ordinary build. ## Proposed lanes - AddressSanitizer for out-of-bounds access, use-after-free and heap corruption. - UndefinedBehaviorSanitizer where supported for invalid shifts, alignment and arithmetic assumptions in native dependencies. - ThreadSanitizer on a supported host configuration for worker queues, caches and retirement state. - Windows Application Verifier or Page Heap as a documented Windows-specific manual lane. ## Execution policy - Keep the ordinary build and test result as the primary result. - Run focused sanitizer jobs for changes touching unsafe or concurrent code. - Run broader sanitizer suites on a schedule or through an explicit workflow dispatch. - A failure report may suggest one exact rerun command. The rerun result must name the sanitizer and configuration separately. - Do not use sanitized runs for frame-rate, translation-time, PSO-time or memory-budget comparisons. ## Required report fields ```text XCL commit: OS and toolchain: sanitizer and version: optimization level: ordinary command and result: sanitized command and result: ordinary duration: sanitized duration: excluded or skipped tests: diagnostic artifact: ``` ## Initial implementation 1. Document one supported AddressSanitizer command and run it against a focused unit-test group. 2. Record the baseline failures and unsupported tests on `main`. 3. Add a manually dispatched workflow after the command is reproducible. 4. Evaluate a scheduled broader run before making any sanitizer job required for pull requests. ## Success criteria - The documented command reproduces locally and in its selected runner environment. - Reports make the ordinary and sanitized outcomes unambiguous. - Added execution time is visible. - Failures retain sanitizer logs or dumps as artifacts. - The sanitizer lane does not become a hidden prerequisite for unrelated GPU tests. ## AI use OpenAI Codex reviewed XCL's diagnostic goals and drafted this sanitizer-rerun proposal.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:33:49 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.