It seems that in older versions of glibc (such as the one in Ubuntu 20), the following test will fail:
#include <dlfcn.h>
int main() {
dl_find_object result;
_dl_find_object(reinterpret_cast<void*>(main), &result);
}
As a result, cpptrace will not use _dl_find_object and will instead use dlopen (right?). This approach produces an empty stack trace (I guess the object path is not correct in this case?):
Hi, correct, _dl_find_object is needed for getting information in a signal-safe way and I don’t know of any alternative. I should document that relatively recent glibc is needed.
It seems that in older versions of glibc (such as the one in Ubuntu 20), the following test will fail:
As a result, cpptrace will not use
_dl_find_object
and will instead usedlopen
(right?). This approach produces an empty stack trace (I guess the object path is not correct in this case?):So, do we have any fallback functions to mimic the behavior of _dl_find_object?
Thanks!