Retry late faults at installed console instruction patches #4194

Closed
github-bot wants to merge 1 commit from github-bot/gh-4193 into main AGit
Owner

@⁠Hellwire on GitHub · 2026-11-30 17:17 UTC · original
Hellwire:fix/late-console-instruction-fault → main · +58 −7 · 1 files · 1 commits · closed without merging

Problem

A title thread can take an illegal-instruction fault just before another thread finishes replacing the instruction. When the fault handler examines the address, it then sees the replacement bytes and cannot decode the original instruction.

Change

Record the bytes of each successful atomic patch. Retry a fault at the same instruction pointer once per thread when the current bytes match the exact replacement installed at that address. The existing handler can then resume through the patched instruction. An unrecognized or mismatching site follows the original unhandled path.

Verification

The loader regression fixture exercises the installed replacement, repeated faults at the same address, and identical bytes at an unrecorded address. The Windows loader tests passed on the submitted source.

**@⁠Hellwire** on GitHub · 2026-11-30 17:17 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4193) `Hellwire:fix/late-console-instruction-fault` → `main` · +58 −7 · 1 files · 1 commits · closed without merging ## Problem A title thread can take an illegal-instruction fault just before another thread finishes replacing the instruction. When the fault handler examines the address, it then sees the replacement bytes and cannot decode the original instruction. ## Change Record the bytes of each successful atomic patch. Retry a fault at the same instruction pointer once per thread when the current bytes match the exact replacement installed at that address. The existing handler can then resume through the patched instruction. An unrecognized or mismatching site follows the original unhandled path. ## Verification The loader regression fixture exercises the installed replacement, repeated faults at the same address, and identical bytes at an unrecorded address. The Windows loader tests passed on the submitted source.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 18:08:24 +00:00
github-bot closed this pull request 2026-12-01 18:50:33 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-12-01 18:45 UTC · original

Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

**@⁠trustno1-coder** on GitHub · 2026-12-01 18:45 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4193#issuecomment-7321501487) Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!4194
No description provided.