hle(kernel, files), loader(native): Win32 module paths/exports, thread notices, callers, and MiniDumpWriteDump #574
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!574
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-570"
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?
@Sheffy007 on GitHub · 2026-11-28 05:34 UTC · original
Sheffy007:fix/native-module-paths-exports-notices→main· +825 −31 · 8 files · 1 commits · openCloses #570
Refs #460, #525
Summary
crates/victory-hle/src/host_posix/files.rs,modules/kernel.rs,runtime.rs):GetModuleFileNameW/GetModuleFileNameApaths on native macOS through mountedhost_posix::filesdrives (longest-prefix match, e.g.G:\Game.exematchingGetCommandLineW), setsERROR_MOD_NOT_FOUND(126) on invalid handles, and preserves explicit<drive>:/ UNC paths inruntime::set_image_path.GetFullPathNameW,GetFullPathNameA,DeleteFileA,CreateDirectoryA,RemoveDirectoryA, andGetDiskFreeSpaceWinhost_posix::files.dbghelp.dll!MiniDumpWriteDump(crates/victory-loader/src/native/image.rs,dll.rs,crates/victory-hle/src/modules/kernel.rs,host.rs):NativeImageexport directories (dll::resolve_mapped_export) soGetProcAddress(NULL, ...)/GetProcAddress(GetModuleHandleW(NULL), ...)resolves exports on the main.exeand setsERROR_PROC_NOT_FOUND/ERROR_MOD_NOT_FOUND.dbghelp.dll!MiniDumpWriteDumpon non-Windows hosts with a stub that setsERROR_NOT_SUPPORTED(50) and returns0, eliminating the startupGetProcAddress: not implementedwarning from Breakpad (#521).DisableThreadLibraryCalls&DLL_THREAD_DETACHorder (crates/victory-loader/src/native/run.rs,image.rs,modules/kernel.rs):DisableThreadLibraryCallscalls made insideDllMain(DLL_PROCESS_ATTACH)beforeregister_dll_thread_noticesruns, refuses modules with static TLS (ERROR_RING2_STACK_IN_USE,0), rejects invalid handles (ERROR_INVALID_HANDLE,0), and deliversDLL_THREAD_DETACHin reverse load order (DllMainbefore TLS callbacks).crates/victory-loader/src/native/dump.rs,modules/kernel.rs):dump::caller_locations()and wireskernel::host::callers()on native macOS soexit,abort,terminate,TerminateProcess, and refused-DLL logs include<module>+<rva>caller chains.Verification
cargo test -p victory-loader --target x86_64-apple-darwin --locked -- --test-threads=1(33 passed, includingdisable_thread_calls_and_thread_detach_order_follow_windows)cargo test -p victory-hle --lib --target x86_64-apple-darwin --locked -- --test-threads=1(175 passed, includingnative_module_paths_main_exports_dbghelp_and_callersandwin32_path_get_full_path_name_and_narrow_dir_ops_match_win32)cargo test -p victory-hle --test native_probe --target x86_64-apple-darwin --locked -- --test-threads=1(17 passed)cargo test -p victory-loader --locked -- --test-threads=1&cargo test -p victory-hle --lib --locked -- --test-threads=1cargo clippy --workspace --all-targets --all-features --locked --target x86_64-pc-windows-gnullvm -- -D warningscargo xtask policycc @Olima34
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.