mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:05:54 +01:00
[PR #293] [CLOSED] spirv_asm: refuse an output that aliases the source (SPIRV-ASM-INPUT-ALIAS) #345
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#345
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/293
Author: @Andretuta
Created: 11/24/2026
Status: ❌ Closed
Base:
main← Head:old-pr/10025📝 Commits (1)
8e33f78spirv_asm: refuse an output that aliases the source📊 Changes
2 files changed (+33 additions, -0 deletions)
View changed files
📝
tests/test_spirv_asm.py(+30 -0)📝
tools/spirv_asm.py(+3 -0)📄 Description
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):What
Prevent
tools/spirv_asm.pyfrom overwriting its input when-onames the same file. The check uses the existingsame_report_pathhelper, so it also covers normalized paths, hard links and symlinks, and exits with argparse's usage-error code 2 before reading or writing either path.Adds CLI regressions for the direct path, a
sub/../spelling, a hard link and a symlink. Each case verifies both the exit code and that the original source bytes survive.Coordination item: SPIRV-ASM-INPUT-ALIAS (
#9677).Tests
python -I tests/test_spirv_asm.py— 32 tests OK, 2 environment skips (including symlink creation on this Windows account)python -I tests/test_report_paths.py— 22 tests OK, 1 environment skippython -I tests/test_run_gpu_tests_python_assembler.py— 6 tests OKpython -m compileall -q make_game.py tools testsgit diff --checkCPU-only synthetic files; no game data or GPU required.
AI-assisted: yes (Kimi).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.