Remove console_insn (ported from XCL, GPL-2.0-only); take VIctory's crash handler #1055

Open
nullexxx wants to merge 1 commit from upstream-pr/1057 into main
nullexxx commented 2026-11-25 17:49:40 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by nullexxx on 2026-11-25T17:49:40Z.


Summary

console_insn.rs and console_insn_decode.rs say they were ported from XCL (insn.rs, unchanged, and eh.rs). XCL is GPL-2.0-only, and code under GPL-2.0-only cannot be combined with this GPL-3.0-or-later program. (The README's credits say XCL was used as a reference and that fixes were written anew; these two files are the exception.)

This removes both files and the hook into the crash handler. crash.rs was VIctory ffe310e's plus that hook. It is now VIctory main's, whose own emulation of the console's AMD-only instructions covers what the module did:

clzero, with whole loops done in one exception;
monitorx / mwaitx, as a wait hint and a yield;
rdpru, clwb, and SSE4a's extrq / insertq.

On AMD processors none of this runs: they have the instructions.
Testing

cargo clippy -p victory-loader --all-targets --all-features --target x86_64-pc-windows-msvc -- -D warnings: clean. The rest of the workspace has the pre-existing lint failures that pull request 1 fixes.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6610377428 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1057). Originally posted by [nullexxx](https://github.com/nullexxx) on 2026-11-25T17:49:40Z. --- Summary console_insn.rs and console_insn_decode.rs say they were ported from XCL (insn.rs, unchanged, and eh.rs). XCL is GPL-2.0-only, and code under GPL-2.0-only cannot be combined with this GPL-3.0-or-later program. (The README's credits say XCL was used as a reference and that fixes were written anew; these two files are the exception.) This removes both files and the hook into the crash handler. crash.rs was VIctory ffe310e's plus that hook. It is now VIctory main's, whose own emulation of the console's AMD-only instructions covers what the module did: clzero, with whole loops done in one exception; monitorx / mwaitx, as a wait hint and a yield; rdpru, clwb, and SSE4a's extrq / insertq. On AMD processors none of this runs: they have the instructions. Testing cargo clippy -p victory-loader --all-targets --all-features --target x86_64-pc-windows-msvc -- -D warnings: clean. The rest of the workspace has the pre-existing lint failures that pull request 1 fixes.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1057:upstream-pr/1057'
git switch 'upstream-pr/1057'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1057'
git switch 'upstream-pr/1057'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1057'
git switch 'upstream-pr/1057'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1057'
git switch 'main'
git merge --squash 'upstream-pr/1057'
git switch 'main'
git merge --ff-only 'upstream-pr/1057'
git switch 'main'
git merge 'upstream-pr/1057'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
fxceless/victory-fork!1055
No description provided.