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

New commits:
commit 43bf50d5ced4b878f747075f8c0f1b32991c290e
Author: Mike Kaganski <mike.kagan...@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 <c...@libreoffice.org>
    Reviewed-by: Jan-Marek Glogowski <glo...@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
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to