diff --git a/src/linux.c b/src/linux.c index aa07f985..ec824e97 100644 --- a/src/linux.c +++ b/src/linux.c @@ -405,7 +405,9 @@ inline static void update_stat() unsigned int malloc_cpu_size=0; - if (!cpu_setup) { + /* added check for !info.cpu_usage since that mem is freed on a SIGUSR1 + * and linux.c was assuming it ws still allocated, leading to a sigsegv */ + if (!cpu_setup || !info.cpu_usage) { get_cpu_count(); cpu_setup = 1; }