From 695882934366ac6385e6733536ae4de9397fe623 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 28 Aug 2023 22:05:51 +0200 Subject: [PATCH] might help during debugging --- cmake/Compiler-GNU.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/Compiler-GNU.cmake b/cmake/Compiler-GNU.cmake index d024bdc0a..a62875d05 100644 --- a/cmake/Compiler-GNU.cmake +++ b/cmake/Compiler-GNU.cmake @@ -131,6 +131,9 @@ set (DEBUG_FLAGS "${DEBUG_FLAGS} -fcheck=all") set (DEBUG_FLAGS "${DEBUG_FLAGS} -fstack-protector-all") # Inserts a guard variable onto the stack frame for all functions +set (DEBUG_FLAGS "${DEBUG_FLAGS} -finit-real=snan -finit-integer=-2147483648") +# "strange" values to simplify debugging + set (DEBUG_FLAGS "${DEBUG_FLAGS} -fsanitize=undefined") # detect undefined behavior # Additional options