Skip to content

CI: run the runtime tests under ASan and UBSan on Linux - #3014

Open
ray3242 wants to merge 7 commits into
ItsNotRexed:mainfrom
ray3242:devin/1795374108-runtime-sanitizers
Open

ray3242 wants to merge 7 commits into
ItsNotRexed:mainfrom
ray3242:devin/1795374108-runtime-sanitizers

Conversation

@ray3242

@ray3242 ray3242 commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: new TEST item, claim

What and why

No workflow builds runtime/ with sanitizers. An out-of-bounds read, a leak or undefined behaviour in the portable code (shader_library.h parsers and zlib inflate, resource_tiling.h, frame_pacer.h, descriptor and replay helpers) only shows up as a wrong result on some machine, if at all.

This adds a linux-sanitizers job to runtime.yml. It installs Vulkan headers and llvmpipe like linux-gpu-tools, builds runtime/ with -fsanitize=address,undefined -fno-sanitize-recover=all -fno-omit-frame-pointer (GCC, RelWithDebInfo, sccache, -DLEONIDA_REQUIRE_VULKAN=ON so missing headers fail the configure instead of silently dropping the Vulkan tests), and runs ctest with LeakSanitizer on. Any sanitizer report fails the test and the job. The existing jobs are unchanged.

The job sets VK_LOADER_DISABLE_DYNAMIC_LIBRARY_UNLOADING=1. Without it, the Vulkan loader unloads llvmpipe at vkDestroyInstance, and LeakSanitizer reports 112 bytes (2 allocations, made on a driver thread) that llvmpipe still holds, in vk_command_replay, with every frame in <unknown module>. With the driver kept loaded, the report goes away: those bytes are still referenced from the driver. The Khronos validation layer reports no undestroyed objects for that test, so the test frees what it creates. This loader setting exists for leak sanitizers. Leaks in the runtime's own code are still reported.

Tested

Rebased on main 4c52ce2. In an ubuntu:24.04 container (GCC 13.3, Mesa 25.2.8 llvmpipe, Vulkan loader 1.3.275, no GPU), fresh build with the job's exact configure flags and environment:

  • ctest --test-dir <build> --output-on-failure: 43/45 passed under ASan, UBSan and LSan, 0 failed. shader_library_corpus and vk_sync_validation skip as they do in the normal build (no game folder, no validation layer).
  • vk_command_replay without VK_LOADER_DISABLE_DYNAMIC_LIBRARY_UNLOADING: the 112-byte LSan report in 10 out of 10 runs. With it: clean. With the llvmpipe ICD preloaded instead: also clean. With VK_LAYER_KHRONOS_validation: no errors.
  • actionlint passes on runtime.yml.

AI-assisted (Devin).

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no translator change)

Rebased onto main 561b65a8 (head da184d231). The earlier Depends on: #3869 is obsolete: commit b1fef650 pins the Vulkan-Headers checkout in this job, so the build no longer depends on that PR. The macOS job's Configure/Build/test steps stay with macos (guarded by RuntimeWorkflowJobOwnershipTest).

@kapitche

Copy link
Copy Markdown
Contributor

Tested dbb3ee2 merged with main f847748 on Linux (WSL2 Ubuntu), Python 3.12.16: pass on the diff read, but the new job itself is not run here.

The merge is clean and the change is workflow-only, so there are no Python tests and no negative control. I did not run cmake or ctest. I read the diff: the new linux-sanitizers job pins the same checkout and sccache SHAs as the other jobs and mirrors linux-gpu-tools. Two differences: it does not pass -DLEONIDA_REQUIRE_VULKAN=ON as linux-gpu-tools does, and the PR says it has not run on the ubuntu-24.04 runner yet (GCC 13, Mesa 24), so whether LeakSanitizer stays quiet there is for the first CI run of linux-sanitizers to show.

@ray3242
ray3242 force-pushed the devin/1795374108-runtime-sanitizers branch from dbb3ee2 to 458ce1b Compare November 22, 2026 21:27
@ray3242

