[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - vcl/win

Mike Kaganski mike.kaganski at collabora.com
Tue Mar 13 20:08:39 UTC 2018


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

New commits:
commit 96cd4feb3ae133c19808ca0df2dab02595bb5588
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>
    (cherry picked from commit 43bf50d5ced4b878f747075f8c0f1b32991c290e)
    Reviewed-on: https://gerrit.libreoffice.org/51153
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx
index a961bbf4ace2..2ad7e345f8f9 100644
--- a/vcl/win/gdi/salprn.cxx
+++ b/vcl/win/gdi/salprn.cxx
@@ -1300,6 +1300,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