D3D12.X: a list vtable at a reused heap address gets its own methods #2593

Open
github-bot wants to merge 1 commit from github-bot/gh-2593 into main AGit
Owner

@⁠SergeAx on GitHub · 2026-11-26 00:53 UTC · original
SergeAx:d3d12x-heap-vtable-classes → main · +81 −3 · 1 files · 1 commits · open

Fixes #2588.

With the Agility SDK 1.620, an open command list's vtable is in heap memory and goes with the list. real::class_for cached the extended vtable by the runtime vtable's address and copied the runtime's methods only once, so a direct list whose open vtable came where a released compute list's had been called the compute list's methods: its ClearDepthStencilView made Close fail with E_FAIL. That is the parallel-only failure of vram::tests::d32s8_targets_take_their_own_size_of_video_memory (#42).

What is in it

  • crates/xcl/src/hle/d3d12x/real.rs: a Class of a vtable outside any module keeps the methods it copied (copied), and class_for takes it only while they are still the ones at that address. Vtables in a module's image are looked up as before.
  • crates/xcl/src/hle/d3d12x/real.rs (class_tests): a_direct_list_at_a_released_compute_lists_vtable_records_with_its_own_methods.

Tested

  • NVIDIA GeForce RTX 5080, driver 621.14; AMD Ryzen 5 3500X; Windows 10 Pro 22H2 (19045.6466), D3D12 Agility SDK 1.620.2; Rust 1.100.0, debug
  • cargo test --workspace --no-fail-fast -- --test-threads=4 at 52c0802f: 1426 passed, 4 failed, 47 ignored. The 4 are #1905 (fuzz_validate_and_gpu_0.._3, seeds 70, 545, 1019 and 1507), as on main 6d12f58 (#42).
  • SKIPPED (25): 21 × no wave64; 3 × wave32 per-lane form refused (V_MUL_F16, V_PK_MUL_F16, V_CVT_F16_F32); heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows
  • The new test fails in 5 runs out of 5 with the lookup ignoring copied, and passes in 5 out of 5 with this change.
  • The lib tests run as --test-threads=4 hle::d3d12x hle::xgameruntime: the D32S8 test failed in 2–5 runs out of 10 on 6d12f58, and in 0 out of 12 with this change.

Regression run

main:

xcl-smoke v1
commit: 08db8020d323bf478964fcc586152cce54959cfc
gpu: NVIDIA GeForce RTX 5080
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1332 (PresentX 1332)
presents per 2 s (last 3): 30 50 20
device removals: 0
crashes: 0
peak commit: 18965 MB

this PR:

xcl-smoke v1
commit: 52c0802fb8f13c4efef3b82a14bc34fd338ae7a6
gpu: NVIDIA GeForce RTX 5080
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1307 (PresentX 1307)
presents per 2 s (last 3): 44 41 10
device removals: 0
crashes: 0
peak commit: 19621 MB

Not tested

  • AMD and Intel GPUs, Windows 11, and the inbox D3D12 runtime without the Agility SDK (its vtables are in D3D12Core.dll, which this change looks up as before)
  • On AMD the new test does not reach the fix: on an RX 9070 XT (Windows 11) it was SKIPPED in 3 runs out of 3, as no direct list got a released compute list's vtable address in its 200 tries (report in the comments). On the RTX 5080 here it reaches it (above)
  • Whether it also covers the other parallel-only failures reported in #42 (list_x::tests::a_reset_while_the_last_submit_runs_records_on_another_pc_list)

AI use

  • Claude Code (Claude Opus 5.5) found the cause, wrote the change and the test, ran the tests and measurements, and wrote this description.