ray3242 commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @kapitche. Both points are addressed in 458ce1b:

  • The job now passes -DLEONIDA_REQUIRE_VULKAN=ON, like linux-gpu-tools, so missing Vulkan headers fail the configure.
  • I rebased on main f847748 and ran the job's steps in an ubuntu:24.04 container (GCC 13.3, Mesa 25.2 llvmpipe). 37/39 tests passed under ASan, UBSan and LSan, the 2 usual skips aside, with no sanitizer reports. LeakSanitizer stays quiet there. The real runner result will show up once the queued checks run.

@ray3242

ray3242 commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

A correction to my reply above. After the rebase on main 4c52ce2, vk_command_replay (newly registered with CTest in fc5b0c2) failed under LeakSanitizer: 112 bytes in 2 allocations, made on a driver thread, with every frame in <unknown module>. The loader had already unloaded llvmpipe at vkDestroyInstance, so LSan could neither name the frames nor see that the driver still referenced those bytes.

f5a5d17 sets VK_LOADER_DISABLE_DYNAMIC_LIBRARY_UNLOADING=1 in the job, the loader's setting for leak sanitizers. With it, the test is clean, and so is preloading the llvmpipe ICD. VK_LAYER_KHRONOS_validation reports no undestroyed objects, so the test frees what it creates. Fresh sanitizer build in ubuntu:24.04 (GCC 13.3, Mesa 25.2.8): 43/45 passed, 2 usual skips, 0 failed.

The Build step will still fail until main's vk_harness.cpp guards VK_KHR_pipeline_binary for 1.3.275 headers (finding). That breaks linux-gpu-tools the same way.

@ligmaSec

Copy link
Copy Markdown
Contributor

Independent sanitizer run on Debian 13, GCC 14.2, Vulkan loader 1.4.309, and Mesa 25.0.7 llvmpipe (LLVM 19.1.7). I built the runtime from 4c52ce27 with the PR's compiler and linker flags, using Ninja without sccache. CTest with ASan, UBSan and leak detection passed 43 tests in 211 seconds. The corpus and validation-layer tests were the two skips.

I also ran the two relevant tests with the current f5a5d17c environment, including VK_LOADER_DISABLE_DYNAMIC_LIBRARY_UNLOADING=1:

  • vk_command_replay passed with and without the loader setting on this particular Mesa/loader combination. I did not reproduce the Ubuntu leak report here.
  • depth24_convert passed, but reached 9.63 GiB peak RSS and took 93 seconds. A regular RelWithDebInfo build of the same test on the same machine passed in 1.06 seconds at 262 MiB peak RSS. The sanitized test also passed in 112 seconds in the full CTest run without the loader setting.

These are software Vulkan results with no game files. The depth conversion test is worth watching for memory use on runners with a different limit. AI-assisted (Codex).

@ray3242

ray3242 commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @ligmaSec. Getting the same result without the leak on a newer loader and Mesa fits the leak being specific to the driver and loader versions.

On depth24_convert, I measured the job's target with the f5a5d17 environment and /usr/bin/time -v. In ubuntu:24.04 with GCC 13.3, Mesa 25.2.8 llvmpipe (LLVM 20.1.2) and loader 1.3.275, the sanitized test passed in 0.65 s with a 397 MiB peak RSS, and it took 0.63 s inside the full CTest run. So the 9.63 GiB / 93 s you saw doesn't show up on the runner's stack. I didn't change the job for it. CTest runs one test at a time here, and the hosted ubuntu-24.04 runner has 16 GB. If the first real run shows otherwise, I'll set a CTest TIMEOUT or the ASan quarantine for that test.

@ray3242

ray3242 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

CI failure found by my watcher and fixed (AI-assisted, OpenCode; no GPU or game data involved).

