diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-09-25 11:56:44 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-09-25 11:56:44 -0400 |
commit | 55df7328c6f8c864ea309c57d73e791e079b3c2c (patch) | |
tree | cb4cba5e51d9649ba229c4eefeaafe783b9250e2 /indra/llcommon/llerror.h | |
parent | 4b2b94f4864f2e2e7d76f4f17b2d58bb959b3edb (diff) | |
parent | 86d2fb93b73d2689104c564ec859be7f83416691 (diff) |
Merge branch 'develop' into marchcat/xcode-16
Diffstat (limited to 'indra/llcommon/llerror.h')
-rw-r--r-- | indra/llcommon/llerror.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h index 8a143ff30a..b17b9ff21e 100644 --- a/indra/llcommon/llerror.h +++ b/indra/llcommon/llerror.h @@ -95,6 +95,11 @@ const int LL_ERR_NOERR = 0; #define LL_STATIC_ASSERT(func, msg) static_assert(func, msg) #define LL_BAD_TEMPLATE_INSTANTIATION(type, msg) static_assert(false, msg) #else +#if LL_LINUX +// We need access to raise and SIGSEGV +#include <signal.h> +#endif + #define LL_STATIC_ASSERT(func, msg) BOOST_STATIC_ASSERT(func) #define LL_BAD_TEMPLATE_INSTANTIATION(type, msg) BOOST_STATIC_ASSERT(sizeof(type) != 0 && false); #endif @@ -408,12 +413,18 @@ typedef LLError::NoClassInfo _LL_CLASS_TO_LOG; #define LL_NEWLINE '\n' // Use this only in LL_ERRS or in a place that LL_ERRS may not be used + +#ifndef LL_LINUX #define LLERROR_CRASH \ { \ int* make_me_crash = (int*)0xDEADBEEFDEADBEEFUL; \ *make_me_crash = 0; \ exit(*make_me_crash); \ } +#else +// For Linux we just call raise and be done with it. No fighting the compiler to create a crashing code snippet. +#define LLERROR_CRASH raise(SIGSEGV ); +#endif #define LL_ENDL \ LLError::End(); \ |