Closed eyalgolan1337 closed 5 months ago
Thanks, good catch
i also suggest wrapping the call to elf_get_module_image_base()
or the function calling it with try-catch to allow recovering and the continuation of the stack tracing with the other object files
Thanks, that’s also a good point. I think it may be taken care of as part of #102, which I hope to make progress on soon.
in
utils.hpp
there's this function:this function is used in
elf.hpp
inelf_get_module_image_base()
inside a raii_wrap:if
std::fopen
fails then the internal FILE* will be nullptr. usingfclose
on a nullptr is undefined behaviour (in my case - segmentation fault).suggested fix:
This issue arose when the object file the library tried to open did not exist. the resulting object_trace came back empty, which is a shame since the other object files could probably still be opened, so a stack trace of all call addresses and partial object paths could have still been generated