[Libreoffice-commits] core.git: cli_ure/Executable_climaker.mk cli_ure/Library_cli_cppuhelper_native.mk cli_ure/Library_cli_uno.mk desktop/source sal/inc sal/osl solenv/gbuild
Markus Mohrhard
markus.mohrhard at googlemail.com
Mon Jun 20 15:19:08 UTC 2016
cli_ure/Executable_climaker.mk | 2 -
cli_ure/Library_cli_cppuhelper_native.mk | 1
cli_ure/Library_cli_uno.mk | 1
desktop/source/app/app.cxx | 3 -
sal/inc/signalshared.hxx | 2 -
sal/osl/all/signalshared.cxx | 9 +----
sal/osl/unx/signal.cxx | 2 -
sal/osl/w32/signal.cxx | 48 -------------------------------
solenv/gbuild/platform/com_MSC_defs.mk | 2 -
9 files changed, 7 insertions(+), 63 deletions(-)
New commits:
commit 62c047ffb397802c09df9070492e70725928cadf
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Mon Jun 20 09:02:47 2016 +0200
switch to EHs on windows
This seems to be a good idea based on several discussions
in the project. In the end catching SEH exceptions is just
going to cause strange platform dependent bahavior.
This patch is based on on
http://thread.gmane.org/gmane.comp.documentfoundation.libreoffice.scm/39102/focus=55516
and includes some additional cleanup of the sal signal code.
Change-Id: Iedc998e37e6495afec445eccb60fa1c2b1a7defd
Reviewed-on: https://gerrit.libreoffice.org/26497
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/cli_ure/Executable_climaker.mk b/cli_ure/Executable_climaker.mk
index 2d99b1f..298f01e 100644
--- a/cli_ure/Executable_climaker.mk
+++ b/cli_ure/Executable_climaker.mk
@@ -15,7 +15,7 @@ $(eval $(call gb_Executable_use_package,climaker,\
$(eval $(call gb_Executable_add_cxxflags,climaker,\
-AI $(INSTDIR)/$(LIBO_URE_LIB_FOLDER) \
- -clr \
+ -EHa -clr \
-LN \
-wd4339 \
-wd4715 \
diff --git a/cli_ure/Library_cli_cppuhelper_native.mk b/cli_ure/Library_cli_cppuhelper_native.mk
index 952bba8..52314a3 100644
--- a/cli_ure/Library_cli_cppuhelper_native.mk
+++ b/cli_ure/Library_cli_cppuhelper_native.mk
@@ -15,6 +15,7 @@ $(eval $(call gb_Library_Assembly,cli_cppuhelper))
# in CLR meta-data - use of this type may lead to a runtime exception":
$(eval $(call gb_Library_add_cxxflags,cli_cppuhelper,\
-AI $(INSTDIR)/$(LIBO_URE_LIB_FOLDER) \
+ -EHa \
-clr \
-wd4339 \
))
diff --git a/cli_ure/Library_cli_uno.mk b/cli_ure/Library_cli_uno.mk
index 58b2d4f..0629a17 100644
--- a/cli_ure/Library_cli_uno.mk
+++ b/cli_ure/Library_cli_uno.mk
@@ -11,6 +11,7 @@ $(eval $(call gb_Library_Library,cli_uno))
$(eval $(call gb_Library_add_cxxflags,cli_uno,\
-AI $(INSTDIR)/$(LIBO_URE_LIB_FOLDER) \
+ -EHa \
-clr \
-wd4339 \
))
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index cee0fb9..fab48e1 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1433,9 +1433,6 @@ int Desktop::Main()
SetSplashScreenProgress(30);
- // set static variable to disable crash reporting
- osl_setErrorReporting( false );
-
// create title string
LanguageTag aLocale( LANGUAGE_SYSTEM);
ResMgr* pLabelResMgr = GetDesktopResManager();
diff --git a/sal/inc/signalshared.hxx b/sal/inc/signalshared.hxx
index 3eaa32c..fecedf5 100644
--- a/sal/inc/signalshared.hxx
+++ b/sal/inc/signalshared.hxx
@@ -30,7 +30,6 @@ struct oslSignalHandlerImpl
oslSignalHandlerImpl* pNext;
};
-extern bool bErrorReportingEnabled;
extern bool bInitSignal;
oslSignalAction callSignalHandler(oslSignalInfo* pInfo);
@@ -38,7 +37,6 @@ oslSignalAction callSignalHandler(oslSignalInfo* pInfo);
// platform-specific functions that need to be implemented
bool onInitSignal();
bool onDeInitSignal();
-void onErrorReportingChanged(bool enabled);
#endif
diff --git a/sal/osl/all/signalshared.cxx b/sal/osl/all/signalshared.cxx
index 341d7dc..9110ab1 100644
--- a/sal/osl/all/signalshared.cxx
+++ b/sal/osl/all/signalshared.cxx
@@ -23,7 +23,6 @@
#include <osl/diagnose.h>
-bool bErrorReportingEnabled = true;
bool bInitSignal = false;
namespace
@@ -156,12 +155,10 @@ oslSignalAction SAL_CALL osl_raiseSignal(sal_Int32 userSignal, void* userData)
return action;
}
-sal_Bool SAL_CALL osl_setErrorReporting( sal_Bool bEnable )
+sal_Bool SAL_CALL osl_setErrorReporting( sal_Bool /*bEnable*/ )
{
- bool bOld = bErrorReportingEnabled;
- bErrorReportingEnabled = bEnable;
- onErrorReportingChanged(bEnable);
- return bOld;
+ // this is part of the stable API
+ return false;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/osl/unx/signal.cxx b/sal/osl/unx/signal.cxx
index d424451..ba54979 100644
--- a/sal/osl/unx/signal.cxx
+++ b/sal/osl/unx/signal.cxx
@@ -281,8 +281,6 @@ bool onDeInitSignal()
return false;
}
-void onErrorReportingChanged(SAL_UNUSED_PARAMETER bool) {}
-
namespace
{
void printStack(int sig)
diff --git a/sal/osl/w32/signal.cxx b/sal/osl/w32/signal.cxx
index 071df17..743d2b2 100644
--- a/sal/osl/w32/signal.cxx
+++ b/sal/osl/w32/signal.cxx
@@ -37,8 +37,6 @@
#include <errorrep.h>
#include <systools/win32/uwinapi.h>
#include <sal/macros.h>
-#include <eh.h>
-#include <stdexcept>
namespace
{
@@ -147,52 +145,6 @@ long WINAPI signalHandlerFunction(LPEXCEPTION_POINTERS lpEP)
return EXCEPTION_CONTINUE_EXECUTION;
}
-void win_seh_translator( unsigned nSEHCode, _EXCEPTION_POINTERS* /* pExcPtrs */)
-{
- const char* pSEHName = nullptr;
- switch( nSEHCode)
- {
- case EXCEPTION_ACCESS_VIOLATION: pSEHName = "SEH Exception: ACCESS VIOLATION"; break;
- case EXCEPTION_DATATYPE_MISALIGNMENT: pSEHName = "SEH Exception: DATATYPE MISALIGNMENT"; break;
- case EXCEPTION_BREAKPOINT: /*pSEHName = "SEH Exception: BREAKPOINT";*/ break;
- case EXCEPTION_SINGLE_STEP: /*pSEHName = "SEH Exception: SINGLE STEP";*/ break;
- case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: pSEHName = "SEH Exception: ARRAY BOUNDS EXCEEDED"; break;
- case EXCEPTION_FLT_DENORMAL_OPERAND: pSEHName = "SEH Exception: DENORMAL FLOAT OPERAND"; break;
- case EXCEPTION_FLT_DIVIDE_BY_ZERO: pSEHName = "SEH Exception: FLOAT DIVIDE_BY_ZERO"; break;
- case EXCEPTION_FLT_INEXACT_RESULT: pSEHName = "SEH Exception: FLOAT INEXACT RESULT"; break;
- case EXCEPTION_FLT_INVALID_OPERATION: pSEHName = "SEH Exception: INVALID FLOAT OPERATION"; break;
- case EXCEPTION_FLT_OVERFLOW: pSEHName = "SEH Exception: FLOAT OVERFLOW"; break;
- case EXCEPTION_FLT_STACK_CHECK: pSEHName = "SEH Exception: FLOAT STACK_CHECK"; break;
- case EXCEPTION_FLT_UNDERFLOW: pSEHName = "SEH Exception: FLOAT UNDERFLOW"; break;
- case EXCEPTION_INT_DIVIDE_BY_ZERO: pSEHName = "SEH Exception: INTEGER DIVIDE_BY_ZERO"; break;
- case EXCEPTION_INT_OVERFLOW: pSEHName = "SEH Exception: INTEGER OVERFLOW"; break;
- case EXCEPTION_PRIV_INSTRUCTION: pSEHName = "SEH Exception: PRIVILEGED INSTRUCTION"; break;
- case EXCEPTION_IN_PAGE_ERROR: pSEHName = "SEH Exception: IN_PAGE_ERROR"; break;
- case EXCEPTION_ILLEGAL_INSTRUCTION: pSEHName = "SEH Exception: ILLEGAL INSTRUCTION"; break;
- case EXCEPTION_NONCONTINUABLE_EXCEPTION: pSEHName = "SEH Exception: NONCONTINUABLE EXCEPTION"; break;
- case EXCEPTION_STACK_OVERFLOW: pSEHName = "SEH Exception: STACK OVERFLOW"; break;
- case EXCEPTION_INVALID_DISPOSITION: pSEHName = "SEH Exception: INVALID DISPOSITION"; break;
- case EXCEPTION_GUARD_PAGE: pSEHName = "SEH Exception: GUARD PAGE"; break;
- case EXCEPTION_INVALID_HANDLE: pSEHName = "SEH Exception: INVALID HANDLE"; break;
-// case EXCEPTION_POSSIBLE_DEADLOCK: pSEHName = "SEH Exception: POSSIBLE DEADLOCK"; break;
- default: pSEHName = "Unknown SEH Exception"; break;
- }
-
- if( pSEHName)
- throw std::runtime_error( pSEHName);
-}
-
-}
-
-void onErrorReportingChanged(bool bEnable)
-{
-#if defined _MSC_VER
- if( !bEnable) // if the crash reporter is disabled
- {
- // fall back to handle Window's SEH events as C++ exceptions
- _set_se_translator( win_seh_translator);
- }
-#endif
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk
index b2af97f..382df3e 100644
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -270,7 +270,7 @@ gb_CXX03FLAGS :=
gb_LinkTarget_EXCEPTIONFLAGS := \
-DEXCEPTIONS_ON \
- -EHa \
+ -EHs \
gb_PrecompiledHeader_EXCEPTIONFLAGS := $(gb_LinkTarget_EXCEPTIONFLAGS)
More information about the Libreoffice-commits
mailing list