summaryrefslogtreecommitdiff
path: root/indra/llcommon/llerror.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-10-26 08:44:22 +0800
committerErik Kundiman <erik@megapahit.org>2023-10-26 08:44:22 +0800
commitc362c3e9f05e47409313bc88c7a944aa23d704b7 (patch)
treecd8d8da6e605b7e48167d47a0a31558d4825b7c4 /indra/llcommon/llerror.cpp
parenta2456877583d66062c30a0906cacce941493abea (diff)
parent2e8e96cfbcb383a667d1b938f364f0bbafcad5b4 (diff)
Merge tag '6.6.16-release'
source for viewer 6.6.16.6566955269
Diffstat (limited to 'indra/llcommon/llerror.cpp')
-rw-r--r--indra/llcommon/llerror.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index 02cb186275..05e719b494 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -1617,5 +1617,18 @@ bool debugLoggingEnabled(const std::string& tag)
return res;
}
-
-
+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);
+}