**@⁠SergeAx** on GitHub · 2026-11-26 00:53 UTC · [original](https://github.com/xcl-dev/xcl/pull/2593) `SergeAx:d3d12x-heap-vtable-classes` → `main` · +81 −3 · 1 files · 1 commits · open Fixes #2588. With the Agility SDK 1.620, an open command list's vtable is in heap memory and goes with the list. `real::class_for` cached the extended vtable by the runtime vtable's address and copied the runtime's methods only once, so a direct list whose open vtable came where a released compute list's had been called the compute list's methods: its `ClearDepthStencilView` made `Close` fail with `E_FAIL`. That is the parallel-only failure of `vram::tests::d32s8_targets_take_their_own_size_of_video_memory` (#42). **What is in it** - `crates/xcl/src/hle/d3d12x/real.rs`: a `Class` of a vtable outside any module keeps the methods it copied (`copied`), and `class_for` takes it only while they are still the ones at that address. Vtables in a module's image are looked up as before. - `crates/xcl/src/hle/d3d12x/real.rs` (`class_tests`): `a_direct_list_at_a_released_compute_lists_vtable_records_with_its_own_methods`. **Tested** - NVIDIA GeForce RTX 5080, driver 621.14; AMD Ryzen 5 3500X; Windows 10 Pro 22H2 (19045.6466), D3D12 Agility SDK 1.620.2; Rust 1.100.0, debug - `cargo test --workspace --no-fail-fast -- --test-threads=4` at `52c0802f`: 1426 passed, 4 failed, 47 ignored. The 4 are #1905 (`fuzz_validate_and_gpu_0`..`_3`, seeds 70, 545, 1019 and 1507), as on main `6d12f58` (#42). - SKIPPED (25): 21 × no wave64; 3 × wave32 per-lane form refused (`V_MUL_F16`, `V_PK_MUL_F16`, `V_CVT_F16_F32`); `heap_window_out_of_memory_falls_back_to_the_switch_form`: no heap windows - The new test fails in 5 runs out of 5 with the lookup ignoring `copied`, and passes in 5 out of 5 with this change. - The lib tests run as `--test-threads=4 hle::d3d12x hle::xgameruntime`: the D32S8 test failed in 2–5 runs out of 10 on `6d12f58`, and in 0 out of 12 with this change. **Regression run** main: ``` xcl-smoke v1 commit: 08db8020d323bf478964fcc586152cce54959cfc gpu: NVIDIA GeForce RTX 5080 title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 1332 (PresentX 1332) presents per 2 s (last 3): 30 50 20 device removals: 0 crashes: 0 peak commit: 18965 MB ``` this PR: ``` xcl-smoke v1 commit: 52c0802fb8f13c4efef3b82a14bc34fd338ae7a6 gpu: NVIDIA GeForce RTX 5080 title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 1307 (PresentX 1307) presents per 2 s (last 3): 44 41 10 device removals: 0 crashes: 0 peak commit: 19621 MB ``` **Not tested** - AMD and Intel GPUs, Windows 11, and the inbox D3D12 runtime without the Agility SDK (its vtables are in `D3D12Core.dll`, which this change looks up as before) - On AMD the new test does not reach the fix: on an RX 9070 XT (Windows 11) it was SKIPPED in 3 runs out of 3, as no direct list got a released compute list's vtable address in its 200 tries (report in the comments). On the RTX 5080 here it reaches it (above) - Whether it also covers the other parallel-only failures reported in #42 (`list_x::tests::a_reset_while_the_last_submit_runs_records_on_another_pc_list`) **AI use** - Claude Code (Claude Opus 5.5) found the cause, wrote the change and the test, ran the tests and measurements, and wrote this description.
Agility SDK 1.620 keeps an open command list's vtable in heap memory
that is freed with the list. class_for cached the extended vtable by
the runtime vtable's address and copied the runtime's methods only the
first time, so a direct list whose open vtable came where a released
compute list's had been called the compute list's methods: its
ClearDepthStencilView made Close fail with E_FAIL. That is how vram's
D32S8 test failed in parallel runs (2-5 in 10 with hle::d3d12x and one
more module on 4 threads, RTX 5080; 0 in 12 with this change).

A class of a vtable outside any module now keeps the methods it copied
and is taken only while they are still the ones there.

Fixes #2588
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:34:34 +00:00
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 01:09 UTC · original

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

  • cargo test -p xcl --lib: all passed, 0 failed, 26 ignored.

Thanks!

— Devin

**@⁠DavidM1911** on GitHub · 2026-11-26 01:09 UTC · [original](https://github.com/xcl-dev/xcl/pull/2593#issuecomment-7179496717) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 26 ignored. Thanks! — Devin
Author
Owner

@⁠DarkPanda69 on GitHub · 2026-11-26 01:11 UTC · original

AMD run (listed as untested), on Windows 11 too: on an RX 9070 XT the new test skips. The reuse it waits for did not happen in 3 runs, so on this machine it passes without exercising the fix.

Head 52c0802 applied on main b49be18, debug, Windows 11 Pro 26200, RX 9070 XT (RDNA4, driver 32.0.32029.2010). The test takes the default adapter (create_device(None, ..)), which is the RX 9070 XT on this machine.

cargo test -p xcl --lib -- a_direct_list_at_a_released_compute_lists_vtable --nocapture, 3 times, each:

SKIPPED hle::d3d12x::real::class_tests::a_direct_list_at_a_released_compute_lists_vtable_records_with_its_own_methods: 
no direct list got a released compute list's vtable
test ... ok

So in the test's 200 tries, no direct list landed on a released compute list's vtable address here. Your report's SKIPPED list doesn't include this test, so it did run on the RTX 5080. Whether the address reuse is rarer here because of the GPU driver, Windows 11 or the heap was not looked into. This run also says nothing about whether the fix is right on AMD; it only shows the test does not reach it on this machine.

Not tested: the machine's RTX 3060 (the test always uses the default adapter), Intel, a title.
AI use: Claude Code (Claude Opus 5.5) ran the test on this machine and wrote this report.

**@⁠DarkPanda69** on GitHub · 2026-11-26 01:11 UTC · [original](https://github.com/xcl-dev/xcl/pull/2593#issuecomment-7179517525) AMD run (listed as untested), on Windows 11 too: on an RX 9070 XT the new test skips. The reuse it waits for did not happen in 3 runs, so on this machine it passes without exercising the fix. Head `52c0802` applied on `main` `b49be18`, debug, Windows 11 Pro 26200, RX 9070 XT (RDNA4, driver 32.0.32029.2010). The test takes the default adapter (`create_device(None, ..)`), which is the RX 9070 XT on this machine. `cargo test -p xcl --lib -- a_direct_list_at_a_released_compute_lists_vtable --nocapture`, 3 times, each: ``` SKIPPED hle::d3d12x::real::class_tests::a_direct_list_at_a_released_compute_lists_vtable_records_with_its_own_methods: no direct list got a released compute list's vtable test ... ok ``` So in the test's 200 tries, no direct list landed on a released compute list's vtable address here. Your report's SKIPPED list doesn't include this test, so it did run on the RTX 5080. Whether the address reuse is rarer here because of the GPU driver, Windows 11 or the heap was not looked into. This run also says nothing about whether the fix is right on AMD; it only shows the test does not reach it on this machine. Not tested: the machine's RTX 3060 (the test always uses the default adapter), Intel, a title. AI use: Claude Code (Claude Opus 5.5) ran the test on this machine and wrote this report.
Author
Owner

@⁠mokkamokacaffe on GitHub · 2026-11-26 01:29 UTC · original

I found an additional cache-boundary case in the current implementation.

same_methods walks the historical copied.len() before deriving the replacement vtable’s current interface and scanned length. A shorter replacement can therefore be read using the older length, while a longer table sharing the old prefix can reuse stale internal method handling.

I prepared a focused follow-up at ea5a19a. It derives the live table shape first, compares the complete snapshot and metadata, preserves the image-backed fast path, and adds CPU-only coverage for:

  • Shorter replacement tables
  • Longer replacement tables
  • Changes in internal slots
  • A → B → A historical-generation reuse

Tested

  • Windows no-GPU CI on the combined tree: 1430 passed, 0 failed, 47 ignored
  • heap_classes_match_only_the_same_shape_and_methods: passed
  • git diff --check: passed

Not tested

  • The Agility SDK 1.620 heap-reuse regression skipped because the CI runner did not expose a changed heap vtable.
  • Exact-head GPU workspace tests
  • AMD, NVIDIA, or Intel hardware
  • Paired retail-title xcl-smoke runs

Exact-head GPU and smoke runs remain required after this change is folded into #2593.

AI use

  • OpenAI Codex with GPT-5.6 Sol reviewed the change, implemented the follow-up, and ran the source and Windows CI checks.
**@⁠mokkamokacaffe** on GitHub · 2026-11-26 01:29 UTC · [original](https://github.com/xcl-dev/xcl/pull/2593#issuecomment-7179829473) I found an additional cache-boundary case in the current implementation. `same_methods` walks the historical `copied.len()` before deriving the replacement vtable’s current interface and scanned length. A shorter replacement can therefore be read using the older length, while a longer table sharing the old prefix can reuse stale internal method handling. I prepared a focused follow-up at [`ea5a19a`](https://github.com/mokkamokacaffe/xcl/commit/ea5a19a301c272ae65d9f4127f6d551c42712962). It derives the live table shape first, compares the complete snapshot and metadata, preserves the image-backed fast path, and adds CPU-only coverage for: - Shorter replacement tables - Longer replacement tables - Changes in internal slots - A → B → A historical-generation reuse **Tested** - Windows no-GPU CI on the combined tree: **1430 passed, 0 failed, 47 ignored** - `heap_classes_match_only_the_same_shape_and_methods`: passed - `git diff --check`: passed **Not tested** - The Agility SDK 1.620 heap-reuse regression skipped because the CI runner did not expose a changed heap vtable. - Exact-head GPU workspace tests - AMD, NVIDIA, or Intel hardware - Paired retail-title `xcl-smoke` runs Exact-head GPU and smoke runs remain required after this change is folded into #2593. **AI use** - OpenAI Codex with GPT-5.6 Sol reviewed the change, implemented the follow-up, and ran the source and Windows CI checks.
Author
Owner

@⁠SlopTart on GitHub · 2026-11-26 05:13 UTC · original

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): 165 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 a_direct_list_at_a_released_compute_lists_vtable_records_with_its_own_methods: 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.

**@⁠SlopTart** on GitHub · 2026-11-26 05:13 UTC · [original](https://github.com/xcl-dev/xcl/pull/2593#issuecomment-7183293127) **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): 165 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 `a_direct_list_at_a_released_compute_lists_vtable_records_with_its_own_methods`: 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.
Author
Owner

@⁠SergeAx on GitHub · 2026-11-26 05:31 UTC · original

@⁠mokkamokacaffe thanks for looking. I read class_for at 52c0802 and ea5a19a, and I don't think the extra check is needed:

  • A shorter replacement. same_methods reads copied.len() words at orig: the old class's scanned, the same words its own scan read at that address. A class is reused only when all of those words equal its snapshot; a fresh scan would then find the same words in the same module and stop no earlier, so the table cannot come out shorter.
  • A longer replacement. A fresh scan comes out longer only if the word at scanned, where the old scan stopped, now points into the same module. With the first scanned words identical, it is the same runtime class, whose table length is fixed: a word after it is heap memory past the vtable, not a method. The runtime calls only its own methods, all among the compared words, and for the title such a slot answers the same either way: the guard of an internal slot answers a title call as the stub does (logged, 0), and console_slots / console_remap give it the same handler in both cases.
  • A → B → A. Every class stays in CLASSES and the lookup matches by methods, so A's class is found again when A's table comes back.

ea5a19a runs the QI probe and the scan on every adopt of an object with a heap vtable before matching (every command list on Agility 1.620), where this PR compares scanned words. Its new test covers the new matching_class helper; it does not show a case where this PR's lookup returns the wrong class. So I'm keeping #2593 as it is.

AI use: Claude Code (Claude Opus 5.5) read both commits and wrote this reply.

**@⁠SergeAx** on GitHub · 2026-11-26 05:31 UTC · [original](https://github.com/xcl-dev/xcl/pull/2593#issuecomment-7183556168) @⁠mokkamokacaffe thanks for looking. I read `class_for` at `52c0802` and `ea5a19a`, and I don't think the extra check is needed: - **A shorter replacement.** `same_methods` reads `copied.len()` words at `orig`: the old class's `scanned`, the same words its own scan read at that address. A class is reused only when all of those words equal its snapshot; a fresh scan would then find the same words in the same module and stop no earlier, so the table cannot come out shorter. - **A longer replacement.** A fresh scan comes out longer only if the word at `scanned`, where the old scan stopped, now points into the same module. With the first `scanned` words identical, it is the same runtime class, whose table length is fixed: a word after it is heap memory past the vtable, not a method. The runtime calls only its own methods, all among the compared words, and for the title such a slot answers the same either way: the guard of an internal slot answers a title call as the stub does (logged, 0), and `console_slots` / `console_remap` give it the same handler in both cases. - **A → B → A.** Every class stays in `CLASSES` and the lookup matches by methods, so A's class is found again when A's table comes back. `ea5a19a` runs the QI probe and the scan on every adopt of an object with a heap vtable before matching (every command list on Agility 1.620), where this PR compares `scanned` words. Its new test covers the new `matching_class` helper; it does not show a case where this PR's lookup returns the wrong class. So I'm keeping #2593 as it is. AI use: Claude Code (Claude Opus 5.5) read both commits and wrote this reply.
Author
Owner

@⁠upipibi on GitHub · 2026-11-26 06:48 UTC · original

NVIDIA test report for 52c0802: RTX 3070 8 GB (Ampere, driver 616.56), Windows 11 26100, Rust 1.100.0, debug.

  • a_direct_list_at_a_released_compute_lists_vtable_records_with_its_own_methods, --exact --test-threads=1 --nocapture, 5 runs: 5 passed; the reuse happened (no SKIPPED line) in 0 of 5, so it skipped as on the RX 9070 XT. The cause here is the D3D12 runtime, not the driver: with no Agility SDK found, create_device used the inbox D3D12Core.dll 10.0.26100.9549, whose command list vtables are in the DLL image (PC vtable D3D12Core.dll+0x30ed90 / +0x30e830). Compute and direct lists then have different static vtables, and copied is never set.
  • The same command with XCL_D3D12_DIR set to the Agility SDK 1.620.2 (NuGet Microsoft.Direct3D.D3D12 1.620.2), 5 runs: 5 passed; the list vtables were heap addresses, and the reuse happened (no SKIPPED line) in 4 of 5, so the fix is exercised on this driver. With the lookup changed to ignore copied (local edit, Agility 1.620.2), it failed 5 of 5: ClearDepthStencilView of a direct list at a compute list's vtable 0x... failed its Close.
  • hle::d3d12x::real:: at default threads, inbox runtime, 3 runs: 60 passed, 0 failed each time; the new test SKIPPED in all 3.
  • cargo test -p xcl --lib -- --skip hle::xaudio2 --test-threads=4 (the hle::xaudio2 tests hang on this machine, on main too), inbox runtime: 1296 passed, 0 failed, 27 ignored; 26 SKIPPED lines (21 × no wave64; 3 × wave32 per-lane form refused: V_MUL_F16, V_PK_MUL_F16, V_CVT_F16_F32; pso_measurement_compiles_an_exact_synthetic_record: driver cache needs Developer Mode; and the new test).
    The RX 9070 XT report doesn't say which D3D12 runtime it loaded; if it was the inbox one, its skip has the same cause, and a run with XCL_D3D12_DIR would show whether AMD reuses the address.
    Lib tests only; no title run.
    AI-assisted (Claude Code, Claude Opus 5.5).
**@⁠upipibi** on GitHub · 2026-11-26 06:48 UTC · [original](https://github.com/xcl-dev/xcl/pull/2593#issuecomment-7184805638) NVIDIA test report for `52c0802`: RTX 3070 8 GB (Ampere, driver 616.56), Windows 11 26100, Rust 1.100.0, debug. - `a_direct_list_at_a_released_compute_lists_vtable_records_with_its_own_methods`, `--exact --test-threads=1 --nocapture`, 5 runs: 5 passed; the reuse happened (no SKIPPED line) in 0 of 5, so it skipped as on the RX 9070 XT. The cause here is the D3D12 runtime, not the driver: with no Agility SDK found, `create_device` used the inbox `D3D12Core.dll` 10.0.26100.9549, whose command list vtables are in the DLL image (`PC vtable D3D12Core.dll+0x30ed90` / `+0x30e830`). Compute and direct lists then have different static vtables, and `copied` is never set. - The same command with `XCL_D3D12_DIR` set to the Agility SDK 1.620.2 (NuGet `Microsoft.Direct3D.D3D12` 1.620.2), 5 runs: 5 passed; the list vtables were heap addresses, and the reuse happened (no SKIPPED line) in 4 of 5, so the fix is exercised on this driver. With the lookup changed to ignore `copied` (local edit, Agility 1.620.2), it failed 5 of 5: `ClearDepthStencilView of a direct list at a compute list's vtable 0x... failed its Close`. - `hle::d3d12x::real::` at default threads, inbox runtime, 3 runs: 60 passed, 0 failed each time; the new test SKIPPED in all 3. - `cargo test -p xcl --lib -- --skip hle::xaudio2 --test-threads=4` (the `hle::xaudio2` tests hang on this machine, on `main` too), inbox runtime: 1296 passed, 0 failed, 27 ignored; 26 SKIPPED lines (21 × no wave64; 3 × wave32 per-lane form refused: `V_MUL_F16`, `V_PK_MUL_F16`, `V_CVT_F16_F32`; `pso_measurement_compiles_an_exact_synthetic_record`: driver cache needs Developer Mode; and the new test). The RX 9070 XT report doesn't say which D3D12 runtime it loaded; if it was the inbox one, its skip has the same cause, and a run with `XCL_D3D12_DIR` would show whether AMD reuses the address. Lib tests only; no title run. AI-assisted (Claude Code, Claude Opus 5.5).
Author
Owner

@⁠mokkamokacaffe on GitHub · 2026-11-26 11:35 UTC · original

@⁠SergeAx Thanks for the detailed correction. I re-read class_for at 52c0802 alongside ea5a19a, and I agree that my follow-up did not establish a failing case in this PR:

  • A heap-table cache hit already requires every method in the cached scanned snapshot to match.
  • A → B → A reuse is handled because the prior A class remains in CLASSES and is selected by its method snapshot.
  • My added unit test exercised the stricter matching_class policy itself; it did not reproduce an incorrect class selection by the existing lookup.
  • Re-running QueryInterface and the vtable scan on every heap-table adoption would add work on the Agility path without a demonstrated correctness benefit.

I therefore withdraw the ea5a19a suggestion and support keeping #2593 scoped as it is. The later Agility 1.620.2 NVIDIA report also gives the important missing distinction: the regression is exercised with heap-backed vtables, while inbox-runtime/image-backed tables legitimately skip it.

Thanks for checking the proposed follow-up closely.

AI use

  • OpenAI Codex (GPT-6.2 Astra Ultra) re-read both implementations, the discussion, and the subsequent hardware reports, then drafted this reply.
**@⁠mokkamokacaffe** on GitHub · 2026-11-26 11:35 UTC · [original](https://github.com/xcl-dev/xcl/pull/2593#issuecomment-7190926571) @⁠SergeAx Thanks for the detailed correction. I re-read `class_for` at `52c0802` alongside `ea5a19a`, and I agree that my follow-up did not establish a failing case in this PR: - A heap-table cache hit already requires every method in the cached `scanned` snapshot to match. - A → B → A reuse is handled because the prior A class remains in `CLASSES` and is selected by its method snapshot. - My added unit test exercised the stricter `matching_class` policy itself; it did not reproduce an incorrect class selection by the existing lookup. - Re-running QueryInterface and the vtable scan on every heap-table adoption would add work on the Agility path without a demonstrated correctness benefit. I therefore withdraw the `ea5a19a` suggestion and support keeping #2593 scoped as it is. The later Agility 1.620.2 NVIDIA report also gives the important missing distinction: the regression is exercised with heap-backed vtables, while inbox-runtime/image-backed tables legitimately skip it. Thanks for checking the proposed follow-up closely. **AI use** - OpenAI Codex (GPT-6.2 Astra Ultra) re-read both implementations, the discussion, and the subsequent hardware reports, then drafted this reply.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2593/head:github-bot/gh-2593'
git switch 'github-bot/gh-2593'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2593'
git switch 'github-bot/gh-2593'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2593'
git switch 'github-bot/gh-2593'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2593'
git switch 'main'
git merge --squash 'github-bot/gh-2593'
git switch 'main'
git merge --ff-only 'github-bot/gh-2593'
git switch 'main'
git merge 'github-bot/gh-2593'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.