diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-05-17 09:16:53 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-05-17 09:16:53 -0400 |
commit | f06f84aed26fa7ed294a14ed12dae58c063b0aa3 (patch) | |
tree | fb988d538438d8a133e73f3f9c0bee0d71c320db /indra/test/test.cpp | |
parent | 9edb436c777e68c3c7c22c78ea2bc1e5232df82f (diff) |
Don't try to report a stack trace on stack overflow (sigh)
Diffstat (limited to 'indra/test/test.cpp')
-rw-r--r-- | indra/test/test.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/test/test.cpp b/indra/test/test.cpp index c4cf4b2d28..1239b34d04 100644 --- a/indra/test/test.cpp +++ b/indra/test/test.cpp @@ -532,7 +532,8 @@ struct Windows_SEH_exception: public std::runtime_error #if LL_WINDOWS -static const U32 STATUS_MSC_EXCEPTION = 0xE06D7363; // compiler specific +static constexpr U32 STATUS_MSC_EXCEPTION = 0xE06D7363; // compiler specific +static constexpr U32 STATUS_STACK_FULL = 0xC00000FD; U32 seh_filter(U32 code, struct _EXCEPTION_POINTERS*) { @@ -546,7 +547,13 @@ U32 seh_filter(U32 code, struct _EXCEPTION_POINTERS*) // This is a non-C++ exception, e.g. hardware check. // By the time the handler gets control, the stack has been unwound, // so report the stack trace now at filter() time. - std::cerr << boost::stacktrace::stacktrace() << std::endl; + // Sadly, even though, at the time of this writing, stack overflow is + // the problem we would most like to diagnose, calling another + // function when the stack is already blown only terminates us faster. + if (code != STATUS_STACK_FULL) + { + std::cerr << boost::stacktrace::stacktrace() << std::endl; + } // pass control into the handler block return EXCEPTION_EXECUTE_HANDLER; } |