Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A rejected background-job enqueue currently increments the pending count even though no job was accepted. Genuine allocation fault injection against the real vk_jobs.cpp reproduces pending=12 with only 11 queued jobs. Count entries after successful deque insertion instead.
Both queue insertion and the counter update remain under the same mutex, before worker notification, so workers cannot remove an entry before it is counted. An insertion exception still propagates; this change corrects accounting and does not claim to recover a failed shader Program or limit queue memory.
The new game-free fixture compiles the real job implementation with the existing platform stubs, forces deque allocations to throw, and checks unchanged queue size/pending count, successful retry, and return to zero after draining accepted jobs. Eight rejected enqueues cover front/back insertion. Workers are intentionally not started for this deterministic acceptance test; the existing actual-worker/wait-stealing test also passes. The new regression fails on unchanged main and passes with the fix under GCC warnings-as-errors. No driver, game content or actual system OOM is involved.
Found during the #18 audit; it is not evidence that this caused the original gameplay memory growth. Also updates #128's worklist status to merged. Published tree 55a441818c716b447535ba799fe6ce042080bc8c matches the local staged tree. Full local suite: 285 passed, the same 12 known host/tool-dependent failure paths, and 56 skipped. Hosted Windows/Linux suites and packaging are running. Source audit finds jobs_pending currently read for replay diagnostics; this corrects the reported pending count and is not a demonstrated queue hang or memory leak. Keep draft until validation completes.
Windows fixture follow-up: the first hosted head passed Linux and both packaging builds, but Windows rejected C-runtime getenv deprecations under warnings-as-errors. The fixture now defines _CRT_SECURE_NO_WARNINGS on Windows, matching other native fixtures while keeping -Wall/-Wextra/-Werror. All eight cases still pass locally; fresh CI runs on b0af68d (tree 566af074f6a11c711f6209a2a6da7e7503c8e425).