Skip to content

DetourModKit v4.3.0

Choose a tag to compare

@tkhquang tkhquang released this 02 Oct 19:05
· 12 commits to main since this release

Release Title: Safer hook lifetimes and layered input
Version: 4.3.0

Changelog:

Maintenance release. v4.3.0 improves hook coordination and hot-reload safety. It also fixes layered XInput consume and signature manifest validation.

Fixes and improvements

  • Hook routes: A process coordinator orders patch transactions across DMK copies. Idle mid routes reclaim storage, while active continuations retain their code. (#355, #359)
  • Hot reload: Teardown returns idle TLS indices and removes MinGW fault handlers. Session startup publishes the correct module identity. (#350, #356, #357)
  • Development reloads: The staged example loads fresh generations while safely retired DLLs remain mapped, within count and byte limits. Failed callback drains or hook restoration block replacement. INI bindings and Consume settings need no loader-policy edits. (#375)
  • Failure safety: Hook and teardown engines fail closed on first-use allocation failures. Hook teardown protects concurrent call() use on retained storage, and MinGW guarded-read teardown avoids process-exit deadlocks. (#360, #364)
  • Layered XInput: Compatible copies preserve raw controller samples and first-frame modifiers. A failed paired route check disables suppression on both exports. (#373)
  • XInput diagnostics: Suppression-loss warnings identify controller status, per-export results, and receipt failures. One Info record reports restored authorization for the same owner, hook epoch, and controller. (#376)
  • Input and config: Callback-triggered shutdown is asynchronous. Pre-start focus settings take effect, and repeat reload-hotkey registrations update the live binding in place. (#365, #366)
  • Logger: Shutdown retires writers that race reconfiguration. Asynchronous timestamps zero-pad milliseconds correctly. (#366)
  • Signatures: Adopted ladders survive save and reload. Manifest saves reject invalid records before file access. Resolution reports incomplete scans and allocation failures explicitly. (#367, #370)
  • Package exports: Installed DetourModKit::WheelHost consumers use the Release archive for RelWithDebInfo and MinSizeRel. (#367)

Tests and documentation

  • Lifecycle coverage: New proofs cover cross-copy routes, continuation lifetimes, TLS return, process exit, allocation failures, and layered XInput. Six new processes cover the staged example, and six cover XInput diagnostics. (#375, #376)
  • Hook test safety: Test-only flush traces avoid MinGW deadlocks on TLS lookup pages. Watchdogs report stalled installs and teardown within five seconds. (091d1aa)
  • Suite structure: Input, hook, anchor, and memory suites split by surface and share fixtures. Public contracts and guides reflect the corrected behavior.

Backward compatibility

  • The wheel-host C ABI remains unchanged.
  • The staged_reload example uses protocol revision 2. Rebuild its loader and logic DLL together. (#375)
  • DMK_API is removed. Remove it from consumer declarations.
  • Narrow paths for config, logger, profiler exports, and drift files use UTF-8 on both toolchains. Invalid UTF-8 fails closed.
  • Typed memory writes reject views and std::initializer_list, and XmmView::lane<bool> no longer compiles. Use write_bytes or the byte-span write_in_place overload for viewed data.
  • DetourModKit ships as a static library. Rebuild consumers against this release.

Full Changelog: v4.2.0...v4.3.0

Artifacts:
This release includes packages for different build environments. Both packages ensure library names are prefixed with lib for consistency (e.g., libDetourModKit.a, libDetourModKit.lib).

  • DetourModKit_MinGW_v4.3.0.zip: Built with MinGW (g++). Contains libDetourModKit.a, libsafetyhook.a, libZydis.a, libZycore.a, headers, and CMake config files. find_package links the transitive static chain via the DetourModKit::deps imported target.
  • DetourModKit_MSVC_v4.3.0.zip: Built with MSVC (Visual Studio 2022). Contains libDetourModKit.lib, safetyhook.lib, Zydis.lib, Zycore.lib, headers, and CMake config files. Same DetourModKit::deps wiring as the MinGW package.

These packages are ready to be used by other CMake projects via find_package(DetourModKit).
See README for detailed usage instructions.