#3591 Reprot SEH directly to bugsplat

Rethrowing SEH via std::exception results ina callstack that ends at
rethrow.
master
Andrey Kleshchev 2025-02-26 15:58:18 +02:00 committed by Andrey Kleshchev
parent 056dc00ebe
commit 454d5b4871
4 changed files with 9 additions and 5 deletions

View File

@ -282,7 +282,7 @@ public:
LLRunner& getRunner() { return mRunner; }
#ifdef LL_WINDOWS
virtual void reportCrashToBugsplat(void* pExcepInfo /*EXCEPTION_POINTERS*/) { }
virtual bool reportCrashToBugsplat(void* pExcepInfo /*EXCEPTION_POINTERS*/) { return false; }
#endif
public:

View File

@ -310,18 +310,20 @@ namespace
static const U32 STATUS_MSC_EXCEPTION = 0xE06D7363; // compiler specific
U32 exception_filter(U32 code, struct _EXCEPTION_POINTERS *exception_infop)
U32 exception_filter(U32 code, struct _EXCEPTION_POINTERS* exception_infop)
{
if (code == STATUS_MSC_EXCEPTION)
{
// C++ exception, go on
return EXCEPTION_CONTINUE_SEARCH;
}
else
else if (!LLApp::instance()->reportCrashToBugsplat((void*)exception_infop))
{
// handle it
return EXCEPTION_EXECUTE_HANDLER;
}
return EXCEPTION_CONTINUE_SEARCH;
}
void sehandle(const LLCoros::callable_t& callable)

View File

@ -804,14 +804,16 @@ bool LLAppViewerWin32::cleanup()
return result;
}
void LLAppViewerWin32::reportCrashToBugsplat(void* pExcepInfo)
bool LLAppViewerWin32::reportCrashToBugsplat(void* pExcepInfo)
{
#if defined(LL_BUGSPLAT)
if (sBugSplatSender)
{
sBugSplatSender->createReport((EXCEPTION_POINTERS*)pExcepInfo);
return true;
}
#endif // LL_BUGSPLAT
return false;
}
void LLAppViewerWin32::initLoggingAndGetLastDuration()

View File

@ -43,7 +43,7 @@ public:
bool init() override; // Override to do application initialization
bool cleanup() override;
void reportCrashToBugsplat(void* pExcepInfo) override;
bool reportCrashToBugsplat(void* pExcepInfo) override;
protected:
void initLoggingAndGetLastDuration() override; // Override to clean stack_trace info.