Sitelet https://github.com/carbonengine/trinity/pull/106
Skip to content

Fix two sources of memory corruptions - #106

Merged
filipppavlov merged 1 commit into
mainfrom
v6-memory-corruption
Sep 28, 2026
Merged

filipppavlov merged 1 commit into
mainfrom
v6-memory-corruption

Conversation

@filipppavlov

Copy link
Copy Markdown
Member
  • 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

https://fenriscreations.atlassian.net/browse/PLAT-12141

Copilot AI lite review requested due to automatic review settings September 28, 2026 13:30
- 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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@filipppavlov
filipppavlov merged commit 413a7e2 into main Sep 28, 2026
2 of 22 checks passed
@filipppavlov
filipppavlov deleted the v6-memory-corruption branch September 28, 2026 13:40
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.

4 participants