Interrupted stub rebuild can truncate a valid SPIR-V output

オープン
#4,183 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@lumenpearson がすでに取り組んでいます。

2026年11月22日 から。

  • #4175 @lumenpearson による — オープン

評価

難易度
3/5
見積もり時間
半日
初心者へのやさしさ
18/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
tooling

調査の方向性

The stub generator's rebuild path opens the existing SPIR-V output for writing before the new content is complete, so start where that file is opened and written. The test test_failed_rebuild_keeps_existing_stub in open PR #4175 simulates an OSError on a second pass. Work is already under way there, so check that PR before starting. Done means a failed rebuild leaves the original bytes in place.

索引モデルが issue の本文から書いたものです。

説明

bug
What happens

The stub generator opens the existing SPIR-V output for writing before the replacement is complete. An ordinary I/O error can leave a truncated file in place of a previously valid stub. The fix and failure-injection tests are in #4175. AI-assisted (Codex).

Commit

aa2988cc555bad7ecd508b48a702adbb32fe7c95

System

Windows, Python 3.12.13, SPIRV-Tools v2026.4. CPU only.

Where

Finding the game (--find)

Command and steps

Generate a stub twice from a synthetic index. On the second pass simulate an OSError during the write, as in test_failed_rebuild_keeps_existing_stub in #4175.

Output
The rebuild reports a write error, and the existing file contains only the incomplete write. With the fix its original bytes remain available.
主要言語
Python
スター
14.9k
フォーク
1.2k
平均マージ
1時間 58分
マージ済み PR(30日)
40

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ItsNotRexed/Leonida のほかの issue

ItsNotRexed/Leonida の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。