Fix two sources of memory corruptions - #106
Merged
Merged
Conversation
- DX12 Tr2TextureAL m_readScratch could be deleted before the read operation finishes for asynchronous reads - Tr2BindingPoint may write to an invalid destination if the destination was destroyed after the binding was created
filipppavlov
force-pushed
the
v6-memory-corruption
branch
from
September 28, 2026 13:32
f79bcfb to
672ac25
Compare
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
A moderate stale-binding validity issue remains in Tr2BindingPoint.
Review effort: Lite
Findings: None
What changed in this PR
Fixes memory-corruption risks from asynchronous DX12 readbacks and stale binding destinations.
Changes:
- Defers readback scratch-resource release until GPU work completes.
- Validates binding targets before access.
The binding validity check still permits stale path bindings in some cases and requires correction.
| File | Summary |
|---|---|
trinityal/dx12/Tr2TextureALDx12.cpp |
Defers readback scratch-resource destruction. |
trinity/Controllers/Tr2BindingPoint.cpp |
Validates binding targets before access; stale path bindings remain unresolved. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
ccp-intern
approved these changes
Sep 28, 2026
CCPNobody
approved these changes
Sep 28, 2026
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.
https://fenriscreations.atlassian.net/browse/PLAT-12141