Hpmason / retour-rs

A cross-platform detour library written in Rust
Other
99 stars 18 forks source link

replace udis with iced-x86 #41

Closed LunNova closed 7 months ago

LunNova commented 8 months ago

https://github.com/Hpmason/retour-rs/issues/36

Not properly tested/needs more work.

LunNova commented 7 months ago

I feel like using region as an extra dependency internally might be going too far but can go for that if you want.

I've edited the doc for Builder::build to note that target..target+margin+15 must be valid to read as u8 to avoid UB, and applied the changes you requested.

LunNova commented 7 months ago

CI failure for i686-pc-windows-gnu seems to be unrelated, egor-tensin/setup-mingw@v2 is failing.

Hpmason commented 7 months ago

I feel like using region as an extra dependency internally might be going too far but can go for that if you want.

I've edited the doc for Builder::build to note that target..target+margin+15 must be valid to read as u8 to avoid UB, and applied the changes you requested.

Looking at Detour::new, it already does some region checking so the docs for Builder::build should be enough.

CI failure for i686-pc-windows-gnu seems to be unrelated, egor-tensin/setup-mingw@v2 is failing.

Yeah, it's not the first time it's broken. I need to go in and fix what's breaking it, possibly look into finding a better GH Action to rely on. But it should be fine for this PR.

Thanks again for working on this replacing udis, I really appreciate the help!

Hpmason commented 7 months ago

closes #36