thread 'main' panicked at 'BUG: callee XYZ
is unknown' / (minimally) handle dynamically linked binaries
#61
Labels
enhancement
New feature or request
dynamically linked binaries contain 'undefined' symbols
these symbols are provide at runtime by a dynamic linker (e.g.
/lib/ld-linux.so.2
). Thereforecargo-call-stack
, a static analysis tool, cannot provide a complete call graph for these kind of binaries.Currently
cargo-call-stack
panics when it sees these kind of binaries. We should more gracefully handle these binaries by adding a dummy node that represents the dynamic libraries provided by the environment (dynamic linker) to the call graph and having all calls into 'undefined' symbols be connected to that dummy node.It's not possible to provide a max stack usage number for dynamically linked binaries so that should also be reported to the console.
Workaround
If you are hitting the "thread 'main' panicked at 'BUG: callee
XYZ
is unknown'" error message try using a compilation target that produces a statically linked binary. If you were usingx86_64-unknown-linux-gnu
then usex86_64-unknown-linux-musl
.The text was updated successfully, but these errors were encountered: