[Libreoffice-commits] core.git: vcl/win

Mike Kaganski mike.kaganski at collabora.com
Mon Mar 12 15:03:00 UTC 2018


 vcl/win/gdi/salprn.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 43bf50d5ced4b878f747075f8c0f1b32991c290e
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date:   Sat Mar 10 18:46:07 2018 +0100

    tdf#115649: ensure we own SolarMutex in the callback
    
    The crash is caused by releasing SolarMutex we don't own; the release happens
    in Application::Reschedule() inside SalPrintAbortProc.
    
    The crashing callstack:
    
    ucrtbase.dll!abort()
    mergedlo.dll!comphelper::GenericSolarMutex::doRelease(bool bUnlockAll) Line 72
    mergedlo.dll!SalYieldMutex::doRelease(bool bUnlockAll) Line 177
    [Inline Frame] mergedlo.dll!SolarMutexReleaser::{ctor}() Line 1473
    mergedlo.dll!WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) Line 550
    mergedlo.dll!ImplYield(bool i_bWait, bool i_bAllEvents) Line 469
    mergedlo.dll!SalPrintAbortProc(HDC__ * hPrnDC, int __formal) Line 1308
    gdi32full.dll!vSAPCallback()
    gdi32full.dll!ExtEscapeImpl()
    gdi32.dll!ExtEscape()
    [Frames may be missing, no binary loaded for KMUU727V.DLL]
    KMUU727V.DLL!0000000011d0dc21()
    
    Change-Id: I955eab7894186900d0d99e28f62d87cc645e4a5a
    Reviewed-on: https://gerrit.libreoffice.org/51052
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>

diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx
index 7ba4ff25e418..37b72ebfadcd 100644
--- a/vcl/win/gdi/salprn.cxx
+++ b/vcl/win/gdi/salprn.cxx
@@ -1297,6 +1297,8 @@ BOOL CALLBACK SalPrintAbortProc( HDC hPrnDC, int /* nError */ )
     WinSalPrinter* pPrinter;
     bool        bWhile = true;
 
+    // Ensure we handle the mutex which will be released in WinSalInstance::DoYield
+    SolarMutexGuard aSolarMutexGuard;
     do
     {
         // process messages


More information about the Libreoffice-commits mailing list