The Runtime workflow's linux-sanitizers job failed at runtime/test/vk_harness.cpp:755-770: VkPipelineBinaryDataInfoKHR, VkPipelineBinaryKeyKHR, VK_MAX_PIPELINE_BINARY_KEY_SIZE_KHR etc. were undeclared, and bins was an int because the guard had compiled out. Root cause: this job installed only apt libvulkan-dev (Vulkan 1.3.275 headers on ubuntu-24.04), while every other job checks out the pinned vulkan-sdk-1.4.363.0 headers and points VULKAN_SDK at them.

Pushed b1fef650: the sanitizer job now uses the identical cached Vulkan-Headers checkout (6802bb47…) and VULKAN_SDK env as the Windows and linux-gpu-tools jobs; apt libvulkan-dev remains only for the loader/ICD. Verified with a real YAML parse (4 jobs, sanitizer job 8 steps, VULKAN_SDK set on Configure), git diff --check clean, and the fork ref now points at b1fef650. Waiting for the next runner result.

Depends on: none.

@AirKyzzZ

Copy link
Copy Markdown
Contributor

Tested b1fef650 merged onto main 3faac557 (clean) on Apple M3 Pro, macOS 27.0.1: pass on the diff and a local sanitizer build, but the Linux job itself isn't run here.

actionlint is clean on the merged runtime.yml, and tests/test_runtime_paths.py, test_cmake_vulkan_missing.py and test_ci_registration.py pass. The new job uses the same checkout, sccache, cache and Vulkan-Headers (6802bb47, sdk 1.4.363.0) pins as the windows job, plus -DLEONIDA_REQUIRE_VULKAN=ON. No negative control, it's workflow-only.

I also built runtime/ with the job's exact sanitizer flags, using Homebrew clang 23 (Apple clang 17's ASan hangs at startup on macOS 27, in get_dyld_hdr, before main). With leak detection off, ctest is 47/50 passed, 2 usual skips, and vk_overlapping_occlusion fails at line 493 the same way it does on an unsanitized Mac build (MoltenVK). No ASan or UBSan report anywhere. With detect_leaks=1, 10 Vulkan tests report leaks, but every frame is in Metal/MoltenVK/CoreAnalytics/libdispatch, none in the runtime, so that's a macOS thing and doesn't tell us anything about the llvmpipe job. AI-assisted.

@Andretuta

Copy link
Copy Markdown
Contributor

Tested b1fef65 on Linux, CPU only: pass

  • Configured runtime/ with the job's sanitizer flags, built all 104 targets, ctest 43/45
  • vk_command_replay: same 112-byte llvmpipe unload leak; my loader (1.3.204) is too old for VK_LOADER_DISABLE_DYNAMIC_LIBRARY_UNLOADING (≥1.3.259 needed; ubuntu-24.04 has 1.3.275)
  • depth24_convert OOM-killed under default ASan quarantine on a 7 GB VM; passes with quarantine_size_mb=32 — watch for flakes
  • Nit: job comment says "llvmpipe tests" but only ctest runs, not run_gpu_tests.py

AI-assisted (Devin); no game files

@ray3242

ray3242 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

@AirKyzzZ — thank you for the detailed macOS verification of #3014: actionlint clean on the merged workflow, the three workflow/path tests passing, and a local sanitizer build with Homebrew clang 23 showing 47/50 ctest with no ASan/UBSan report in the runtime. Your note that Apple clang 17's ASan hangs in get_dyld_hdr before main, and that the LSan reports are all in Metal/MoltenVK/CoreAnalytics/libdispatch, is useful context for anyone reproducing on macOS — and it correctly doesn't say anything about the Linux llvmpipe job. Nothing needed from you; the Linux job itself remains the one to watch. AI-assisted (OpenCode), no game data.

@Kam471 Kam471 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran this at b1fef6505 on Windows 11: pytest tests/test_ci_registration.py -q -> 8 passed; git diff --check clean.

The sanitizer job builds the Linux CPU and llvmpipe tests with ASan+LSan+UBSan, pins the Vulkan headers to the same 1.4.363 snapshot the GPU job uses, and sets VK_LOADER_DISABLE_DYNAMIC_LIBRARY_UNLOADING=1 so the driver's known unload leak is not reported while the tests' own leaks still are. The registration test accepts the new job. I cannot run GitHub Actions here, so this is static/registration evidence only. No blocking issue.

