forked from enlightenment/efl
eina: fix random segfaults when displaying BT
Under some circumstances, eina crashes when attempting to display the backtrace, because dladdr() may yield a dli_fname that is NULL. This is especially annoying in realease, when the backtrace is shown by default when CRI/ERR are thrown. @fix
This commit is contained in:
parent
a1e05aa089
commit
e835a02ebb
|
@ -67,7 +67,7 @@ _eina_debug_dump_fhandle_bt(FILE *f, void **bt, int btlen)
|
|||
offset = base = 0;
|
||||
// we have little choice but to hope/assume dladdr() doesn't alloc
|
||||
// anything here
|
||||
if ((dladdr(bt[i], &info)) && (info.dli_fname[0]))
|
||||
if ((dladdr(bt[i], &info)) && (info.dli_fname) && (info.dli_fname[0]))
|
||||
{
|
||||
offset = (unsigned long long)(uintptr_t)bt[i];
|
||||
base = (unsigned long long)(uintptr_t)info.dli_fbase;
|
||||
|
|
Loading…
Reference in New Issue