Pin seh::Context::set_from_thread_state and the FXSAVE accessors with unit tests #593
Labels
No labels
accessibility
bug
claimed
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
tester report
urgent
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LakshanSivakumar--Native-Victory-macOS#593
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@AnastasisKon on GitHub · 2026-11-28 10:25 UTC · original
The Windows x64
CONTEXTdecoder incrates/victory-loader/src/native/seh/context.rshas no tests: only the struct size/offset asserts are pinned.Context::set_from_thread_statemaps Darwin'sx86_thread_state64(21 u64 words) into theCONTEXTgpr order (rax, rcx, rdx, rbx, rsp, rbp, rsi, rdi, r8-r15, rip, eflags, cs, fs, gs) and fixes ds/es/ss to 0x2B. Thexmm/xmm_mut/set_mxcsraccessors over the FXSAVE image are also untested.Add unit tests: a distinct value per thread-state word, asserting each gpr slot, rip, the eflags truncation to u32, the three segments read from the state, ds/es/ss = 0x2B; and
set_mxcsrwriting bothmx_csrand the little-endian bytes inflt[1][8..12], plusxmm(i)addressingflt[10 + i]. Pure mapping, no Mach calls; runs undercargo test --target x86_64-apple-darwin -p victory-loader. No behaviour change.@AnastasisKon on GitHub · 2026-11-28 10:25 UTC · original
/claim
@github-actions[bot] on GitHub · 2026-11-28 10:25 UTC · original
Claimed by @AnastasisKon. Open a draft pull request with
Refs #589in its description within 24 hours, or the claim expires.@AnastasisKon on GitHub · 2026-11-28 12:37 UTC · original
/release - done: PR #594 pins
seh::Context::set_from_thread_stateand the FXSAVE accessors. Carried in my fork'smain(69146296), gate green.@AnastasisKon on GitHub · 2026-11-28 12:41 UTC · original
/release - done: PR #594 pins
seh::Context::set_from_thread_stateand the FXSAVE accessors. Carried in my fork'smain(69146296), gate green.@github-actions[bot] on GitHub · 2026-11-28 12:41 UTC · original
Released. This issue is free to claim.
@AnastasisKon on GitHub · 2026-11-28 17:06 UTC · original
The tests this asks for are in the tree already (the mapping, the FXSAVE accessors, the clock scaling and
normaliseare all pinned); closing.