From 7eeb52dfbb881e6094c2043c8ee87495b4c72a17 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Fri, 26 Aug 2011 20:56:39 +0000 Subject: [PATCH] Fix number of supported backtrace frames (thanks to Sebastian Pipping) --- CRT.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRT.c b/CRT.c index 5573890f..9c3d9490 100644 --- a/CRT.c +++ b/CRT.c @@ -128,7 +128,7 @@ static void CRT_handleSIGSEGV(int sgn) { #if __linux fprintf(stderr, "\n\nhtop " VERSION " aborting. Please report bug at http://htop.sf.net\n"); #ifdef HAVE_EXECINFO_H - size_t size = backtrace(backtraceArray, sizeof(backtraceArray)); + size_t size = backtrace(backtraceArray, sizeof(backtraceArray) / sizeof(void *)); fprintf(stderr, "Backtrace: \n"); backtrace_symbols_fd(backtraceArray, size, 2); #endif