D3D12.X: failed replacement allocation falls back to resetting a busy allocator #989

Open
opened 2026-11-26 04:39:22 +00:00 by github-bot · 0 comments
Owner

@⁠nova-aryan on GitHub · 2026-11-24 10:01 UTC · original

Source inspection on main 9aec53d: alloc_pool::title_reset returns None when GetDevice or CreateCommandAllocator fails while replacing a busy backing. real::alloc_reset treats None as permission to reset the original allocator. That is the allocator whose recordings the pool was keeping alive.

I will preserve the failure HRESULT as Some(hr), leave the current backing/recording associations unchanged, and add a synthetic COM regression covering both failure paths. This does not change the successful allocation path.

Microsoft documents allocation failure and the lifetime restriction on Reset. No claim that this explains the reported retail watchdog/null-write crash. Local build/test/game execution is disabled at the user's request; the patch will remain a draft pending validation.

**@⁠nova-aryan** on GitHub · 2026-11-24 10:01 UTC · [original](https://github.com/xcl-dev/xcl/issues/989) Source inspection on main `9aec53d`: `alloc_pool::title_reset` returns `None` when `GetDevice` or `CreateCommandAllocator` fails while replacing a busy backing. `real::alloc_reset` treats `None` as permission to reset the original allocator. That is the allocator whose recordings the pool was keeping alive. I will preserve the failure HRESULT as `Some(hr)`, leave the current backing/recording associations unchanged, and add a synthetic COM regression covering both failure paths. This does not change the successful allocation path. Microsoft documents [allocation failure](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12device-createcommandallocator) and [the lifetime restriction on Reset](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12commandallocator-reset). No claim that this explains the reported retail watchdog/null-write crash. Local build/test/game execution is disabled at the user's request; the patch will remain a draft pending validation.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:39:22 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.