loader: close the unix gate on the last-resort exit path #64
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/vktory6--VKtory!64
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-64"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@TheRifai on GitHub · 2026-12-01 09:25 UTC · original
TheRifai:loader-end-gate→main· +39 −7 · 4 files · 2 commits · merged 2026-12-01 09:36 UTCWhat
Issue #60 / TASKS "Every exit closes the unix gate first":
end_process(the loader's 5 s detach-deadline exit) calledTerminateProcesswithout closing the Unix-call gate, so Wine could forcibly unwind a thread inside a unix call and Rust aborted withpanic in a function that cannot unwindfromvkback_unix::live_doneon top of the real cause.victory_gpu::unixgate::close_no_alloc(): sets the refusal flag and waits forINSIDEto drain with only atomics, a clock read and sleeps — no logging, heap or lock (required on that path).victory_loader::before_end_process(f)stores afn()in aOnceLock;end_processinvokes it beforeTerminateProcess.apps/victory/src/run.rsregistersclose_no_allocnext to the existingbefore_threads_end(close).unixgate.rsmodule doc: only a crash of our own code remains uncovered.Evidence and limits
tools/build.sh(diagnostics profile) compiles.@vktory6 on GitHub · 2026-12-01 09:37 UTC · original
Merged, thanks! Atomics, the clock and sleeps only is what
end_processallows, and theOnceLockread is lock-free once set. One commit of mine on top (98d7371):closeandclose_no_allocshare one drain loop instead of two copies.Check on the reference system (RX 9070 XT): the PE build, tests and policy pass, and the house-scene validation run shows no new error. The task now names only what is left: a crash of our own code.