[Libreoffice-commits] core.git: svl/source unotools/source

Jochen Nitschke j.nitschke+logerrit at ok.de
Mon Jun 19 13:40:08 UTC 2017


 svl/source/numbers/zforlist.cxx             |    4 ++--
 unotools/source/config/syslocaleoptions.cxx |    4 ++--
 unotools/source/misc/syslocale.cxx          |    4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 101fdd94011d734d68ffd07fe9b92200c118dded
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date:   Mon Jun 19 13:08:34 2017 +0200

    fix regression, some mutexes need to live longer
    
    commit 6149da20ddee5c0c50b445fb6a4e3e81b5ff900b
        replace misc double checked locking patterns
        ... with thread safe local statics
    
    reintroduced bug #i77768# despite big comment
    
    Change-Id: Ic6e204a277c8aa4f43c5fd15a42066c6f8a69dad
    Reviewed-on: https://gerrit.libreoffice.org/38959
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 1b77382bc6bd..3d582a33da0f 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -353,9 +353,9 @@ void SvNumberFormatter::ChangeIntl(LanguageType eLnge)
     // #i77768# Due to a static reference in the toolkit lib
     // we need a mutex that lives longer than the svl library.
     // Otherwise the dtor would use a destructed mutex!!
-    static ::osl::Mutex persistantMutex;
+    static osl::Mutex* persistentMutex(new osl::Mutex);
 
-    return persistantMutex;
+    return *persistentMutex;
 }
 
 
diff --git a/unotools/source/config/syslocaleoptions.cxx b/unotools/source/config/syslocaleoptions.cxx
index ed1675ffaed1..c2123684396c 100644
--- a/unotools/source/config/syslocaleoptions.cxx
+++ b/unotools/source/config/syslocaleoptions.cxx
@@ -526,9 +526,9 @@ Mutex& SvtSysLocaleOptions::GetMutex()
     // #i77768# Due to a static reference in the toolkit lib
     // we need a mutex that lives longer than the svl library.
     // Otherwise the dtor would use a destructed mutex!!
-    static Mutex persistentMutex;
+    static Mutex* persistentMutex(new Mutex);
 
-    return persistentMutex;
+    return *persistentMutex;
 }
 
 bool SvtSysLocaleOptions::IsModified()
diff --git a/unotools/source/misc/syslocale.cxx b/unotools/source/misc/syslocale.cxx
index 0dcecca29392..8dd7a5824982 100644
--- a/unotools/source/misc/syslocale.cxx
+++ b/unotools/source/misc/syslocale.cxx
@@ -137,9 +137,9 @@ Mutex& SvtSysLocale::GetMutex()
     // #i77768# Due to a static reference in the toolkit lib
     // we need a mutex that lives longer than the svl library.
     // Otherwise the dtor would use a destructed mutex!!
-    static Mutex persistentMutex;
+    static Mutex* persistentMutex(new Mutex);
 
-    return persistentMutex;
+    return *persistentMutex;
 }
 
 const LocaleDataWrapper& SvtSysLocale::GetLocaleData() const


More information about the Libreoffice-commits mailing list