Skip to content

fix(runtime): reject ambiguous Vulkan checker arguments - #2243

Closed
matheuskshn wants to merge 1 commit into
ItsNotRexed:mainfrom
matheuskshn:fix/vulkan-checker-cli-arguments
Closed

matheuskshn wants to merge 1 commit into
ItsNotRexed:mainfrom
matheuskshn:fix/vulkan-checker-cli-arguments

Conversation

@matheuskshn

Copy link
Copy Markdown
Contributor

Changes

  • Reject an unknown long option or a second positional argument before opening the shader index. The CLI accepts one optional cache path.
  • Extend the CMake CLI check with both forms of invalid input and a valid cache path mixed with named options.

The old parser can silently replace the cache path and report success. I reproduced that while reviewing #2111. This patch hardens the checker; callers still need to handle older checker binaries separately.

Validation

  • Windows 11, Clang 23.1.5 and CMake 4.3.5. The CLI check fails on the old binary and passes with this change.
  • A synthetic compute pipeline compiled on an RTX 4070 Ti, wrote 17,394 cache bytes to the requested path, and the misspelled option exited with status 2 without producing an unexpected cache.

Coordination claim. AI-assisted (Codex).

Reject unknown long options and extra positional arguments before reading the index so a mistyped flag cannot redirect the Vulkan pipeline cache. Cover both failure paths in the CLI test.
@matheuskshn

Copy link
Copy Markdown
Contributor Author

Closing in favour of #2111. Its follow-up 0c45e9a5 implemented both CLI guards after the compatibility finding, while this standalone fix was in progress. The tests here confirmed that unknown options and surplus cache paths fail before index parsing and that a valid call still writes the Vulkan cache. This branch and its CMake cases remain available as reference.

@kapitche

Copy link
Copy Markdown
Contributor

Tested on Windows 11 with two GPUs on one machine (MSVC 14.51, llvm-mc 23.1.6): no regression. RTX 4080 SUPER: 115/116. Not from this PR: d3d12_draw (bundle-blend regression on main, fixed by #1995). The Intel UHD 770 failures are the known ones (#2300): d3d12_descriptor, d3d12_present, d3d12_m3_frame, d3d12_subgroup.

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.

2 participants