Kaydet (Commit) 8e7f2584 authored tarafından Tor Lillqvist's avatar Tor Lillqvist Kaydeden (comit) Tor Lillqvist

Add workaround to avoid crash when exiting LibreOffice

Reintroduce the horrible CPPU_LEAK_STATIC_DATA hack used in OOo 3.2.1,
but only for Windows builds. No idea what causes the crash. See
fdo#31494. Don't know if this hack has some bad consequences then,
i#107490 seems to say so.
üst 77e32f33
...@@ -275,6 +275,7 @@ inline void TypeDescriptor_Init_Impl::callChain( ...@@ -275,6 +275,7 @@ inline void TypeDescriptor_Init_Impl::callChain(
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
TypeDescriptor_Init_Impl::~TypeDescriptor_Init_Impl() SAL_THROW( () ) TypeDescriptor_Init_Impl::~TypeDescriptor_Init_Impl() SAL_THROW( () )
{ {
#ifndef CPPU_LEAK_STATIC_DATA
if( pCache ) if( pCache )
{ {
TypeDescriptionList_Impl::const_iterator aIt = pCache->begin(); TypeDescriptionList_Impl::const_iterator aIt = pCache->begin();
...@@ -354,6 +355,7 @@ TypeDescriptor_Init_Impl::~TypeDescriptor_Init_Impl() SAL_THROW( () ) ...@@ -354,6 +355,7 @@ TypeDescriptor_Init_Impl::~TypeDescriptor_Init_Impl() SAL_THROW( () )
#endif #endif
delete pCallbacks; delete pCallbacks;
pCallbacks = 0; pCallbacks = 0;
#endif // CPPU_LEAK_STATIC_DATA
if( pMutex ) if( pMutex )
{ {
......
...@@ -45,9 +45,16 @@ CFLAGS += -O ...@@ -45,9 +45,16 @@ CFLAGS += -O
.ELSE .ELSE
# msvc++: no inlining
.IF "$(COM)" == "MSC" .IF "$(COM)" == "MSC"
# msvc++: no inlining
CFLAGS += -Ob0 CFLAGS += -Ob0
.IF "$(cppu_no_leak)" == ""
.IF "$(bndchk)" == ""
# msvc++: workaround for strange crash at exit: just don't do the
# cleanup of types and whatnot...
CFLAGS += -DCPPU_LEAK_STATIC_DATA
.ENDIF
.ENDIF
.ENDIF .ENDIF
.ENDIF .ENDIF
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment