summaryrefslogtreecommitdiff
path: root/sw/CppunitTest_sw_uibase_uno.mk
AgeCommit message (Collapse)Author
2020-09-30sw: fix heap-use-after-free in the UnoActionContext dtorMiklos Vajna
When lockControllers() is followed by close() + dispose(), but no match unlock first: ==8514==ERROR: AddressSanitizer: heap-use-after-free on address 0x6190002d1b58 at pc 0x7f48b13f5b85 bp 0x7fff557d98c0 sp 0x7fff557d98b8 ... #3 0x7f48b138beca in SwDoc::getIDocumentLayoutAccess() /sw/source/core/doc/doc.cxx:412:12 #4 0x7f48b58db224 in UnoActionContext::~UnoActionContext() /sw/source/core/unocore/unoobj2.cxx:200:49 ... #15 0x7f48b841c484 in SwXTextDocument::~SwXTextDocument() /sw/source/uibase/uno/unotxdoc.cxx:439:1 freed by thread T0 here: #1 0x7f48b1388a26 in SwDoc::release() /sw/source/core/doc/doc.cxx:118:9 ... #17 0x7f48d15a40e5 in SfxBaseModel::dispose() /sfx2/source/doc/sfxbasemodel.cxx:755:13 #18 0x7f48b8429a48 in SwXTextDocument::dispose() /sw/source/uibase/uno/unotxdoc.cxx:586:19 Change-Id: I39bf65e43c12ce5ee49bdedeb1673b934ca21106 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103709 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins