diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-03-10 18:46:07 +0100 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-03-12 16:02:37 +0100 |
commit | 43bf50d5ced4b878f747075f8c0f1b32991c290e (patch) | |
tree | 9fa1d0957beff06dd9e21596e0bd88bccc1eac5a | |
parent | da3331fe4b5a79f874242b38e2a05fb280976c90 (diff) |
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@libreoffice.org>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
-rw-r--r-- | vcl/win/gdi/salprn.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
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 |