fix: SM50 error-object leak/null-deref + fence QI-failure leak (clang-tidy) - #197
Closed
cyyever wants to merge 2 commits into
Closed
fix: SM50 error-object leak/null-deref + fence QI-failure leak (clang-tidy)#197cyyever wants to merge 2 commits into
cyyever wants to merge 2 commits into
Conversation
Owner
|
Please sign off your commits (assuming works are done by human) |
cyyever
force-pushed
the
fix/airconv-error-leaks
branch
8 times, most recently
from
July 26, 2026 00:42
abdd36b to
ccd2d75
Compare
Author
|
@3Shain Signed |
Owner
Is it possible to use a real name? |
cyyever
force-pushed
the
fix/airconv-error-leaks
branch
from
July 26, 2026 01:14
ccd2d75 to
62eff4f
Compare
Author
|
@3Shain Sure, I have resigned. |
Owner
|
Format your commit message and split into two by scope |
Signed-off-by: Yuanyuan Chen <cyyever@outlook.com>
Signed-off-by: Yuanyuan Chen <cyyever@outlook.com>
cyyever
force-pushed
the
fix/airconv-error-leaks
branch
from
July 26, 2026 07:09
62eff4f to
afb3c12
Compare
Author
|
fixed |
Owner
Have you ever checked existing commit messages on main branch... It should start with |
Owner
|
Why closed? Anyway thanks for spotting the leaks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three memory-safety fixes surfaced by a clang-tidy (
clang-analyzer) sweep:airconv/dxbc_converter.cpp—SM50ErrorInternalleaked on every successful compile. The sixSM50*entry pointsnew'd an error object at entry but only returned it via*ppErroron error paths, so it (and its LLVM buffer) leaked on success. Now held in astd::unique_ptr, released to the caller only on error.*ppErrorwrite.SM50InitializetreatsppError == NULLas legal (if (ppError) *ppError = nullptr;) but the error paths then wrote*ppErrorunconditionally, crashing such callers. All error paths now go through aset_error()helper that no-ops whenppErroris null.d3d11/d3d11_fence.cpp— fence leaked onQueryInterfacefailure.CreateFence/OpenSharedFencenew'd the impl (refcount 0) then returnedQueryInterface(...); a QI failure orphaned it. Now held inCom<>viaref().Each changed TU compiles clean.