diff options
author | vaxerski <[email protected]> | 2022-04-24 22:05:07 +0200 |
---|---|---|
committer | vaxerski <[email protected]> | 2022-04-24 22:05:07 +0200 |
commit | 68605c2ccfc74cdc5238e730a97d7a6de9882489 (patch) | |
tree | 45b9bc616c517b0129fe77f1ce65cf4381f70711 | |
parent | c35517d44e983524760109ea7864c2ace91e5f9e (diff) | |
download | Hyprland-68605c2ccfc74cdc5238e730a97d7a6de9882489.tar.gz Hyprland-68605c2ccfc74cdc5238e730a97d7a6de9882489.zip |
crash in assert on fail for a coredump
-rw-r--r-- | src/defines.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
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, ...) |