host_posix: DebugBreak, FormatMessageW and _ldsign for the upscaler DLL #153
No reviewers
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!153
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/153/head"
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?
@Olima34 on GitHub · 2026-11-26 21:42 UTC · original
Olima34:feat/fidelityfx-imports→main· +336 −4 · 7 files · 1 commits · merged 2026-11-26 22:39 UTCThe three imports #135 named for the late-loaded
amd_fidelityfx_upscaler_xbox.dll. A run on an M5 Pro (Series S,d41052c) logsnative imports bound hle=7 host=42 missing=3 unresolved=api-ms-win-crt-math-l1-1-0.dll!_ldsign, api-ms-win-core-debug-l1-1-0.dll!DebugBreak, api-ms-win-core-localization-l1-2-0.dll!FormatMessageW. Until now all three were stubs returning 0._ldsign(ucrt/math.rs): an alias of_dsign. Microsoft Learn ("Floating-point primitives") givesint _ldsign(long double)and promises only a nonzero result when the sign bit is set. On MSVC x64,long doubleisdouble.DebugBreak: a Windows-ABI stub,_victory_DebugBreakinvictory-loaderseh/dispatch.rs. It tail-callsRaiseException(EXCEPTION_BREAKPOINT, 0, 0, NULL), so the captured context is the caller's. It is bound likeRaiseException. A vectored handler or__excepttakes it; with none it goes down the loader's unhandled path, as on Windows, never a silent no-op.Guess, marked in code and docs: Windows' record points at the
int3inDbgBreakPoint, with one parameter. Here it points at the return address with none, and a handler that continues resumes after the call.FormatMessageW(system.rs):FROM_SYSTEM: English text for common Win32 errors,0x8007xxxxHRESULTs, and E_NOTIMPL, E_NOINTERFACE, E_POINTER and E_FAIL, each ending in\r\n.FROM_STRING:%1..%99with!s!/!ls!/!ws!/!d!/!i!/!u!/!x!/!X!, and the escapes%0 %n %t %% %. %!.IGNORE_INSERTS,ARGUMENT_ARRAYor ava_list,ALLOCATE_BUFFER(asFormatMessageAdoes here) andMAX_WIDTH_MASK.FROM_HMODULE, unknown flags and a null%sfail withERROR_INVALID_PARAMETER. A buffer that is too small fails withERROR_INSUFFICIENT_BUFFER.Error 0x%08X\r\n, where Windows fails withERROR_MR_MID_NOT_FOUND.Tests.
system::the_upscaler_dll_finds_its_debug_localization_and_math_importslooks up the exact threedll!namefrom the log.system::format_message_w_formats_system_errors_and_inserts.math::long_double_sign_is_the_double_one.probe_sehgainsE_BREAK(__exceptsees0x80000003) andE_BREAK_CONTINUE(a continuing filter returns fromDebugBreak).Without the registrations, the lookup test and the probe fail.
victory-hle (262), victory-loader (22) and native_probe (16) tests on x86_64-apple-darwin, Windows clippy and
cargo xtask policypass. One PR rather than three, because all three are one DLL's imports and share one lookup test and one docs paragraph.@LakshanSivakumar on GitHub · 2026-11-26 22:39 UTC · original · approved these changes
Reviewed and tested together with the other open PRs on main (macOS x86_64 workspace tests, the setup shell tests, and Windows clippy). Thanks!