From 3880812a806d6cf349be3bf5d248c2d2e035306f Mon Sep 17 00:00:00 2001 From: Ivan Velickovic Date: Wed, 18 Sep 2024 16:44:19 +1000 Subject: [PATCH] util: trap in assert instead of infinite loop Signed-off-by: Ivan Velickovic --- include/libvmm/util/util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/libvmm/util/util.h b/include/libvmm/util/util.h index d2778323c..f39966b08 100644 --- a/include/libvmm/util/util.h +++ b/include/libvmm/util/util.h @@ -46,7 +46,7 @@ static void assert_fail( const char *function) { printf("Failed assertion '%s' at %s:%u in function %s\n", assertion, file, line, function); - while (1) {} + __builtin_trap(); } #define BIT_LOW(n) (1ul<<(n))