summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorBrad Linden <brad@lindenlab.com>2024-08-29 13:32:34 -0700
committerBrad Linden <brad@lindenlab.com>2024-08-29 13:32:34 -0700
commitecf3002a4623ebed0ed31bcc11f743000deeac84 (patch)
treea15d60759afba2596f1f159d3011e4502514ce1f /indra/llcommon
parente2809755c5e4a6a6d3c8f27911865efe4020d679 (diff)
parentb0fefd62adbf51f32434ba077e9f52d8a9241d15 (diff)
Merge remote-tracking branch 'origin/release/2024.08-DeltaFPS' into develop
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llerror.cpp16
-rw-r--r--indra/llcommon/llerror.h11
2 files changed, 5 insertions, 22 deletions
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index 41c69ba194..ad35bc84f2 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -1641,19 +1641,3 @@ namespace LLError
sLocalizedOutOfMemoryWarning = message;
}
}
-
-void crashdriver(void (*callback)(int*))
-{
- // The LLERROR_CRASH macro used to have inline code of the form:
- //int* make_me_crash = NULL;
- //*make_me_crash = 0;
-
- // But compilers are getting smart enough to recognize that, so we must
- // assign to an address supplied by a separate source file. We could do
- // the assignment here in crashdriver() -- but then BugSplat would group
- // all LL_ERRS() crashes as the fault of this one function, instead of
- // identifying the specific LL_ERRS() source line. So instead, do the
- // assignment in a lambda in the caller's source. We just provide the
- // nullptr target.
- callback(nullptr);
-}
diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h
index 6176ce0d1d..8a143ff30a 100644
--- a/indra/llcommon/llerror.h
+++ b/indra/llcommon/llerror.h
@@ -408,9 +408,11 @@ 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
-#define LLERROR_CRASH \
-{ \
- crashdriver([](int* ptr){ *ptr = 0; exit(*ptr); }); \
+#define LLERROR_CRASH \
+{ \
+ int* make_me_crash = (int*)0xDEADBEEFDEADBEEFUL; \
+ *make_me_crash = 0; \
+ exit(*make_me_crash); \
}
#define LL_ENDL \
@@ -512,7 +514,4 @@ LL_DEBUGS("SomeTag") performs the locking and map-searching ONCE, then caches
the result in a static variable.
*/
-// used by LLERROR_CRASH
-void crashdriver(void (*)(int*));
-
#endif // LL_LLERROR_H