As in linux/kernel/gcov/gcov.h.

Otherwise the extract tool will access Gcov data using garbage as an
index and segfault.

Signed-off-by: Andrej Utz <andrej....@st.oth-regensburg.de>
---
 tools/jailhouse-gcov-extract.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/jailhouse-gcov-extract.c b/tools/jailhouse-gcov-extract.c
index c126f976..5bb337a5 100644
--- a/tools/jailhouse-gcov-extract.c
+++ b/tools/jailhouse-gcov-extract.c
@@ -43,7 +43,9 @@ typedef long gcov_type;
 typedef long long gcov_type;
 #endif
 
-#if (__GNUC__ > 5) || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
+#if (__GNUC__ >= 7)
+#define GCOV_COUNTERS                  9
+#elif (__GNUC__ > 5) || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
 #define GCOV_COUNTERS                  10
 #elif __GNUC__ == 4 && __GNUC_MINOR__ >= 9
 #define GCOV_COUNTERS                  9
-- 
2.24.1

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jailhouse-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/20191220154126.1136-2-andrej.utz%40st.oth-regensburg.de.

Reply via email to