"${FILESDIR}"/${P}-new_graph-oor.patch
"${FILESDIR}"/${P}-gcc-7.patch
"${FILESDIR}"/${P}-fix-text-shades.patch
+ "${FILESDIR}"/${P}-cpu-hotplug.patch
)
DISABLE_AUTOFORMATTING="yes"
--- /dev/null
+From 7d2639e9c489c34fa9673fcaee8deec46043fbf8 Mon Sep 17 00:00:00 2001
+From: Daniel Pielmeier <billie80@users.noreply.github.com>
+Date: Sat, 18 Feb 2017 16:55:35 +0100
+Subject: [PATCH] Fix SEGV in a CPU hotplug environment #127
+
+---
+ src/linux.cc | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/linux.cc b/src/linux.cc
+index 664ddf5e..63b3ea40 100644
+--- a/src/linux.cc
++++ b/src/linux.cc
+@@ -900,6 +900,9 @@ int update_stat(void)
+ } else {
+ idx = 0;
+ }
++ if (idx >= info.cpu_count) {
++ continue;
++ }
+ sscanf(buf, stat_template, &(cpu[idx].cpu_user),
+ &(cpu[idx].cpu_nice), &(cpu[idx].cpu_system),
+ &(cpu[idx].cpu_idle), &(cpu[idx].cpu_iowait),