diff options
Diffstat (limited to 'unmaintained/snowstorm/indra-no-breakpad.patch')
-rw-r--r-- | unmaintained/snowstorm/indra-no-breakpad.patch | 179 |
1 files changed, 179 insertions, 0 deletions
diff --git a/unmaintained/snowstorm/indra-no-breakpad.patch b/unmaintained/snowstorm/indra-no-breakpad.patch new file mode 100644 index 0000000000..28670b1469 --- /dev/null +++ b/unmaintained/snowstorm/indra-no-breakpad.patch @@ -0,0 +1,179 @@ +--- indra.orig/cmake/GoogleBreakpad.cmake ++++ indra/cmake/GoogleBreakpad.cmake +@@ -2,7 +2,7 @@ + include(Prebuilt) + + if (STANDALONE) +- set(BREAKPAD_EXCEPTION_HANDLER_FIND_REQUIRED ON) ++ set(BREAKPAD_EXCEPTION_HANDLER_FIND_REQUIRED OFF) + include(FindGoogleBreakpad) + else (STANDALONE) + use_prebuilt_binary(google_breakpad) +--- indra.orig/llcommon/llapp.cpp ++++ indra/llcommon/llapp.cpp +@@ -46,7 +46,9 @@ + #include "llstring.h" + #include "lleventtimer.h" + ++#if 0 + #include "google_breakpad/exception_handler.h" ++#endif + + // + // Signal handling +@@ -143,8 +145,6 @@ + // Set the application to this instance. + sApplication = this; + +- mExceptionHandler = 0; +- + // initialize the buffer to write the minidump filename to + // (this is used to avoid allocating memory in the crash handler) + memset(minidump_path, 0, MAX_MINDUMP_PATH_LENGTH); +@@ -177,8 +177,6 @@ + mThreadErrorp = NULL; + } + +- if(mExceptionHandler != 0) delete mExceptionHandler; +- + LLCommon::cleanupClass(); + } + +@@ -284,75 +282,7 @@ + + void LLApp::setupErrorHandling() + { +- // Error handling is done by starting up an error handling thread, which just sleeps and +- // occasionally checks to see if the app is in an error state, and sees if it needs to be run. +- +-#if LL_WINDOWS +- // This sets a callback to handle w32 signals to the console window. +- // The viewer shouldn't be affected, sicne its a windowed app. +- SetConsoleCtrlHandler( (PHANDLER_ROUTINE) ConsoleCtrlHandler, TRUE); +- +- // Install the Google Breakpad crash handler for Windows +- if(mExceptionHandler == 0) +- { +- llwarns << "adding breakpad exception handler" << llendl; +- mExceptionHandler = new google_breakpad::ExceptionHandler( +- L"C:\\Temp\\", 0, windows_post_minidump_callback, 0, google_breakpad::ExceptionHandler::HANDLER_ALL); +- } +- +-#else +- // +- // Start up signal handling. +- // +- // There are two different classes of signals. Synchronous signals are delivered to a specific +- // thread, asynchronous signals can be delivered to any thread (in theory) +- // +- setup_signals(); +- +- // Add google breakpad exception handler configured for Darwin/Linux. +- bool installHandler = true; +-#ifdef LL_DARWIN +- // For the special case of Darwin, we do not want to install the handler if +- // the process is being debugged as the app will exit with value ABRT (6) if +- // we do. Unfortunately, the code below which performs that test relies on +- // the structure kinfo_proc which has been tagged by apple as an unstable +- // API. We disable this test for shipping versions to avoid conflicts with +- // future releases of Darwin. This test is really only needed for developers +- // starting the app from a debugger anyway. +- #ifndef LL_RELEASE_FOR_DOWNLOAD +- int mib[4]; +- mib[0] = CTL_KERN; +- mib[1] = KERN_PROC; +- mib[2] = KERN_PROC_PID; +- mib[3] = getpid(); +- +- struct kinfo_proc info; +- memset(&info, 0, sizeof(info)); +- +- size_t size = sizeof(info); +- int result = sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, NULL, 0); +- if((result == 0) || (errno == ENOMEM)) +- { +- // P_TRACED flag is set, so this process is being debugged; do not install +- // the handler +- if(info.kp_proc.p_flag & P_TRACED) installHandler = false; +- } +- else +- { +- // Failed to discover if the process is being debugged; default to +- // installing the handler. +- installHandler = true; +- } +- #endif +-#endif +- if(installHandler && (mExceptionHandler == 0)) +- { +- std::string dumpPath = "/tmp/"; +- mExceptionHandler = new google_breakpad::ExceptionHandler(dumpPath, 0, &unix_post_minidump_callback, 0, true); +- } +-#endif +- +- startErrorThread(); ++ sDisableCrashlogger = TRUE; + } + + void LLApp::startErrorThread() +@@ -403,20 +333,10 @@ + + void LLApp::setMiniDumpDir(const std::string &path) + { +- if(mExceptionHandler == 0) return; +-#ifdef LL_WINDOWS +- wchar_t buffer[MAX_MINDUMP_PATH_LENGTH]; +- mbstowcs(buffer, path.c_str(), MAX_MINDUMP_PATH_LENGTH); +- mExceptionHandler->set_dump_path(std::wstring(buffer)); +-#else +- mExceptionHandler->set_dump_path(path); +-#endif + } + + void LLApp::writeMiniDump() + { +- if(mExceptionHandler == 0) return; +- mExceptionHandler->WriteMinidump(); + } + + // static +@@ -473,13 +393,6 @@ + + void LLApp::disableCrashlogger() + { +- // Disable Breakpad exception handler. +- if (mExceptionHandler != 0) +- { +- delete mExceptionHandler; +- mExceptionHandler = 0; +- } +- + sDisableCrashlogger = TRUE; + } + +--- indra.orig/llcommon/llapp.h ++++ indra/llcommon/llapp.h +@@ -60,9 +60,11 @@ + }; + #endif + ++#if 0 + namespace google_breakpad { + class ExceptionHandler; // See exception_handler.h + } ++#endif + + class LL_COMMON_API LLApp : public LLOptionInterface + { +@@ -330,9 +332,9 @@ + private: + // the static application instance if it was created. + static LLApp* sApplication; +- ++#if 0 + google_breakpad::ExceptionHandler * mExceptionHandler; +- ++#endif + + #if !LL_WINDOWS + friend void default_unix_signal_handler(int signum, siginfo_t *info, void *); |