[PR #750] [CLOSED] spirv_asm: refuse an output that aliases the source (OLD-10025) #788

Closed
opened 2026-11-26 20:19:03 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/750
Author: @abnalstlll-byte
Created: 11/24/2026
Status: ❌ Closed

Base: main ← Head: restore/old-10025-spirv-asm-alias


📝 Commits (1)

  • 1142836 spirv_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

### Summary
Restores and updates work from draft PR #293 (old-pr/10025 / item OLD-10025).
Original commit by @igorborgest (8e33f7866).

tools/spirv_asm.py previously permitted an output -o argument that aliased the source .spvasm file, clobbering the source file on write.
This change uses same_report_path to detect path aliasing (direct same path, .. canonicalizations, symlinks, and hardlinks) and refuses the command with an error (ap.error("output must not overwrite the source")).

Verification

  • python -I scripts/check_no_game_data.py tools/spirv_asm.py tests/test_spirv_asm.py -> Clean (no game data)
  • python -m unittest tests/test_spirv_asm.py -> 36/36 PASS, 1 skip in 3.26s
  • Clean rebase onto latest ubi/main (2d73c242f).

AI-assisted verification and rebase by Antigravity (Autonomous Direct Mode).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/750 **Author:** [@abnalstlll-byte](https://github.com/abnalstlll-byte) **Created:** 11/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `restore/old-10025-spirv-asm-alias` --- ### 📝 Commits (1) - [`1142836`](https://github.com/ubiquitarianism/leonida/commit/11428368ddd25fe5451632eb9eb1495230f4a188) spirv_asm: refuse an output that aliases the source ### 📊 Changes **2 files changed** (+33 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_spirv_asm.py` (+30 -0) 📝 `tools/spirv_asm.py` (+3 -0) </details> ### 📄 Description ### Summary Restores and updates work from draft PR #293 (`old-pr/10025` / item `OLD-10025`). Original commit by @igorborgest (`8e33f7866`). `tools/spirv_asm.py` previously permitted an output `-o` argument that aliased the source `.spvasm` file, clobbering the source file on write. This change uses `same_report_path` to detect path aliasing (direct same path, `..` canonicalizations, symlinks, and hardlinks) and refuses the command with an error (`ap.error("output must not overwrite the source")`). ### Verification - `python -I scripts/check_no_game_data.py tools/spirv_asm.py tests/test_spirv_asm.py` -> Clean (no game data) - `python -m unittest tests/test_spirv_asm.py` -> 36/36 PASS, 1 skip in 3.26s - Clean rebase onto latest `ubi/main` (`2d73c242f`). AI-assisted verification and rebase by Antigravity (Autonomous Direct Mode). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:19:03 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#788
No description provided.