Skip to content

ci: a sanitizer lane for the checks that offer --sanitize - #2908

Open
jordanella wants to merge 1 commit into
NotRexed:mainfrom
jordanella:ci/sanitize-lane
Open

jordanella wants to merge 1 commit into
NotRexed:mainfrom
jordanella:ci/sanitize-lane

Conversation

@jordanella

Copy link
Copy Markdown
Contributor

Eleven checks build the code they test with the address and undefined-behaviour sanitizers when given --sanitize, but nothing ran them that way, so a use after free or an overflow in that code passes CI by luck. This adds a sanitizer lane. The dev-loop proposal's D3 (#2636).

Change

  • A declaration: a check says what turns its sanitizers on, RUN_ALL_SANITIZE = ["--sanitize"] (for test_low_vram_texture_mips, ["--sanitize", "address,undefined"], as its option takes the list), beside its RUN_ALL_ARGS. It is checked like the other declarations (a non-empty list of strings).
  • tests/run_all.py --sanitize: runs those checks, and only those, with those arguments added; no C++ unit tests, no byte-compile. On Windows it skips them with the reason: llvm-mingw's ASan is a DLL runtime, and the checks' Linux flags (-no-pie) stop clang there.
  • CI: a Linux job in source-regressions.yml, Sanitizer lane (ASan, UBSan), with the same pinned checkouts as the Python job, runs run_all.py --sanitize --strict.

Testing

  • The lane, in a Linux container (python:3.12-slim, Debian's g++, the Builder's Vulkan headers): run_all.py --sanitize --strict: 11 passed, 0 failed.
  • On Windows: the 11 are skipped with the reason.
  • tests/test_run_all_declarations.py: the declaration's shapes (a list; True or [] stop the run), and a run of the lane with one declaring check (given exactly its arguments) and one that isn't (not run).
  • Every check that reads the changed files (19), through run_all.py, rebased on today's main, Windows: 18 pass; test_spawn_emit fails the same way on main here.

See #2636 (D3).

🤖 Generated with Claude Code

Eleven checks build their code with the address and undefined-behaviour
sanitizers when given --sanitize, but nothing ran them that way. A check
now declares what turns them on (RUN_ALL_SANITIZE = ["--sanitize"], or
the sanitizers to use for test_low_vram_texture_mips), and
`tests/run_all.py --sanitize` runs those checks, and only those, with it.
A new Linux job in source-regressions.yml runs the lane with --strict.
On Windows the lane is skipped with the reason (llvm-mingw's ASan is a
DLL runtime, and the checks' -no-pie stops clang there).

All 11 pass with --sanitize --strict in a Linux container (python:3.12,
Debian's g++). tests/test_run_all_declarations.py: the declaration's
shapes, and a run of the lane. The dev-loop proposal's D3 (NotRexed#2636).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.

1 participant