D3D12.X: note_execute references its RTV resource before using it (#2381) #2510

Open
Anka-1623 wants to merge 1 commit from upstream-pr/2520 into main
Anka-1623 commented 2026-11-25 21:24:28 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Anka-1623 on 2026-11-25T21:24:28Z.


Fixes #2381.

note_execute (the PresentX fallback in present.rs) copies a resource pointer out of RTVS, drops the table's lock, and then calls into the resource: backbuffer_like(res) reads its desc through its vtable. It only takes its own reference several lines later, when the resource becomes the present candidate. note_rtv releases the table's reference every time it replaces or clears a handle, so on another thread it can take the count to zero between those two points, and note_execute then reads a freed COM object.

This takes the reference while the table is still locked, so note_rtv cannot release it first. The fallback only runs until the title's first PresentX.

What is in it

  • present.rs: new rtv_resource_addref(handle) looks the handle up and add_refs the resource under the RTVS lock. The caller releases it.
  • present.rs, note_execute: uses it instead of the bare lookup. The reference is released when the resource is not back-buffer-like, or when it is already the candidate; otherwise it becomes the candidate's reference (note_execute used to take that one itself, with an add_ref just before CANDIDATE.replace). The reference count ends up the same on every path; only the order changed. The cost is one extra AddRef/Release pair on the two paths that took none before.
  • present.rs, tests: rtv_resource_addref_holds_a_reference_of_its_own (deterministic: the reference outlives note_rtv clearing the handle and the title's own release) and rtv_resource_addref_never_returns_a_freed_resource (one thread keeps rewriting a handle with note_rtv, another calls the helper; a fake COM object records the release that takes it to zero).

Left alone on purpose (one problem per PR):

  • rtv_resource / rt0_resource also return bare pointers, but their other callers (real.rs, bind.rs) are the XCL_TRACE_FRAME diagnostics.
  • present_now reads CANDIDATE's resource the same way: it copies res out of the CANDIDATE lock and calls backbuffer_like(res) after the guard is gone, while note_execute can replace the candidate and release the old one. It looks like the same kind of window; I did not change or test it.

Tested

  • Type-check only, on Linux (Rust 1.100.0, x86_64-pc-windows-msvc target, nothing linked): cargo check --locked --target x86_64-pc-windows-msvc -p xcl --lib --tests passes on main (6d12f58) and on this branch, with the same 3 + 2 warnings and none in present.rs. A local shim stood in for lib.exe only so that libudis86-sys's build script could run; nothing in the repository changes for it.
  • A model of the race, not the repository's tests: I copied the exact RTVS / note_rtv / add_ref / release code and the test's fake COM object into a standalone program and ran it on Linux x86_64 (12 threads). With the old pattern (a bare pointer copied out of the table) the reader found an already-freed resource in 30 of 30 runs at the test's 20,000 rounds (888 to 1,587 times in each 200,000-round run). With rtv_resource_addref it found none in 5 runs of 200,000 rounds, and every resource was released to exactly zero. This only shows the test can fail and that the helper closes this window.
  • Reported by another contributor on e37abac (comment): RTX 3070 Laptop (driver 32.0.16.1714), i7-11800H, Windows 11 Pro 26300, cargo test -p xcl --lib present -- --test-threads=4: 11 passed, 0 failed, 0 ignored. That covers the 11 tests in present.rs, both new ones included. Not run by them: the full workspace suite and smoke.
  • cargo test --workspace: not run (XCL does not build or run on Linux).

Regression run
Not run: no Windows machine, GPU or title here (see Not tested).

Not tested

  • Anything on Windows: not built with MSVC, the new tests have not been run, cargo test --workspace has not been run, no GPU of any vendor, no retail title.
  • No scripts/smoke.ps1 run, so there are no Regression run blocks. This PR changes crates/xcl/src, so PR checks will fail until someone with a Windows + GPU + title setup adds them; that is why it is a draft. I did not write the blocks by hand.
  • The race itself was never seen in a real title. The evidence is the code path and the Linux model above.
  • Overlap with other open PRs: I read the diffs of the open PRs that touch present.rs for one that changes this lookup or note_execute's candidate update and found none. #1691 (adds forget_queue, which also locks CANDIDATE) and #1771 (RTVS entries of a released heap) change nearby code, so a rebase may be needed.

AI use

  • Claude Code (Claude Sonnet 5.5, claude-sonnet-5-5): checked that #2381 is still unfixed on main and not covered by an open PR, wrote the change and both tests, set up the type-check and the Linux model, and drafted this description. The change is small enough to review in a few minutes.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5499422311 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2520). Originally posted by [Anka-1623](https://github.com/Anka-1623) on 2026-11-25T21:24:28Z. --- Fixes #2381. `note_execute` (the PresentX fallback in `present.rs`) copies a resource pointer out of `RTVS`, drops the table's lock, and then calls into the resource: `backbuffer_like(res)` reads its desc through its vtable. It only takes its own reference several lines later, when the resource becomes the present candidate. `note_rtv` releases the table's reference every time it replaces or clears a handle, so on another thread it can take the count to zero between those two points, and `note_execute` then reads a freed COM object. This takes the reference while the table is still locked, so `note_rtv` cannot release it first. The fallback only runs until the title's first `PresentX`. **What is in it** - `present.rs`: new `rtv_resource_addref(handle)` looks the handle up and `add_ref`s the resource under the `RTVS` lock. The caller releases it. - `present.rs`, `note_execute`: uses it instead of the bare lookup. The reference is released when the resource is not back-buffer-like, or when it is already the candidate; otherwise it becomes the candidate's reference (`note_execute` used to take that one itself, with an `add_ref` just before `CANDIDATE.replace`). The reference count ends up the same on every path; only the order changed. The cost is one extra `AddRef`/`Release` pair on the two paths that took none before. - `present.rs`, tests: `rtv_resource_addref_holds_a_reference_of_its_own` (deterministic: the reference outlives `note_rtv` clearing the handle and the title's own release) and `rtv_resource_addref_never_returns_a_freed_resource` (one thread keeps rewriting a handle with `note_rtv`, another calls the helper; a fake COM object records the release that takes it to zero). Left alone on purpose (one problem per PR): - `rtv_resource` / `rt0_resource` also return bare pointers, but their other callers (`real.rs`, `bind.rs`) are the `XCL_TRACE_FRAME` diagnostics. - `present_now` reads `CANDIDATE`'s resource the same way: it copies `res` out of the `CANDIDATE` lock and calls `backbuffer_like(res)` after the guard is gone, while `note_execute` can `replace` the candidate and release the old one. It looks like the same kind of window; I did not change or test it. **Tested** - Type-check only, on Linux (Rust 1.100.0, `x86_64-pc-windows-msvc` target, nothing linked): `cargo check --locked --target x86_64-pc-windows-msvc -p xcl --lib --tests` passes on `main` (6d12f58) and on this branch, with the same 3 + 2 warnings and none in `present.rs`. A local shim stood in for `lib.exe` only so that `libudis86-sys`'s build script could run; nothing in the repository changes for it. - A model of the race, not the repository's tests: I copied the exact `RTVS` / `note_rtv` / `add_ref` / `release` code and the test's fake COM object into a standalone program and ran it on Linux x86_64 (12 threads). With the old pattern (a bare pointer copied out of the table) the reader found an already-freed resource in 30 of 30 runs at the test's 20,000 rounds (888 to 1,587 times in each 200,000-round run). With `rtv_resource_addref` it found none in 5 runs of 200,000 rounds, and every resource was released to exactly zero. This only shows the test can fail and that the helper closes this window. - Reported by another contributor on `e37abac` ([comment](https://github.com/xcl-dev/xcl/pull/2520#issuecomment-7176278561)): RTX 3070 Laptop (driver 32.0.16.1714), i7-11800H, Windows 11 Pro 26300, `cargo test -p xcl --lib present -- --test-threads=4`: 11 passed, 0 failed, 0 ignored. That covers the 11 tests in `present.rs`, both new ones included. Not run by them: the full workspace suite and smoke. - `cargo test --workspace`: not run (XCL does not build or run on Linux). **Regression run** Not run: no Windows machine, GPU or title here (see **Not tested**). **Not tested** - Anything on Windows: not built with MSVC, the new tests have not been run, `cargo test --workspace` has not been run, no GPU of any vendor, no retail title. - No `scripts/smoke.ps1` run, so there are no Regression run blocks. This PR changes `crates/xcl/src`, so `PR checks` will fail until someone with a Windows + GPU + title setup adds them; that is why it is a draft. I did not write the blocks by hand. - The race itself was never seen in a real title. The evidence is the code path and the Linux model above. - Overlap with other open PRs: I read the diffs of the open PRs that touch `present.rs` for one that changes this lookup or `note_execute`'s candidate update and found none. #1691 (adds `forget_queue`, which also locks `CANDIDATE`) and #1771 (`RTVS` entries of a released heap) change nearby code, so a rebase may be needed. **AI use** - Claude Code (Claude Sonnet 5.5, `claude-sonnet-5-5`): checked that #2381 is still unfixed on `main` and not covered by an open PR, wrote the change and both tests, set up the type-check and the Linux model, and drafted this description. The change is small enough to review in a few minutes. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
DavidM1911 commented 2026-11-25 22:06:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T21:42:22Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7175432929 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2520#issuecomment-7175432929). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T21:42:22Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
Anka-1623 commented 2026-11-25 23:09:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Anka-1623 on 2026-11-25T22:17:28Z.


A summary of what this PR does, what has been checked, and what is still open.

The problem (#2381)

In the PresentX fallback, note_execute looks up the resource of an RTV handle in RTVS, drops the table's lock, and then calls into the resource (backbuffer_like reads its desc through the vtable). It takes its own reference only later, when the resource becomes the present candidate. note_rtv releases the table's reference whenever it replaces or clears a handle. If that was the last reference and the release runs on another thread between the lookup and the call, note_execute reads a freed COM object.

The change

rtv_resource_addref does the lookup and the add_ref under the same RTVS lock, so the table cannot let go first. note_execute releases that reference where the resource does not become the candidate (not back-buffer-like, or already the candidate); otherwise it is the candidate's reference, as before. The net reference count is the same on every path. What differs is the order, and one extra AddRef/Release pair on the two paths that took none. In the "already the candidate" case the release runs under the CANDIDATE lock, but the candidate holds its own reference there, so it cannot be the last one.

What has been checked

  • The ordering is visible in the code on current main (present.rs, note_execute), and I searched the diffs of the open PRs that touch present.rs for changes to RTVS, note_rtv, note_execute and CANDIDATE: none changes this lookup.
  • cargo check --locked --target x86_64-pc-windows-msvc -p xcl --lib --tests passes with the same warnings as main (type-check only, run on Linux).
  • A standalone Linux model with the same RTVS / note_rtv / add_ref / release code and the test's fake COM object: the old pattern (a bare pointer out of the table) read an already-freed resource in 30 of 30 runs at the test's 20,000 rounds; rtv_resource_addref read none in 5 runs of 200,000 rounds, and every resource ended at exactly zero references.

What is an assumption, and has not been tested

  • That this window is reached in a real title. It follows from reading the code, as the issue report itself did; I have not seen it happen. It needs a second title thread to replace or clear the same RTV handle while note_execute is between the lookup and the call, and the fallback only runs until the title's first PresentX.
  • Everything on Windows: the two new tests have not been run, nor cargo test --workspace, nor scripts/smoke.ps1 on any title. The Linux model shows the race test can fail and that the helper closes this window in the model. It is not the repository's test run.

To move it forward

Someone with Windows, a GPU and a title can check it with:

cargo test -p xcl --lib rtv_resource_addref -- --nocapture
cargo test --workspace -- --test-threads=4
scripts/smoke.ps1 -Game <your game folder>      # on main, then on e37abac, same title, same time

To see the race test fail, comment out the add_ref(res); line in rtv_resource_addref and rerun the first command. Please name the commit (e37abac) in a report and paste the two xcl-smoke blocks under Regression run in the description or here. The PR stays a draft until those exist, and I will rebase if main moves.

Comment drafted with Claude Code (Claude Sonnet 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7176177056 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2520#issuecomment-7176177056). Originally posted by [Anka-1623](https://github.com/Anka-1623) on 2026-11-25T22:17:28Z. --- A summary of what this PR does, what has been checked, and what is still open. **The problem (#2381)** In the PresentX fallback, `note_execute` looks up the resource of an RTV handle in `RTVS`, drops the table's lock, and then calls into the resource (`backbuffer_like` reads its desc through the vtable). It takes its own reference only later, when the resource becomes the present candidate. `note_rtv` releases the table's reference whenever it replaces or clears a handle. If that was the last reference and the release runs on another thread between the lookup and the call, `note_execute` reads a freed COM object. **The change** `rtv_resource_addref` does the lookup and the `add_ref` under the same `RTVS` lock, so the table cannot let go first. `note_execute` releases that reference where the resource does not become the candidate (not back-buffer-like, or already the candidate); otherwise it is the candidate's reference, as before. The net reference count is the same on every path. What differs is the order, and one extra `AddRef`/`Release` pair on the two paths that took none. In the "already the candidate" case the release runs under the `CANDIDATE` lock, but the candidate holds its own reference there, so it cannot be the last one. **What has been checked** - The ordering is visible in the code on current `main` (`present.rs`, `note_execute`), and I searched the diffs of the open PRs that touch `present.rs` for changes to `RTVS`, `note_rtv`, `note_execute` and `CANDIDATE`: none changes this lookup. - `cargo check --locked --target x86_64-pc-windows-msvc -p xcl --lib --tests` passes with the same warnings as `main` (type-check only, run on Linux). - A standalone Linux model with the same `RTVS` / `note_rtv` / `add_ref` / `release` code and the test's fake COM object: the old pattern (a bare pointer out of the table) read an already-freed resource in 30 of 30 runs at the test's 20,000 rounds; `rtv_resource_addref` read none in 5 runs of 200,000 rounds, and every resource ended at exactly zero references. **What is an assumption, and has not been tested** - That this window is reached in a real title. It follows from reading the code, as the issue report itself did; I have not seen it happen. It needs a second title thread to replace or clear the same RTV handle while `note_execute` is between the lookup and the call, and the fallback only runs until the title's first `PresentX`. - Everything on Windows: the two new tests have not been run, nor `cargo test --workspace`, nor `scripts/smoke.ps1` on any title. The Linux model shows the race test can fail and that the helper closes this window in the model. It is not the repository's test run. **To move it forward** Someone with Windows, a GPU and a title can check it with: ``` cargo test -p xcl --lib rtv_resource_addref -- --nocapture cargo test --workspace -- --test-threads=4 scripts/smoke.ps1 -Game <your game folder> # on main, then on e37abac, same title, same time ``` To see the race test fail, comment out the `add_ref(res);` line in `rtv_resource_addref` and rerun the first command. Please name the commit (`e37abac`) in a report and paste the two `xcl-smoke` blocks under **Regression run** in the description or here. The PR stays a draft until those exist, and I will rebase if `main` moves. *Comment drafted with Claude Code (Claude Sonnet 5.5).*
ahmetbagci8 commented 2026-11-25 23:09:07 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ahmetbagci8 on 2026-11-25T22:22:19Z.


Tested

  • Commit: e37abacbfa60c39bdb60912659c8c999762a8cf2
  • Hardware / OS: Intel Core i7-11800H, NVIDIA GeForce RTX 3070 Laptop GPU (driver 32.0.16.1714), Windows 11 Pro (Build 26300), DXC v1.9.2609
  • cargo test -j 2 -p xcl --lib present -- --test-threads=4: 11 passed; 0 failed; 0 ignored (0.07s)

Not tested

  • Full workspace suite and scripts/smoke.ps1 (no unpacked title locally).

AI use

  • Antigravity harness (Gemini 4 Neon) ran the targeted unit tests on this commit and drafted this report; the author reviewed it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7176278561 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2520#issuecomment-7176278561). Originally posted by [ahmetbagci8](https://github.com/ahmetbagci8) on 2026-11-25T22:22:19Z. --- ### Tested - **Commit:** `e37abacbfa60c39bdb60912659c8c999762a8cf2` - **Hardware / OS:** Intel Core i7-11800H, NVIDIA GeForce RTX 3070 Laptop GPU (driver `32.0.16.1714`), Windows 11 Pro (Build 26300), DXC `v1.9.2609` - `cargo test -j 2 -p xcl --lib present -- --test-threads=4`: `11 passed; 0 failed; 0 ignored (0.07s)` ### Not tested - Full workspace suite and `scripts/smoke.ps1` (no unpacked title locally). ### AI use - Antigravity harness (Gemini 4 Neon) ran the targeted unit tests on this commit and drafted this report; the author reviewed it before posting.
Anka-1623 commented 2026-11-25 23:09:09 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Anka-1623 on 2026-11-25T22:29:14Z.


Thanks for running it on e37abac. The present filter matches the 11 tests in present.rs, so that includes the two new ones (rtv_resource_addref_holds_a_reference_of_its_own and rtv_resource_addref_never_returns_a_freed_resource). I'll add your run to Tested with a link to this comment.

Still open: cargo test --workspace -- --test-threads=4 and the two xcl-smoke blocks (main and e37abac, same title, same time). The PR stays a draft until those are in.

<!-- greyfinch-sync:ivall/xcl:comment:7176421868 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2520#issuecomment-7176421868). Originally posted by [Anka-1623](https://github.com/Anka-1623) on 2026-11-25T22:29:14Z. --- Thanks for running it on `e37abac`. The `present` filter matches the 11 tests in `present.rs`, so that includes the two new ones (`rtv_resource_addref_holds_a_reference_of_its_own` and `rtv_resource_addref_never_returns_a_freed_resource`). I'll add your run to **Tested** with a link to this comment. Still open: `cargo test --workspace -- --test-threads=4` and the two `xcl-smoke` blocks (`main` and `e37abac`, same title, same time). The PR stays a draft until those are in.
SlopTart commented 2026-11-25 23:09:18 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-25T22:49:51Z.


Tested: current PR head merged onto current origin/main (clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo target x86_64-pc-windows-gnu run under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29).

gpu_ suite (cold cache): 164 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, promoted-UAV-clear driver gap, PR #2490); none caused by this PR.
Targeted run of rtv_resource_addref_holds_a_reference_of_its_own and rtv_resource_addref_never_returns_a_freed_resource: 2 passed.

Not tested: retail titles (no title data on this lane, counts only).

AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7176836714 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2520#issuecomment-7176836714). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-25T22:49:51Z. --- **Tested**: current PR head merged onto current `origin/main` (clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo target `x86_64-pc-windows-gnu` run under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29). `gpu_` suite (cold cache): 164 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, promoted-UAV-clear driver gap, PR #2490); none caused by this PR. Targeted run of `rtv_resource_addref_holds_a_reference_of_its_own` and `rtv_resource_addref_never_returns_a_freed_resource`: 2 passed. **Not tested**: retail titles (no title data on this lane, counts only). **AI use**: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.
Anka-1623 commented 2026-11-25 23:09:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Anka-1623 on 2026-11-25T22:57:18Z.


Thanks, good to see both new tests pass under Wine too. I'm keeping the description's Tested section to runs on the supported setup (Windows, x86_64-pc-windows-msvc) that name the exact commit, so I'll leave this one here in the thread as an extra data point.

<!-- greyfinch-sync:ivall/xcl:comment:7176978357 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2520#issuecomment-7176978357). Originally posted by [Anka-1623](https://github.com/Anka-1623) on 2026-11-25T22:57:18Z. --- Thanks, good to see both new tests pass under Wine too. I'm keeping the description's **Tested** section to runs on the supported setup (Windows, `x86_64-pc-windows-msvc`) that name the exact commit, so I'll leave this one here in the thread as an extra data point.
github-actions[bot] commented 2026-11-29 20:43:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T20:43:39Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7262309723 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2520#issuecomment-7262309723). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T20:43:39Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 08:15:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:15:21Z.


Triage (#1607) – head e37abac

No open or merged PR makes the same change. Main's present.rs note_execute still copies the pointer out of RTVS and calls backbuffer_like(res) before taking a reference. Meanwhile note_rtv can release the table's reference on another thread.
No problems found in the diff. The reference count is balanced on all three paths (not back-buffer-like, already the candidate, new candidate).
The draft has no Windows test run and no smoke blocks yet, so PR checks fails.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7305076788 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2520#issuecomment-7305076788). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T08:15:21Z. --- **Triage (#1607)** – head e37abac No open or merged PR makes the same change. Main's `present.rs` `note_execute` still copies the pointer out of `RTVS` and calls `backbuffer_like(res)` before taking a reference. Meanwhile `note_rtv` can release the table's reference on another thread. No problems found in the diff. The reference count is balanced on all three paths (not back-buffer-like, already the candidate, new candidate). The draft has no Windows test run and no smoke blocks yet, so `PR checks` fails. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2520:upstream-pr/2520'
git switch 'upstream-pr/2520'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2520'
git switch 'upstream-pr/2520'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2520'
git switch 'upstream-pr/2520'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2520'
git switch 'main'
git merge --squash 'upstream-pr/2520'
git switch 'main'
git merge --ff-only 'upstream-pr/2520'
git switch 'main'
git merge 'upstream-pr/2520'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!2510
No description provided.