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
* calls radare2 directly
The ocaml-radare2 library is suffering from a few issues and it is
easier and much more efficient to call radare2 directly.
Here the list of issues that we have with ocaml-radare2
1) leaking file descriptors (they are never closed)
2) suboptimal inter-process communication (to get a 100 bytes
ocaml-radare makes a hundred system calls)
3) lingering processes (partially fixed)
In fact, we don't really need to keep the process open as we run
radare2 once and immediately close, so it is much easier for us just
to pass the command using the `-c` command line option.
@XVilka, I saw your fix and it is not yet working, the output channels
should be closed and exhausted for waitpid to return (or NOHANG)
should be passed. Also, without NOHANG, the code that sends signals is
actually unreachable. I've started fixing this and the other issues,
but later decided that for us it is much easier and much-much more
efficient to call radare2 directly.
@gitoleg, please update the corresponding opam package and drop the
dependency on ocaml-radare2. The new implementation also lacks the
version check as I hope that the new implementation will not hang even
with the older versions of radare2. If that is true, then it will help
us with #1161. Also, please add the conf-radare2 package to the
upstream repo and add it as a depenedency to the bap-radare2. Please,
merge this PR after that.
Fixes#1184.
* replaces the `radare2` dependency with the `conf-radare2`
Co-authored-by: gitoleg <[email protected]>
0 commit comments