From 68605c2ccfc74cdc5238e730a97d7a6de9882489 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sun, 24 Apr 2022 22:05:07 +0200 Subject: [PATCH] crash in assert on fail for a coredump --- src/defines.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/defines.hpp b/src/defines.hpp index a803b985..8c61a780 100644 --- a/src/defines.hpp +++ b/src/defines.hpp @@ -43,7 +43,8 @@ #define RASSERT(expr, reason, ...) \ if (!(expr)) { \ Debug::log(CRIT, "\n==========================================================================================\nASSERTION FAILED! \n\n%s\n\nat: line %d in %s", getFormat(reason, ##__VA_ARGS__).c_str(), __LINE__, ([]() constexpr->std::string { return std::string(__FILE__).substr(std::string(__FILE__).find_last_of('/') + 1); })().c_str()); \ - RIP("Assertion failed! See the log in /tmp/hypr/hyprland.log for more info."); \ + printf("Assertion failed! See the log in /tmp/hypr/hyprland.log for more info."); \ + *((int*)nullptr) = 1; /* so that we crash and get a coredump */ \ } #else #define RASSERT(expr, reason, ...)