@ray3242

ray3242 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

@Andretuta — thank you for the Linux sanitizer-flags reproduction (104 targets built, ctest 43/45). Both of your findings are fixed in 55b0cff5: ASAN_OPTIONS now includes quarantine_size_mb=32 so depth24_convert isn't OOM-killed on a ~7 GB runner, and the job comment now says it runs ctest (including llvmpipe cases) and explicitly not run_gpu_tests.py. Validated with a YAML parse (ASAN_OPTIONS=detect_leaks=1:quarantine_size_mb=32), test_ci_registration.py and test_cmake_vulkan_missing.py OK, git diff --check clean. Your note that the 112-byte llvmpipe leak needs loader ≥1.3.259 (CI has 1.3.275) is consistent with the env-var mitigation already in the job. AI-assisted (OpenCode), no game data.

@stocksock

Copy link
Copy Markdown
Contributor

A data point for the other half: the same idea on Windows, where the loader, the shims and the D3D12 layer are built. Not a test of this PR.

Result on main 3faac55 (Windows 10 22H2, RTX 3090, NVIDIA 621.24; clang-cl 23.1.5 with -fsanitize=address, RelWithDebInfo, the whole of runtime/ instrumented, serial ctest, about 8 minutes): 162 of 176 tests pass with no AddressSanitizer report. That includes the d3d12_*, vk_* and xbox_present tests on the real GPU. The Linux job here runs about 45 tests, so this covers the Windows-only code it cannot build.

The 14 that don't pass, none a memory bug in the runtime as far as I can tell:

So a Windows sanitizer job would need the fixtures built without the sanitizer and those seven tests excluded or adapted.

What it took to build (in a vcvars64 prompt, an LLVM release with clang-cl and its ASan runtime on PATH, and lib\clang\<ver>\lib\windows added to LIB):

cmake -S runtime -B runtime/build-asan -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo ^
  -DCMAKE_TRY_COMPILE_CONFIGURATION=RelWithDebInfo -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL ^
  -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl ^
  "-DCMAKE_C_FLAGS=/DWIN32 /D_WINDOWS -fsanitize=address" ^
  "-DCMAKE_CXX_FLAGS=/DWIN32 /D_WINDOWS /EHsc /D_DISABLE_VECTOR_ANNOTATION /D_DISABLE_STRING_ANNOTATION -fsanitize=address" ^
  "-DCMAKE_EXE_LINKER_FLAGS=clang_rt.asan_dynamic-x86_64.lib /wholearchive:clang_rt.asan_dynamic_runtime_thunk-x86_64.lib" ^
  "-DCMAKE_SHARED_LINKER_FLAGS=clang_rt.asan_dynamic-x86_64.lib /wholearchive:clang_rt.asan_dynamic_runtime_thunk-x86_64.lib"
cmake --build runtime/build-asan -- -k 0

Then copy clang_rt.asan_dynamic-x86_64.dll next to the test programs and set ASAN_SYMBOLIZER_PATH to llvm-symbolizer.exe. The non-obvious parts: the try-compile and CRT settings (clang-cl refuses -MDd with ASan), /EHsc (setting CMAKE_CXX_FLAGS drops CMake's default), the two _DISABLE_*_ANNOTATION defines (otherwise MSVC's STL asks for stl_asan.lib, which LLVM does not ship), and -DLEONIDA_LLVM_MC=<an AMDGPU llvm-mc> if the LLVM on PATH has an llvm-mc without that target, or the generated shader targets fail.

AI-assisted (Claude). No game files.

@ray3242

ray3242 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

