2008 and 2012 compatibility
lz520520 opened this issue · 1 comments
lz520520 commented
using unwinder on 2008 or 2012, the exception is thrown as follows
thread 'main' panicked at winproc-0.6.4\src\handle.rs:68:13:
assertion `left != right` failed: Os { code: 6, kind: Uncategorized, message: "句柄无效。" }
left: 0
right: 0
the reason is that the dinvoke_rs::dinvoke::get_module_base_address call fails, I tried to use GetModuleHandleW to get the dll handle, but it still throws an exception, the new exception is as follows
thread 'main' panicked at unwinder\src\lib.rs:1697:63:
misaligned pointer dereference: address must be a multiple of 0x4 but is 0x7ffb335789fd
stack backtrace:
0: rust_begin_unwind
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\std\src/panicking.rs:647:5
1: core::panicking::panic_nounwind_fmt::runtime
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\core\src/panicking.rs:110:18
2: core::panicking::panic_nounwind_fmt
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\core\src/panicking.rs:122:9
3: core::panicking::panic_misaligned_pointer_dereference
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\core\src/panicking.rs:221:5
4: unwinder::get_frame_size_with_setfpreg
at unwinder\src\lib.rs:1697:63
5: unwinder::find_setfpreg
at unwinder\src\lib.rs:1299:27
6: unwinder::spoof_and_call
at unwinder\src\lib.rs:976:35
Kudaes commented
This is an issue that i've seen before, and the root cause is in winproc
crate. There is not too much to do from my side until I remove that dependency, but you can try to fix it by following my last answer to this other issue.
On the other hand, the second error that you get should dissapear if you compile unwinder
in release mode (as stated in the Readme).