mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:15:52 +01:00
[PR #34] CI: run the runtime tests under ASan and UBSan on Linux #87
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#87
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/34
Author: @Andretuta
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:old-pr/3014📝 Commits (7)
12cd589CI: run the runtime tests under ASan and UBSan on Linuxe4ff325CI: fail the sanitizer job's configure when Vulkan headers are missing, like linux-gpu-tools42a3d3bCI: keep llvmpipe loaded in the sanitizer job so LeakSanitizer doesn't report the driver's allocations65eba25CI: use pinned Vulkan 1.4.363 headers in sanitizer job9528b5eCI: cap ASan quarantine and clarify the sanitizer job commentc6ce345CI: correct the ASan quarantine commentda184d2CI: restore macOS step ownership after the rebase and guard it📊 Changes
2 files changed (+85 additions, -2 deletions)
View changed files
📝
.github/workflows/runtime.yml(+61 -2)📝
tests/test_cmake_vulkan_missing.py(+24 -0)📄 Description
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):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.hparsers 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-sanitizersjob toruntime.yml. It installs Vulkan headers and llvmpipe likelinux-gpu-tools, buildsruntime/with-fsanitize=address,undefined -fno-sanitize-recover=all -fno-omit-frame-pointer(GCC, RelWithDebInfo, sccache,-DLEONIDA_REQUIRE_VULKAN=ONso missing headers fail the configure instead of silently dropping the Vulkan tests), and runsctestwith 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 atvkDestroyInstance, and LeakSanitizer reports 112 bytes (2 allocations, made on a driver thread) that llvmpipe still holds, invk_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
4c52ce27. In anubuntu:24.04container (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_corpusandvk_sync_validationskip as they do in the normal build (no game folder, no validation layer).vk_command_replaywithoutVK_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. WithVK_LAYER_KHRONOS_validation: no errors.actionlintpasses onruntime.yml.AI-assisted (Devin).
Checklist
docs/design.md, with how it was confirmed. (n/a: no translator change)Rebased onto main
561b65a8(headda184d231). The earlierDepends on: #3869is obsolete: commitb1fef650pins 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 withmacos(guarded byRuntimeWorkflowJobOwnershipTest).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.