office-gobmx/sw/CppunitTest_sw_uibase_uno.mk
Miklos Vajna e08afec61a sw: fix heap-use-after-free in the UnoActionContext dtor
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
2020-09-30 19:09:55 +02:00

74 lines
1.8 KiB
Makefile

# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#*************************************************************************
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
#*************************************************************************
$(eval $(call gb_CppunitTest_CppunitTest,sw_uibase_uno))
$(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_uibase_uno))
$(eval $(call gb_CppunitTest_add_exception_objects,sw_uibase_uno, \
sw/qa/uibase/uno/uno \
))
$(eval $(call gb_CppunitTest_use_libraries,sw_uibase_uno, \
comphelper \
cppu \
cppuhelper \
editeng \
sal \
sfx \
svl \
svx \
svxcore \
sw \
swqahelper \
test \
unotest \
utl \
vcl \
))
$(eval $(call gb_CppunitTest_use_externals,sw_uibase_uno,\
boost_headers \
libxml2 \
))
$(eval $(call gb_CppunitTest_set_include,sw_uibase_uno,\
-I$(SRCDIR)/sw/inc \
-I$(SRCDIR)/sw/source/core/inc \
-I$(SRCDIR)/sw/source/uibase/inc \
-I$(SRCDIR)/sw/qa/inc \
$$(INCLUDE) \
))
$(eval $(call gb_CppunitTest_use_api,sw_uibase_uno,\
udkapi \
offapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sw_uibase_uno))
$(eval $(call gb_CppunitTest_use_vcl,sw_uibase_uno))
$(eval $(call gb_CppunitTest_use_rdb,sw_uibase_uno,services))
$(eval $(call gb_CppunitTest_use_custom_headers,sw_uibase_uno,\
officecfg/registry \
))
$(eval $(call gb_CppunitTest_use_configuration,sw_uibase_uno))
$(eval $(call gb_CppunitTest_use_uiconfigs,sw_uibase_uno, \
modules/swriter \
))
$(eval $(call gb_CppunitTest_use_more_fonts,sw_uibase_uno))
# vim: set noet sw=4 ts=4: