ci: a sanitizer lane for the checks that offer --sanitize #29
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!29
Loading…
Reference in a new issue
No description provided.
Delete branch "dyst/Longshot:ci/sanitize-lane"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
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.What changed
RUN_ALL_SANITIZE = ["--sanitize"], beside itsRUN_ALL_ARGS(test_low_vram_texture_mips.pydeclares["--sanitize", "address,undefined"], as its option takes the list). The eleven checks that declare it:test_dump_readback,test_image_view_retry,test_import_buffer_binding,test_low_vram_texture_mips,test_program_cache_cleanup,test_recording_admission,test_sampler_admission,test_texel_buffer_ownership,test_texture_staging_publication,test_vulkan_clear_mip,test_vulkan_copy_span.tests/run_all.pyreadsRUN_ALL_SANITIZEinread_declarations(inDECLARATIONS; checked like the others, a non-empty list of strings), and--sanitizeruns only the checks that declare it, with those arguments added inpython_check: no C++ unit tests, no byte-compile, and no--write-times. On Windows (without--no-skip) it skips them with the reason "the sanitizer lane runs on Linux": llvm-mingw's ASan is a DLL runtime, and the checks' Linux flags (-no-pie) stop clang there.tests/test_run_all_declarations.pycovers the declaration's shapes (a list;Trueor[]stop the run) and a run of the lane with one declaring check (given exactly its arguments) and one that isn't (not run)..forgejo/workflows/ci.ymlgets a Linux job, Sanitizer lane (ASan, UBSan), a full check: it runs when CI is started by hand (Actions > CI > Run workflow), as the Python checks do since #105. The source and the pinned Vulkan headers (v1.4.345, throughscripts/fetch_commit.sh, as the Python checks get them), Python 3.12, g++ and clang, thenpython -I -B tests/run_all.py --sanitize --strict.Flags and settings
None: no environment switch, menu row or ini key. The new
tests/run_all.py --sanitizeoption and theRUN_ALL_SANITIZEdeclaration are the test runner's, described above.Measurements
main:
0c74253d(2026-11-13)this PR: ci/sanitize-lane @
c072cfceHardware: Ryzen 9 3900X, 64 GB, Windows 11, Docker (python:3.12, Debian's g++ and clang): the lane is Linux only
Scene: none: game-free. The checks under the sanitizers, as the CI job runs them
Method: in the container, the job's steps (the compilers, the Vulkan headers through
scripts/fetch_commit.sh), thentests/run_all.py --sanitize --stricttwice, timed. main has no--sanitize(nothing runs these checks under the sanitizers)How to reproduce:
docker runpython:3.12 with the checkout,apt-get install g++ clang,bash scripts/fetch_commit.sh https://github.com/KhronosGroup/Vulkan-Headers 74d8a6cb930c68ef617b202c3ff3c59d919e086b _deps/vulkan-headers,LONGSHOT_VULKAN_HEADERS=_deps/vulkan-headers/include python -I -B tests/run_all.py --sanitize --strict0c74253dc072cfceThe failure alone is main's, not the lane's:
test_texture_staging_publicationfails the same way on main on Windows since #177's log levels, and #202 fixes its fixture. On Windows the 11 are skipped with the reason ("the sanitizer lane runs on Linux"). actionlint 1.7.12 with.forgejo/actionlint.yaml, as CI's lint job runs it: clean on thisci.yml.Testing
Tested: the lane in a Linux container as the job runs it (above, twice, 11 of 11);
tests/run_all.py, the whole suite, on this branch and on main0c74253d, Windows (483 passed and 6 failed on both, no failure main doesn't have: test_check_third_party, test_display_pointer, test_fpx_sticky, test_release, test_spawn_emit and test_texture_staging_publication fail on main too (the last since #177; #202 fixes it));tests/test_run_all_declarations.py(the declaration's shapes, the lane's run); actionlint on the workflow.Not tested: the job on a Forgejo runner (it runs only when CI is started by hand, which is a maintainer's); the lane failing on a real sanitizer error (the checks pass clean, and no fault was put in to see it caught).
Needs other testers: None
Screenshots
Nothing on screen.
Risk and rollback
Only
run_all.py --sanitizeand the new job run the lane; a plainrun_all.pyruns the same checks with the same arguments as before. A malformedRUN_ALL_SANITIZEin a test stops the run with its file and line, as the other declarations do. The job runs only when CI is started by hand, so no pull request waits on it. Reverting the commits removes it.Reviewer notes
Carried over from https://github.com/NotRexed/Hookshot/pull/2908 with the move to Longshot, then made a Forgejo job: the second commit starts it by hand with the full checks (#105) and takes main's action URLs and header fetch. The dev-loop proposal's D3 (https://github.com/NotRexed/Hookshot/pull/2636).
Issues
None on Longshot. See https://github.com/NotRexed/Hookshot/pull/2636 (D3).
Checklist
For everyone
type(scope): description).main.python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above).third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
Assisted-by:/Co-Authored-By:trailers.tests/that reads changed source updated in this PR, not weakened.🤖 Generated with Claude Code
ci: a sanitizer lane for the checks that offer --sanitizeto WIP: ci: a sanitizer lane for the checks that offer --sanitizeBack to WIP under #48's process: this was carried over before the new template. Its description will be brought to the template and measured on Longshot (main against this PR, at named commits) when it's wanted for review; ask here if you'd like it sooner.
Description brought to Longshot's PR template (#48). Still WIP: its numbers are from the GitHub version, and it isn't rebased on current main; it gets measured on Longshot (main against this PR, at named commits) before it is marked ready.
Description moved to the template's Testing section and whole checklist (#72): what was tested, what wasn't, and what needs other testers (their test requests to open while this is WIP).
The description follows the template after #76 and #106: If applicable keeps only the boxes that apply (one that applies and isn't done yet stays unticked while this is WIP), the Flags table has the template's seven columns (Goal is now Recommendation), and GitHub references are full URLs. Nothing else changed.
Rebased onto main
0c74253d, and a second commit makes the lane a Forgejo full check: started by hand with the others (#105), main's action URLs, the Vulkan headers through fetch_commit.sh; actionlint 1.7.12 clean. Measured in a Linux container: 10 of 11 alone, the 11th is test_texture_staging_publication, broken on main since #177 and fixed by #202; 11 of 11 with #202's fixture. Whole suite: no failure main doesn't have. Ready for review.674fcdc5bdc072cfce8bWIP: ci: a sanitizer lane for the checks that offer --sanitizeto ci: a sanitizer lane for the checks that offer --sanitizeView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.