You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
well, part of the problem here is that the FFI bindings for yaxpeax-x86 are kinda useless and awful, which i think i realized when i tried writing an example before, but never got to fixing up.
yaxpeax_x86_64_fmt needs to return the number of characters it wrote to the string, especially because it never makes sure that the string is actually null terminated. it needs to make sure the string is null terminated.
yaxpeax_x86_64_decode takes a *mut long_mode::Instruction but there's no way to initialize one in a way that is stable across library versions.
half of this file is #[cfg(feature = "fmt")], but i'm not really sure feature flags on this .so make sense for some C program that may not know what features were enabled - there probably should be stub implementations if !fmt even if there are ifdefs around the declarations in a header
speaking of which, there are no header files. i think i'd assumed years ago that you can Just Bindgen It but that's not... ideal either.
i'm about 90% sure i'd called these functions by hand from a python repl just to see that yes it does work, but this is really not good enough to point anyone at 😅
The readme says "see the examples directory for FFI usage of this library", but there isn't an examples directory in this repo.
(also hi)
The text was updated successfully, but these errors were encountered: