Skip to content

Restore SPIRVUseTextFormat on error in readSpirv#3622

Open
vmaksimo wants to merge 1 commit intoKhronosGroup:mainfrom
vmaksimo:fix-spirvusetextformat-restore
Open

Restore SPIRVUseTextFormat on error in readSpirv#3622
vmaksimo wants to merge 1 commit intoKhronosGroup:mainfrom
vmaksimo:fix-spirvusetextformat-restore

Conversation

@vmaksimo
Copy link
Contributor

@vmaksimo vmaksimo commented Mar 4, 2026

Replace manual save/set/restore of SPIRVUseTextFormat with llvm::SaveAndRestore to guarantee restoration on all exit paths, including the early return on write error.

Fixes Coverity CID 546125.
Resolves #3414

Replace manual save/set/restore of SPIRVUseTextFormat with
llvm::SaveAndRestore to guarantee restoration on all exit paths,
including the early return on write error.

Fixes Coverity CID 546125.
Addresses KhronosGroup#3414
@vmaksimo vmaksimo marked this pull request as ready for review March 4, 2026 10:58
@vmaksimo vmaksimo requested a review from svenvh March 20, 2026 13:20
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.

[Coverity] Non-local variable isn't restored

2 participants