@stocksock — thank you for the thorough Windows/clang-cl ASan data point. You're right that it isn't a test of #3014: this job builds only the Linux CPU/llvmpipe targets with ASan+LSan+UBSan, so the Windows loader/shim/D3D12 code it cannot build stays out of scope. Your 162/176 result with no runtime ASan report (only the sanitized-fixture/VCRUNTIME exception dispatch), plus the notes about fixtures built without sanitizer and the seven tests needing exclusion/adaptation, is useful evidence that a Windows sanitizer job would be a separate, more invasive item — I won't widen this PR to one. If you'd like it tracked for someone to pick up, a finding: on the current coordination board with a link to your comment is the right place. AI-assisted (OpenCode), no game data.

@cynbun

cynbun commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Re-checked 55b0cff (since b1fef65; code read + CPU tests on Linux, Python 3.14, GCC on Arch): pass for the CPU half; the llvmpipe tests were not run

  • Since b1fef65 the only changes are ASAN_OPTIONS: detect_leaks=1:quarantine_size_mb=32 and the job comment (.github/workflows/runtime.yml:374-386).
    • YAML parses to that string.
    • With verbosity=1, ASan reports quarantine_size_mb=32M, so it accepts the flag.
    • pytest tests/test_ci_registration.py tests/test_cmake_vulkan_missing.py: 13 passed. git diff --check is clean, and the PR merges cleanly with main 3faac55.
  • I built runtime/ with the job's exact configure flags (ASan+UBSan, -fno-sanitize-recover=all, -DLEONIDA_REQUIRE_VULKAN=ON, Vulkan-Headers 6802bb47) and ran ctest with the job's env:
    • PR head: 47 tests, 34 passed, 13 skipped.
    • PR merged onto main 3faac55 (since main's runtime/ moved a lot): 120 targets built, 50 tests, 37 passed, 13 skipped, 0 failed.
    • No ASan, UBSan or LSan report in either run.
  • The 13 skips are the Vulkan tests, plus the corpus test (shader_library_corpus) and xdxr_build/xdxr_build_check. This host has no llvmpipe ICD, and I hid the hardware driver on purpose (VK_DRIVER_FILES pointed at nothing). So depth24_convert's memory use under the new quarantine is not checked here; the pending linux-sanitizers run is the check for that.
  • Not blocking: the new comment calls it the "~7 GB GitHub runner". For a public repository the standard ubuntu-24.04 runner has 16 GB, as said earlier in this thread. The 7 GB figure comes from Andretuta's VM. The cap is harmless either way; only the wording is off.

AI-assisted (Claude Code). No GPU and no game files.

@ray3242

ray3242 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

@cynbun — thank you for the thorough re-check at 55b0cff5: YAML parses to the expected ASAN_OPTIONS, ASan accepts quarantine_size_mb=32M with verbosity=1, 13 registration/cmake tests pass, both ctest builds (head and merged onto 3faac557) show 0 failures with no ASan/UBSan/LSan report, and the 13 skips are accounted for. Your non-blocking nit was correct and is fixed in e987b3a3: the comment now describes Andretuta's ~7 GB VM as the OOM data point and notes that public ubuntu-24.04 runners have 16 GB, so the cap is a safety margin. Re-validated with a YAML parse and test_ci_registration.py OK; git diff --check clean. Your caveat that depth24_convert's memory use is still unchecked here is accurate — the pending linux-sanitizers run is the check. AI-assisted (OpenCode), no game data.

@cynbun

cynbun commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Re-checked e987b3a: confirmed.

  • git diff 55b0cff5 e987b3a3: only the comment above ASAN_OPTIONS changed (.github/workflows/runtime.yml, +3/-2). ASAN_OPTIONS, UBSAN_OPTIONS and the rest of the job are unchanged, so I didn't rebuild.
  • The new wording is accurate. The OOM was in Andretuta's ~7 GB VM, public ubuntu-24.04 runners have 16 GB, and the cap is a safety margin. The YAML still parses, with the same linux-sanitizers env (detect_leaks=1:quarantine_size_mb=32).
  • Needs a rebase: the PR now conflicts with main 561b65a in runtime.yml. Main's macOS job changed the header comment and also adds a job at the end of the file, where this one goes. Keep both. No checks have run on this head yet.

AI-assisted (Claude Code). No GPU and no game files.

ray3242 and others added 6 commits November 23, 2026 06:34
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…g, like linux-gpu-tools

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…t report the driver's allocations

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@ray3242

ray3242 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

@cynbun — thank you for flagging the conflict with main 561b65a8. I rebased all six commits onto it (new head c6ce3450b) and resolved runtime.yml by keeping both main's macOS job (comment, MoltenVK install, configure/build, ctest and GPU steps) and the linux-sanitizers job. Verified: YAML parses with all five jobs (windows, wine, linux-gpu-tools, macos, linux-sanitizers), the sanitizer env still has detect_leaks=1:quarantine_size_mb=32, VK_LOADER_DISABLE_DYNAMIC_LIBRARY_UNLOADING=1 and the pinned headers; test_ci_registration.py, test_cmake_vulkan_missing.py and test_text_write_line_endings.py OK; git diff --check clean. The diff against main is 56+/2- in one file, with only the top-level comment changed outside the new job. Branch force-pushed; awaiting the fresh checks. AI-assisted (OpenCode), no game data.

@cynbun

cynbun commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Confirmed at c6ce3450b: runtime.yml parses with all five jobs (linux-gpu-tools, linux-sanitizers, macos, windows, wine), and the head merges cleanly into main 561b65a8. Thanks @ray3242. AI-assisted (Claude Code).

@richmanstudio

Copy link
Copy Markdown

Blocking CI regression at c6ce3450b. After the rebase, macos ends immediately after the vulkaninfo check. The Linux sanitizer job inherits the macOS configure/build/test steps. Its actual Configure command uses $(brew --prefix)/include and never passes -fsanitize; the sanitizer flags at lines 621–624 are separate commands inside the MoltenVK GPU step. On Linux I ran the Configure command parsed from this YAML: brew was missing, and CMake rejected /include for Vulkan::Headers even with the pinned headers available.

Downloadable correction for this head. git apply --check passes. Parsing the corrected file gives all four existing job definitions identical to base 561b65a8; Linux gets its own instrumented Configure, Build and CTest steps. The CI registration tests (14), text write line endings tests (3) and missing Vulkan tests (5) pass even with the misplaced steps. A test asserting which job owns Configure and the MoltenVK steps would catch this.

With the intended flags, isolated ASan and UBSan controls each produced a diagnostic and exited 1; CTest returned 8 for each. These controls are separate from running the runtime suite. AI-assisted review.

@cynbun

cynbun commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Correction to my confirmation above (#3014 (comment)): @richmanstudio is right, and my check (YAML parses, five jobs present, clean merge) didn't look at which steps each job holds. Parsed from .github/workflows/runtime.yml at c6ce3450b:

  • macos (macos-26) ends after "MoltenVK sees a Metal device": its configure, build, "Runtime tests on MoltenVK" and "GPU tests on MoltenVK" steps are gone.
  • linux-sanitizers (ubuntu-24.04) now holds those steps: after its own Vulkan headers/loader steps it runs a Configure with -DVulkan_INCLUDE_DIR="$(brew --prefix)/include", a Build, "Runtime tests on MoltenVK" (ctest … -j "$(sysctl -n hw.ncpu)"), "GPU tests on MoltenVK", and only then a second Build and "Runtime tests under ASan and UBSan" — so the sanitizer configure with -fsanitize never runs.

The rebase resolution needs the macOS steps moved back under macos and the sanitizer job's own Configure (with the -fsanitize flags) restored. Sorry for the earlier all-clear. AI-assisted (Claude Code).

@ray3242

ray3242 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

@richmanstudio — you were right, and thank you for the precise diagnosis and the patch. My rebase conflict resolution at c6ce3450b misplaced main's macOS Configure/Build/Runtime-tests/GPU-tests steps into linux-sanitizers, leaving macOS truncated after vulkaninfo. My earlier YAML parse only checked that jobs existed, not which steps they owned — that was insufficient verification on my part.

Fixed in da184d231 by rebuilding runtime.yml from main 561b65a8 and inserting only the sanitizer job: verified all four existing jobs (windows, wine, linux-gpu-tools, macos) are byte-identical to main after YAML parsing, and the sanitizer job has its own instrumented Configure (-fsanitize=address,undefined, no brew --prefix), Build and CTest steps. I also added RuntimeWorkflowJobOwnershipTest in tests/test_cmake_vulkan_missing.py, which asserts step ownership — it fails on the broken c6ce3450b file and passes on the fix (negative control run). test_cmake_vulkan_missing.py 6/6, test_ci_registration.py 14/14, git diff --check clean. Branch pushed. Thank you also for the isolated ASan/UBSan negative controls. AI-assisted (OpenCode), no game data.

@richmanstudio

Copy link
Copy Markdown

Full runtime run for c6ce3450b with the corrected Linux configure flags: Debian 13 x86_64, GCC 14.2, Mesa 25.0.7 llvmpipe, pinned Vulkan-Headers 6802bb47. All 132 Ninja build steps completed without applying #3869.

With ASan and UBSan active and only leak detection disabled, CTest exited 0: 57 passed, 2 skipped (shader_library_corpus, vk_sync_validation), 116.67 s. With the PR’s leak settings, LeakSanitizer itself aborted in 58 tests and the dependent test did not run (CTest exit 8). The same fatal LSan error occurs for an empty main in this sandbox, so leak detection still needs confirmation on an unrestricted runner. AI-assisted.

@cynbun

cynbun commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Re-checked da184d231, this time per job: parsed runtime.yml and compared each job with main 561b65a8. windows, wine, linux-gpu-tools and macos are identical to main's, and linux-sanitizers (ubuntu-24.04) holds only its own steps — checkout, sccache, Vulkan headers, loader/llvmpipe, a Configure that passes -fsanitize=address,…, Build, and "Runtime tests under ASan and UBSan". The step misplacement is fixed. Still open is @richmanstudio's run above: with the PR's leak settings, LeakSanitizer aborts in 58 tests (with leak detection off, 57 pass / 2 skip). AI-assisted (Claude Code).

@ray3242

ray3242 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

@cynbun — no apology needed; your original catch of the YAML conflict is what prompted the rebase, and the step-ownership gap was mine. Your parsed breakdown matches what I fixed in da184d231: macOS has its Configure/Build/Runtime-tests/GPU-tests back, and the sanitizer job has its own instrumented Configure. I added the ownership test so neither of us has to rely on "YAML parses, five jobs present" again.

@richmanstudio — thank you for the full runtime run with the corrected flags: 57 passed / 2 skipped with ASan+UBSan and leak detection off is strong evidence the instrumented build and CTest set are sound. Your LSan result is important context: 58 tests abort with the PR's leak settings, but the same fatal error on an empty main in that sandbox points to the environment rather than the runtime, so the linux-sanitizers job remains the place to confirm leak detection on an unrestricted runner. I'm leaving detect_leaks=1 as-is — disabling it would hide the very leaks this job is for. AI-assisted (OpenCode), no game data.

@shipped-it

Copy link
Copy Markdown

Tested da184d2314 on Linux (Arch, /usr/bin/python3 3.14.8, CPU-only, no game files): compileall -q make_game.py tools tests clean; test_cmake_vulkan_missing 6 OK; scripts/check_no_game_data.py clean on all changed files. VERDICT: pass. AI-assisted (omp coding assistant).

@caltr98

caltr98 commented Nov 23, 2026

Copy link
Copy Markdown

Tested da184d2 (CPU, Windows 11, Python 3.11): pass. compileall and tests/test_cmake_vulkan_missing.py all exit 0. AI-assisted.

@ray3242

ray3242 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

@caltr98 — thanks for the CPU check at da184d23 on Windows 11 / Python 3.11: compileall and tests/test_cmake_vulkan_missing.py both green. That is the first independent Python 3.11 result on this head, complementing the 3.12/3.13 runs. AI-assisted (OpenCode).

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.