summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-01-04 20:43:25 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-01-07 11:41:32 +0000
commit8ab4d2f29fdd2c058db23f6ee7b2200655d4c6f6 (patch)
tree27239b59958edbe97faa9d3d72bc172a0af32d36 /sal
parent0d44e98d6aa2c390fd9bcdd97290f463b136ddb6 (diff)
drop crashrep unused since start of LibreOffice
Change-Id: I3df1216054c133314b2317849744a0a37e9fbc8f Reviewed-on: https://gerrit.libreoffice.org/13733 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/signal.cxx515
-rw-r--r--sal/osl/w32/signal.cxx132
2 files changed, 2 insertions, 645 deletions
diff --git a/sal/osl/unx/signal.cxx b/sal/osl/unx/signal.cxx
index 29359b0a78c9..f0c7ad999408 100644
--- a/sal/osl/unx/signal.cxx
+++ b/sal/osl/unx/signal.cxx
@@ -29,9 +29,6 @@
#if defined( INTEL )
#include "backtrace.h"
#define INCLUDE_BACKTRACE
-#if HAVE_FEATURE_CRASHDUMP
-#define STACKTYPE "MacOsX_X86"
-#endif
#endif /* INTEL */
#endif /* MACOSX */
@@ -40,9 +37,6 @@
#include <execinfo.h>
#include <link.h>
#define INCLUDE_BACKTRACE
-#if HAVE_FEATURE_CRASHDUMP
-#define STACKTYPE "Linux"
-#endif
#endif
#ifdef SOLARIS
@@ -50,16 +44,6 @@
#include "backtrace.h"
#define INCLUDE_BACKTRACE
-#if HAVE_FEATURE_CRASHDUMP
-#if defined( SPARC )
-#define STACKTYPE "Solaris_Sparc"
-#elif defined( INTEL )
-#define STACKTYPE "Solaris_X86"
-#else
-#define STACKTYPE "Solaris_Unknown"
-#endif
-#endif
-
#endif /* defined SOLARIS */
#if defined INCLUDE_BACKTRACE
@@ -81,11 +65,7 @@
#define ACT_EXIT 2
#define ACT_SYSTEM 3
#define ACT_HIDE 4
-#if HAVE_FEATURE_CRASHDUMP
-# define ACT_ABORT 5
-#else
-# define ACT_ABORT ACT_SYSTEM
-#endif
+#define ACT_ABORT ACT_SYSTEM
#if defined HAVE_VALGRIND_HEADERS
#include <valgrind/memcheck.h>
@@ -314,495 +294,6 @@ static bool DeInitSignal(void)
return false;
}
-#if HAVE_FEATURE_CRASHDUMP && defined(INCLUDE_BACKTRACE)
-
-static sal_uInt32 calc_md5_checksum( const char *filename, sal_uInt8 *pChecksum, sal_uInt32 nChecksumLen )
-{
- sal_uInt32 nBytesProcessed = 0;
-
- FILE *fp = fopen( filename, "r" );
-
- if ( fp )
- {
- rtlDigest digest = rtl_digest_createMD5();
-
- if ( digest )
- {
- size_t nBytesRead;
- sal_uInt8 buffer[4096];
- rtlDigestError error = rtl_Digest_E_None;
-
- while ( rtl_Digest_E_None == error &&
- 0 != (nBytesRead = fread( buffer, 1, sizeof(buffer), fp )) )
- {
- error = rtl_digest_updateMD5( digest, buffer, nBytesRead );
- nBytesProcessed += nBytesRead;
- }
-
- if ( rtl_Digest_E_None == error )
- {
- error = rtl_digest_getMD5( digest, pChecksum, nChecksumLen );
- }
-
- if ( rtl_Digest_E_None != error )
- nBytesProcessed = 0;
-
- rtl_digest_destroyMD5( digest );
- }
-
- fclose( fp );
- }
-
- return nBytesProcessed;
-}
-
-/*****************************************************************************/
-/* Call crash reporter */
-/*****************************************************************************/
-
-/* Helper function to encode and write a string to a stream */
-
-static int fputs_xml( const char *string, FILE *stream )
-{
- int result = 0;
-
- while ( result >= 0 && *string )
- {
- switch( *string )
- {
- case '&':
- result = fputs( "&amp;", stream );
- break;
- case '<':
- result = fputs( "&lt;", stream );
- break;
- case '>':
- result = fputs( "&gt;", stream );
- break;
- default:
- result = fputc( *string, stream );
- break;
- }
-
- string++;
- }
-
- return result;
-}
-#endif
-
-/* Create intermediate files and run crash reporter */
-
-#if HAVE_FEATURE_CRASHDUMP && defined INCLUDE_BACKTRACE && defined LINUX
-
-typedef struct
-{
- const char *name;
- ElfW(Off) offset;
-} dynamic_entry;
-
-static int
-callback(struct dl_phdr_info *info, size_t size, void *data)
-{
- const ElfW(Phdr) *pDynamic = NULL;
-
- if (size == sizeof(struct dl_phdr_info))
- {
- int i;
- for (i = 0; i < info->dlpi_phnum; ++i)
- {
- if (info->dlpi_phdr[i].p_type == PT_DYNAMIC)
- {
- pDynamic = &(info->dlpi_phdr[i]);
- break;
- }
- }
- }
-
- if (pDynamic)
- {
- char exe[PATH_MAX];
- const char *dsoname = info->dlpi_name;
-
- dynamic_entry* entry = (dynamic_entry*)data;
-
- if (strcmp(dsoname, "") == 0)
- {
- char buffer[100];
- int len;
-
- snprintf(buffer, sizeof(buffer), "/proc/%d/exe", getpid());
- if ((len = readlink(buffer, exe, PATH_MAX)) != -1)
- {
- exe[len] = '\0';
- dsoname = exe;
- }
- }
-
- if (strcmp(dsoname, entry->name) == 0)
- {
- entry->offset = pDynamic->p_offset;
- return 1;
- }
- }
- return 0;
-}
-
-/* Get the location of the .dynamic section offset for the given elf file.
- * i.e. same as the "Offset" value shown for DYNAMIC from readelf -l foo
- *
- * We want to know this value so that if the binaries have been modified
- * by prelink then we can still process the call stack on server side
- * by comparing this value to that of an "un-prelinked but known to be
- * otherwise equivalent" version of those binaries and adjust the call
- * stack addresses by the differences between .dynamic addresses so as
- * to be able to map the prelinked addresses back to the unprelinked
- * addresses
- *
- * cmc@openoffice.org
- */
-static ElfW(Off)
-dynamic_section_offset(const char *name)
-{
- dynamic_entry entry;
-
- entry.name = name;
- entry.offset = 0;
-
- dl_iterate_phdr(callback, &entry);
-
- return entry.offset;
-}
-#endif
-
-static int ReportCrash( int Signal )
-{
-#if HAVE_FEATURE_CRASHDUMP
-
-#define REPORTENV_PARAM "-crashreportenv:"
-
- static bool bCrashReporterExecuted = false;
- bool bAutoCrashReport = false;
-
- sal_uInt32 argi;
- sal_uInt32 argc;
- rtl_uString *ustrCommandArg = NULL;
-
- if ( !bErrorReportingEnabled )
- return -1;
-
- argc = osl_getCommandArgCount();
-
- for ( argi = 0; argi < argc; argi++ )
- {
- osl_getCommandArg( argi, &ustrCommandArg );
- if ( 0 == rtl_ustr_ascii_compare( rtl_uString_getStr( ustrCommandArg ), "--nocrashreport" ) )
- {
- rtl_uString_release( ustrCommandArg );
- return -1;
- }
- else if ( 0 == rtl_ustr_ascii_compare( rtl_uString_getStr( ustrCommandArg ), "--autocrashreport" ) )
- {
- bAutoCrashReport = true;
- }
- else if ( 0 == rtl_ustr_ascii_shortenedCompare_WithLength(
- rtl_uString_getStr( ustrCommandArg ), rtl_uString_getLength( ustrCommandArg ),
- REPORTENV_PARAM, strlen(REPORTENV_PARAM) )
- )
- {
- rtl_uString *ustrEnvironment = NULL;
- rtl_String *strEnv = NULL;
-
- rtl_uString_newFromStr( &ustrEnvironment, rtl_uString_getStr( ustrCommandArg ) + strlen(REPORTENV_PARAM) );
-
- if ( ustrEnvironment )
- {
- rtl_uString2String(
- &strEnv,
- rtl_uString_getStr( ustrEnvironment ), rtl_uString_getLength( ustrEnvironment ),
- osl_getThreadTextEncoding(), OUSTRING_TO_OSTRING_CVTFLAGS
- );
-
- if ( strEnv )
- {
- putenv( rtl_string_getStr( strEnv ) );
- rtl_string_release( strEnv );
- }
-
- rtl_uString_release( ustrEnvironment );
- }
- }
- }
-
- if ( ustrCommandArg )
- rtl_uString_release( ustrCommandArg );
-
- if ( !bCrashReporterExecuted )
- {
- int i;
- /* struct sigaction act; */
-
- for (i = 0; i < NoSignals; i++)
- {
- if (Signals[i].Signal == Signal && Signals[i].Action == ACT_ABORT )
- {
- int ret;
- char szShellCmd[512] = { '\0' };
- char *pXMLTempName = NULL;
- char *pStackTempName = NULL;
- char *pChecksumTempName = NULL;
-
-#ifdef INCLUDE_BACKTRACE
- char szXMLTempNameBuffer[L_tmpnam];
- char szChecksumTempNameBuffer[L_tmpnam];
- char szStackTempNameBuffer[L_tmpnam];
-
- void *stackframes[MAX_STACK_FRAMES];
- int nFrames = backtrace( stackframes, SAL_N_ELEMENTS(stackframes) );
-
- FILE *xmlout = NULL, *stackout = NULL, *checksumout = NULL;
- int fdxml, fdstk, fdchksum;
-
- strncpy( szXMLTempNameBuffer, P_tmpdir, sizeof(szXMLTempNameBuffer) );
- strncat( szXMLTempNameBuffer, "/crxmlXXXXXX", sizeof(szXMLTempNameBuffer) - strlen(szXMLTempNameBuffer) - 1 );
-
- strncpy( szStackTempNameBuffer, P_tmpdir, sizeof(szStackTempNameBuffer) );
- strncat( szStackTempNameBuffer, "/crstkXXXXXX", sizeof(szStackTempNameBuffer) - strlen(szStackTempNameBuffer) - 1 );
-
- strncpy( szChecksumTempNameBuffer, P_tmpdir, sizeof(szChecksumTempNameBuffer) );
- strncat( szChecksumTempNameBuffer, "/crchkXXXXXX", sizeof(szChecksumTempNameBuffer) - strlen(szChecksumTempNameBuffer) - 1 );
-
- fdxml = mkstemp(szXMLTempNameBuffer);
- fdstk = mkstemp(szStackTempNameBuffer);
- fdchksum = mkstemp(szChecksumTempNameBuffer);
-
- xmlout = fdopen( fdxml , "w" );
- stackout = fdopen( fdstk , "w" );
- checksumout = fdopen( fdchksum, "w" );
-
- pXMLTempName = szXMLTempNameBuffer;
- pStackTempName = szStackTempNameBuffer;
- pChecksumTempName = szChecksumTempNameBuffer;
-
- if ( xmlout && stackout && checksumout )
- {
- fprintf( xmlout, "<errormail:Stack type=\"%s\">\n", STACKTYPE );
-
- fprintf( checksumout, "<errormail:Checksums type=\"MD5\">\n" );
-
- int iFrame;
- for ( iFrame = 0; iFrame < nFrames; iFrame++ )
- {
- Dl_info dl_info;
-
- fprintf( stackout, "0x%" SAL_PRIxUINTPTR ":",
- reinterpret_cast<sal_uIntPtr>(stackframes[iFrame]) );
-
- fprintf( xmlout, "<errormail:StackInfo pos=\"%d\" ip=\"0x%" SAL_PRIxUINTPTR "\"",
- iFrame,
- reinterpret_cast<sal_uIntPtr>(stackframes[iFrame])
- );
-
- memset( &dl_info, 0, sizeof(dl_info) );
-
- /* dladdr may fail */
- if ( dladdr( stackframes[iFrame], &dl_info) )
- {
- const char *dli_fname = NULL;
- char *dli_fdir = NULL;
-
- /* Don't expect that dladdr filled all members of dl_info */
-
- dli_fname = dl_info.dli_fname ? strrchr( dl_info.dli_fname, '/' ) : NULL;
- if ( dli_fname )
- {
- char szDirectory[PATH_MAX];
- char szCanonicDirectory[PATH_MAX];
-
- ++dli_fname;
- memcpy( szDirectory, dl_info.dli_fname, dli_fname - dl_info.dli_fname );
- szDirectory[dli_fname - dl_info.dli_fname] = 0;
-
- dli_fdir = realpath( szDirectory, szCanonicDirectory ) ? szCanonicDirectory : szDirectory;
-
- if ( *dli_fdir && dli_fdir[ strlen(dli_fdir) - 1 ] != '/' )
- strcat( dli_fdir, "/" );
- }
- else
- dli_fname = dl_info.dli_fname;
-
- /* create checksum of library on stack */
- if ( dli_fname )
- {
- sal_uInt8 checksum[RTL_DIGEST_LENGTH_MD5];
-
- sal_uInt32 nBytesProcessed = calc_md5_checksum(
- dl_info.dli_fname, checksum, sizeof(checksum) );
- if ( nBytesProcessed )
- {
- int j;
-
- fprintf( checksumout, "<errormail:Checksum sum=\"0x" );
- for ( j = 0; j < 16; fprintf( checksumout, "%02X", checksum[j++] ) );
- fprintf( checksumout,
- "\" bytes=\"%lu\" file=\"%s\"/>\n",
- sal::static_int_cast<
- unsigned long>(nBytesProcessed),
- dli_fname );
- }
- }
-
- if ( dl_info.dli_fbase && dl_info.dli_fname )
- {
-#ifdef LINUX
- ElfW(Off) dynamic_offset = dynamic_section_offset(dl_info.dli_fname);
- fprintf( stackout, " 0x%" SAL_PRI_SIZET "x:", dynamic_offset);
-#endif
-
- fprintf( stackout, " %s + 0x%" SAL_PRI_PTRDIFFT "x",
- dl_info.dli_fname,
- (char*)stackframes[iFrame] - (char*)dl_info.dli_fbase
- );
-
- fprintf( xmlout, " rel=\"0x%" SAL_PRI_PTRDIFFT "x\"", (char *)stackframes[iFrame] - (char *)dl_info.dli_fbase );
- if ( dli_fname )
- fprintf( xmlout, " name=\"%s\"", dli_fname );
-
- if ( dli_fdir )
- fprintf( xmlout, " path=\"%s\"", dli_fdir );
-
-#ifdef LINUX
- fprintf( xmlout, " dynamicoffset=\"0x%" SAL_PRI_SIZET "x\"", dynamic_offset );
-#endif
- }
- else
- fprintf( stackout, " ????????" );
-
- if ( dl_info.dli_sname && dl_info.dli_saddr )
- {
- fputs( " (", stackout );
- fputs_xml( dl_info.dli_sname, stackout );
- fprintf( stackout, " + 0x%" SAL_PRI_PTRDIFFT "x)",
- (char*)stackframes[iFrame] - (char*)dl_info.dli_saddr );
-
- fputs( " ordinal=\"", xmlout );
- fputs_xml( dl_info.dli_sname, xmlout );
- fprintf( xmlout, "+0x%" SAL_PRI_PTRDIFFT "x\"",
- (char *)stackframes[iFrame] - (char *)dl_info.dli_saddr );
- }
-
- }
- else /* dladdr failed */
- {
- fprintf( stackout, " ????????" );
- }
-
- fprintf( stackout, "\n" );
- fprintf( xmlout, "/>\n" );
-
- }
-
- fprintf( xmlout, "</errormail:Stack>\n" );
- fprintf( checksumout, "</errormail:Checksums>\n" );
- }
- else
- {
- pXMLTempName = NULL;
- pStackTempName = NULL;
- pChecksumTempName = NULL;
- }
-
- if ( stackout )
- fclose( stackout );
- if ( xmlout )
- fclose( xmlout );
- if ( checksumout )
- fclose( checksumout );
-
- if ( pXMLTempName && pChecksumTempName && pStackTempName )
-#endif /* INCLUDE_BACKTRACE */
- {
- rtl_uString * crashrep_url = NULL;
- rtl_uString * crashrep_path = NULL;
- rtl_String * crashrep_path_system = NULL;
- rtl_string2UString(
- &crashrep_url,
- RTL_CONSTASCII_USTRINGPARAM(
- "$BRAND_BASE_DIR/program/crashrep"),
- OSTRING_TO_OUSTRING_CVTFLAGS);
- rtl_bootstrap_expandMacros(&crashrep_url);
- osl_getSystemPathFromFileURL(crashrep_url, &crashrep_path);
- rtl_uString2String(
- &crashrep_path_system,
- rtl_uString_getStr(crashrep_path),
- rtl_uString_getLength(crashrep_path),
- osl_getThreadTextEncoding(),
- (RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR
- | RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR));
- rtl_uString_release(crashrep_url);
- rtl_uString_release(crashrep_path);
-#if defined INCLUDE_BACKTRACE && (defined LINUX || defined MACOSX)
- snprintf( szShellCmd, SAL_N_ELEMENTS(szShellCmd),
- "%s -p %d -s %d -xml %s -chksum %s -stack %s -noui%s",
- rtl_string_getStr(crashrep_path_system),
- getpid(),
- Signal,
- pXMLTempName,
- pChecksumTempName,
- pStackTempName,
- bAutoCrashReport ? " -send" : "" );
-#elif defined INCLUDE_BACKTRACE && defined SOLARIS
- snprintf( szShellCmd, SAL_N_ELEMENTS(szShellCmd),
- "%s -p %d -s %d -xml %s -chksum %s -noui%s",
- rtl_string_getStr(crashrep_path_system),
- getpid(),
- Signal,
- pXMLTempName,
- pChecksumTempName,
- bAutoCrashReport ? " -send" : "" );
-#else
- snprintf( szShellCmd, SAL_N_ELEMENTS(szShellCmd),
- "%s -p %d -s %d -noui%s",
- rtl_string_getStr(crashrep_path_system),
- getpid(), Signal, bAutoCrashReport ? " -send" : "" );
-#endif
- rtl_string_release(crashrep_path_system);
- }
-
- ret = szShellCmd[0] == '\0' ? -1 : system( szShellCmd );
-
- if ( pXMLTempName )
- unlink( pXMLTempName );
-
- if ( pStackTempName )
- unlink( pStackTempName );
-
- if ( pChecksumTempName )
- unlink( pChecksumTempName );
-
- if ( -1 != ret )
- {
- bCrashReporterExecuted = true;
- return 1;
- }
- else
- return -1;
-
- }
- }
-
- return 0;
- }
-
- return 1;
-#else /* HAVE_FEATURE_CRASHDUMP */
- /* the utility crash_report is not build, so do the same as when
- the option -nocrashreport is used */
- (void) Signal; // avoid warnings
- return -1;
-#endif /* HAVE_FEATURE_CRASHDUMP */
-}
-
static void PrintStack( int sig )
{
#ifdef INCLUDE_BACKTRACE
@@ -868,7 +359,6 @@ void CallSystemHandler(int Signal)
break;
case ACT_ABORT: /* terminate witch core dump */
- ReportCrash( Signal );
act.sa_handler = SIG_DFL;
act.sa_flags = 0;
sigemptyset(&(act.sa_mask));
@@ -956,8 +446,6 @@ void SignalHandlerFunction(int Signal)
break;
}
- ReportCrash( Signal );
-
switch (CallSignalHandler(&Info))
{
case osl_Signal_ActCallNextHdl:
@@ -965,7 +453,6 @@ void SignalHandlerFunction(int Signal)
break;
case osl_Signal_ActAbortApp:
- ReportCrash( Signal );
act.sa_handler = SIG_DFL;
act.sa_flags = 0;
sigemptyset(&(act.sa_mask));
diff --git a/sal/osl/w32/signal.cxx b/sal/osl/w32/signal.cxx
index 8236bfc3d1f9..470c1f622675 100644
--- a/sal/osl/w32/signal.cxx
+++ b/sal/osl/w32/signal.cxx
@@ -99,131 +99,12 @@ static oslSignalAction CallSignalHandler(oslSignalInfo *pInfo)
/* SignalHandlerFunction */
/*****************************************************************************/
-#define REPORTENV_PARAM "-crashreportenv:"
-#define REPORTENV_PARAM2 "/crashreportenv:"
-
-static BOOL ReportCrash( LPEXCEPTION_POINTERS lpEP )
-{
- BOOL fSuccess = FALSE;
- BOOL fAutoReport = FALSE;
- TCHAR szBuffer[1024];
- ::osl::LongPathBuffer< sal_Char > aPath( MAX_LONG_PATH );
- LPTSTR lpFilePart;
- PROCESS_INFORMATION ProcessInfo;
- STARTUPINFO StartupInfo;
- int argi;
-
- if ( !bErrorReportingEnabled )
- return FALSE;
-
- /* Check if crash reporter was disabled by command line */
-
- for ( argi = 1; argi < __argc; argi++ )
- {
- if (
- 0 == stricmp( __argv[argi], "--nocrashreport" ) ||
- 0 == stricmp( __argv[argi], "/nocrashreport" )
- )
- return FALSE;
- else if (
- 0 == stricmp( __argv[argi], "--autocrashreport" ) ||
- 0 == stricmp( __argv[argi], "/autocrashreport" )
- )
- fAutoReport = TRUE;
- else if (
- 0 == strnicmp( __argv[argi], REPORTENV_PARAM, strlen(REPORTENV_PARAM) ) ||
- 0 == strnicmp( __argv[argi], REPORTENV_PARAM2, strlen(REPORTENV_PARAM2) )
- )
- {
- const char *envparam = __argv[argi] + strlen(REPORTENV_PARAM);
- const char *delim = strchr(envparam, '=' );
-
- if ( delim )
- {
- CHAR *lpVariable;
- CHAR *lpValue;
- const char *variable = envparam;
- size_t variable_len = delim - envparam;
- const char *value = delim + 1;
- size_t value_len = strlen(envparam) - variable_len - 1;
-
- if ( '\"' == *value )
- {
- const char *quote;
-
- value++;
- value_len--;
-
- quote = strchr( value, '\"' );
- if ( quote )
- value_len = quote - value;
- }
-
- lpVariable = reinterpret_cast< CHAR* >( _alloca( variable_len + 1 ) );
- memcpy( lpVariable, variable, variable_len );
- lpVariable[variable_len] = 0;
-
- lpValue = reinterpret_cast< CHAR* >( _alloca( value_len + 1) );
- memcpy( lpValue, value, value_len );
- lpValue[value_len] = 0;
-
- SetEnvironmentVariable( lpVariable, lpValue );
- }
- }
- }
-
- if ( SearchPath( NULL, TEXT( "crashrep.exe" ), NULL, aPath.getBufSizeInSymbols(), aPath, &lpFilePart ) )
- {
- ZeroMemory( &StartupInfo, sizeof(StartupInfo) );
- StartupInfo.cb = sizeof(StartupInfo.cb);
-
- sntprintf( szBuffer, SAL_N_ELEMENTS(szBuffer),
- _T("%s -p %lu -excp 0x%p -t %lu%s"),
- static_cast<sal_Char*>( aPath ),
- GetCurrentProcessId(),
- lpEP,
- GetCurrentThreadId(),
- fAutoReport ? _T(" -noui -send") : _T(" -noui") );
-
- if (
- CreateProcess(
- NULL,
- szBuffer,
- NULL,
- NULL,
- FALSE,
-#ifdef UNICODE
- CREATE_UNICODE_ENVIRONMENT,
-#else
- 0,
-#endif
- NULL, NULL, &StartupInfo, &ProcessInfo )
- )
- {
- DWORD dwExitCode;
-
- WaitForSingleObject( ProcessInfo.hProcess, INFINITE );
- if ( GetExitCodeProcess( ProcessInfo.hProcess, &dwExitCode ) && 0 == dwExitCode )
-
- fSuccess = TRUE;
-
- }
- }
-
- return fSuccess;
-}
-
-/*****************************************************************************/
-/* SignalHandlerFunction */
-/*****************************************************************************/
-
/* magic Microsoft C++ compiler exception constant */
#define EXCEPTION_MSC_CPP_EXCEPTION 0xe06d7363
static long WINAPI SignalHandlerFunction(LPEXCEPTION_POINTERS lpEP)
{
static sal_Bool bNested = sal_False;
- sal_Bool bRaiseCrashReporter = sal_False;
oslSignalInfo Info;
oslSignalAction Action;
@@ -238,17 +119,14 @@ static long WINAPI SignalHandlerFunction(LPEXCEPTION_POINTERS lpEP)
case EXCEPTION_MSC_CPP_EXCEPTION:
case EXCEPTION_ACCESS_VIOLATION:
Info.Signal = osl_Signal_AccessViolation;
- bRaiseCrashReporter = sal_True;
break;
case EXCEPTION_INT_DIVIDE_BY_ZERO:
Info.Signal = osl_Signal_IntegerDivideByZero;
- bRaiseCrashReporter = sal_True;
break;
case EXCEPTION_FLT_DIVIDE_BY_ZERO:
Info.Signal = osl_Signal_FloatDivideByZero;
- bRaiseCrashReporter = sal_True;
break;
case EXCEPTION_BREAKPOINT:
@@ -257,21 +135,13 @@ static long WINAPI SignalHandlerFunction(LPEXCEPTION_POINTERS lpEP)
default:
Info.Signal = osl_Signal_System;
- bRaiseCrashReporter = sal_True;
break;
}
if ( !bNested )
{
bNested = sal_True;
-
- if ( bRaiseCrashReporter && ReportCrash( lpEP ) )
- {
- CallSignalHandler(&Info);
- Action = osl_Signal_ActKillApp;
- }
- else
- Action = CallSignalHandler(&Info);
+ Action = CallSignalHandler(&Info);
}
else
Action = osl_Signal_ActKillApp;