diff --git a/src/misc.cc b/src/misc.cc index 0098deed9..a54eba219 100644 --- a/src/misc.cc +++ b/src/misc.cc @@ -31,7 +31,6 @@ #include "intl.h" #include "ascii.h" -#include "ypointer.h" using namespace ASCII; @@ -736,8 +735,9 @@ int process_close(FILE* fp, int pid) { void show_backtrace(const int limit) { #if defined(HAVE_BACKTRACE_SYMBOLS_FD) && defined(HAVE_EXECINFO_H) - const int asize = Elvis(limit, 20); - asmart array(new void*[asize]); + const int fixed = 40; + const int asize = (0 < limit) ? max(fixed, limit) : 20; + void *array[fixed]; const int count = backtrace(array, asize); const char tool[] = "/usr/bin/addr2line"; char* prog = progpath();