Skip to content

Enhance error handling, documentation, and safety checks#9

Merged
AlienDwarf merged 6 commits into
mainfrom
hook-stability
Mar 15, 2026
Merged

Enhance error handling, documentation, and safety checks#9
AlienDwarf merged 6 commits into
mainfrom
hook-stability

Conversation

@AlienDwarf
Copy link
Copy Markdown
Owner

Testing and Multithreading Reliability:

  • Refactored the stress test to use a RwLock<Option<HeavyFn>> instead of OnceLock, ensuring thread-safe access and mutation of the trampoline function and improving test stability in multithreaded scenarios.

Instruction Relocation and Disassembler Enhancements:

  • Changed Disassembler to be pub(crate) for encapsulation, and improved instruction length calculation to handle cases where min_size exceeds typical buffer sizes

IAT Hook Robustness and Error Handling:

  • Improved error handling in IAT hook restoration: ensures the original function pointer is restored if VirtualProtect fails, and returns a more accurate error.
  • Updated string reading from RVA to use String::from_utf8 for stricter UTF-8 validation.

@AlienDwarf AlienDwarf merged commit 4c1c7d3 into main Mar 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant