Skip to content

Release buffers after fallback initialization failure - #1087

Merged
NotRexed merged 3 commits into
NotRexed:mainfrom
monsterlag:fix/fallback-buffer-allocation-cleanup
Nov 10, 2026
Merged

NotRexed merged 3 commits into
NotRexed:mainfrom
monsterlag:fix/fallback-buffer-allocation-cleanup

Conversation

@monsterlag

@monsterlag monsterlag commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Fallback initialization retained confirmed allocations when payload creation failed or a required device address was zero. The failed entry was already marked tried, so those allocations could not be reused.

Release only confirmed, unpublished allocations on these failures, clear their handles/addresses, and reject a zero required task-payload address. Successful initialization/reuse and existing no-retry behavior remain unchanged.

The refresh retains upstream build/render behavior and its TLS_OBJECT ownership change. The fixture now extracts the actual TLS ownership helpers and accesses the production fallback_buffers() map; both automatic-runner registrations are preserved.

Validation:

  • Exact current main 7dbdcdc: the refreshed nine-case fixture fails five cases and passes four controls. The former fixture also reproduces the reviewer’s StopIteration extraction failure.
  • Fixed source: all nine authored cases pass with Windows LLVM-MinGW and Linux GCC. These cover poisoned failed-allocator outputs, partial allocations, zero required addresses, successful reuse, and program isolation.
  • Targeted strict runner: fallback cleanup and TLS ownership checks pass on both platforms (2 passed, 0 failed, 0 skipped each; jobs=1).

Refs #1072. This fixes a source-proven failure-path leak; it does not establish that report’s RAM-growth or RADV-crash cause. No real Vulkan allocation, GPU/game run, full renderer build, or in-flight resource-retirement change was tested. Shared-buffer work such as #1023 remains separate.

All eight hosted validation checks pass on current head f2d1fc5; release publishing is skipped for the PR.

monsterlag and others added 2 commits November 9, 2026 05:41
Free only confirmed unpublished allocations after payload creation failure or a zero required device address. Preserve successful reuse and the existing tried/no-retry behavior.

Exercise the actual production function with authored allocation/BDA failures and register its portable regression.

Assisted-by: OpenAI Codex
Co-Authored-By: OpenAI Codex <noreply@openai.com>
Preserve both source-check registrations and extract the current production TLS ownership helper without changing the nine allocation-failure assertions.
@NotRexed

Copy link
Copy Markdown
Owner

This landed in the v2.0.12 branch (merged there for testing; it reaches main with that release), so closing. Thanks!

@NotRexed NotRexed closed this Nov 10, 2026
@NotRexed

Copy link
Copy Markdown
Owner

Reopened: closing this was a mistake on my side. It was tested in the v2.0.12 branch, and it will be merged into main here, so it shows as merged. Sorry for the noise.

@NotRexed NotRexed reopened this Nov 10, 2026
@NotRexed
NotRexed merged commit b70e86b into NotRexed:main Nov 10, 2026
8 checks passed
NotRexed added a commit to nicholasgower/Hookshot that referenced this pull request Nov 10, 2026
…otRexed#1087's per-program cleanup, its now unused lambda dropped; the cleanup test follows the per-thread buffers)
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.

2 participants