diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-08-29 11:20:52 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-08-29 11:20:52 +0200 |
commit | 0b02b9c19bc0a87ed146d1f079900c71b8b8051c (patch) | |
tree | e3f14b46c83f63ba834a1850e6b74b8c20972209 | |
parent | Pass --enable-debug also down to external/libepubgen (diff) | |
download | core-0b02b9c19bc0a87ed146d1f079900c71b8b8051c.tar.gz core-0b02b9c19bc0a87ed146d1f079900c71b8b8051c.zip |
Avoid "ThreadSanitizer: lock-order-inversion (potential deadlock)"
...during CppunitTest_svl_qa_cppunit:
> WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=31337)
> Cycle in lock order graph: M497501575317668160 (0x000000000000) => M374215535518415904 (0x000000000000) => M497501575317668160
>
> Mutex M374215535518415904 acquired here while holding mutex M497501575317668160 in main thread:
> #0 pthread_mutex_lock compiler-rt/lib/tsan/../sanitizer_common/sanitizer_common_interceptors.inc:3800 (cppunittester+0x45abd7)
> #1 osl_acquireMutex sal/osl/unx/mutex.cxx:97 (libuno_sal.so.3+0xc1f0a)
> #2 osl::Mutex::acquire() include/osl/mutex.hxx:56 (libutllo.so+0xc0468)
> #3 ClearableGuard include/osl/mutex.hxx:163 (libutllo.so+0x1a535f)
> #4 ResettableGuard include/osl/mutex.hxx:208 (libutllo.so+0x1a2d5c)
> #5 ItemHolder1::impl_addItem(EItem) unotools/source/config/itemholder1.cxx:94 (libutllo.so+0x1a0efe)
> #6 ItemHolder1::holdConfigItem(EItem) unotools/source/config/itemholder1.cxx:83 (libutllo.so+0x1a0e0f)
> #7 SvtSysLocaleOptions unotools/source/config/syslocaleoptions.cxx:511 (libutllo.so+0x219d24)
> #8 SvtSysLocale_Impl unotools/source/misc/syslocale.cxx:60 (libutllo.so+0x2b1862)
> #9 void __gnu_cxx::new_allocator<SvtSysLocale_Impl>::construct<SvtSysLocale_Impl>(SvtSysLocale_Impl*) /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/ext/new_allocator.h:120 (libutllo.so+0x2b45d4)
> #10 void std::allocator_traits<std::allocator<SvtSysLocale_Impl> >::construct<SvtSysLocale_Impl>(std::allocator<SvtSysLocale_Impl>&, SvtSysLocale_Impl*) /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/bits/alloc_traits.h:475 (libutllo.so+0x2b4258)
> #11 _Sp_counted_ptr_inplace<> /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/bits/shared_ptr_base.h:520 (libutllo.so+0x2b3d1a)
> #12 __shared_count<SvtSysLocale_Impl, std::allocator<SvtSysLocale_Impl>> /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/bits/shared_ptr_base.h:615 (libutllo.so+0x2b39bb)
> #13 __shared_ptr<std::allocator<SvtSysLocale_Impl>> /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/bits/shared_ptr_base.h:1099 (libutllo.so+0x2b3827)
> #14 shared_ptr<std::allocator<SvtSysLocale_Impl>> /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/bits/shared_ptr.h:319 (libutllo.so+0x2b37a8)
> #15 std::shared_ptr<SvtSysLocale_Impl> std::allocate_shared<SvtSysLocale_Impl, std::allocator<SvtSysLocale_Impl>>(std::allocator<SvtSysLocale_Impl> const&) /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/bits/shared_ptr.h:619 (libutllo.so+0x2b36b7)
> #16 std::shared_ptr<SvtSysLocale_Impl> std::make_shared<SvtSysLocale_Impl>() /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/bits/shared_ptr.h:635 (libutllo.so+0x2b2f98)
> #17 SvtSysLocale unotools/source/misc/syslocale.cxx:123 (libutllo.so+0x2b232e)
> #18 OnDemandLocaleDataWrapper include/svl/ondemand.hxx:69 (libsvllo.so+0x3fb364)
> #19 SvNumberFormatter svl/source/numbers/zforlist.cxx:258 (libsvllo.so+0x3db143)
> #20 (anonymous namespace)::Test::testNumberFormat() svl/qa/unit/svl.cxx:242 (libtest_svl_qa_cppunit.so+0x108b7)
> #21 void std::__invoke_impl<void, void ((anonymous namespace)::Test::* const&)(), (anonymous namespace)::Test*&>(std::__invoke_memfun_deref, void ((anonymous namespace)::Test::* const&)(), (anonymous namespace)::Test*&) /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/functional:227 (libtest_svl_qa_cppunit.so+0x1e46e)
> #22 std::result_of<void ((anonymous namespace)::Test::* const&((anonymous namespace)::Test*&))()>::type std::__invoke<void ((anonymous namespace)::Test::* const&)(), (anonymous namespace)::Test*&>(void ((anonymous namespace)::Test::* const&)(), (anonymous namespace)::Test*&) /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/functional:250 (libtest_svl_qa_cppunit.so+0x1e35d)
> #23 _ZNKSt12_Mem_fn_baseIMN12_GLOBAL__N_14TestEFvvELb1EEclIJRPS1_EEEDTclsr3stdE8__invokedtdefpT6_M_pmfspclsr3stdE7forwardIT_Efp_EEEDpOS8_ /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/functional:604 (libtest_svl_qa_cppunit.so+0x1e23b)
> #24 void std::_Bind<std::_Mem_fn<void ((anonymous namespace)::Test::*)()> ((anonymous namespace)::Test*)>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/functional:933 (libtest_svl_qa_cppunit.so+0x1e1ab)
> #25 void std::_Bind<std::_Mem_fn<void ((anonymous namespace)::Test::*)()> ((anonymous namespace)::Test*)>::operator()<, void>() /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/functional:991 (libtest_svl_qa_cppunit.so+0x1e0b6)
> #26 std::_Function_handler<void (), std::_Bind<std::_Mem_fn<void ((anonymous namespace)::Test::*)()> ((anonymous namespace)::Test*)> >::_M_invoke(std::_Any_data const&) /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/functional:1731 (libtest_svl_qa_cppunit.so+0x1da7a)
> #27 std::function<void ()>::operator()() const /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/functional:2127 (libtest_svl_qa_cppunit.so+0x2a71e)
> #28 CppUnit::TestCaller<(anonymous namespace)::Test>::runTest() workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:175 (libtest_svl_qa_cppunit.so+0x1d21c)
> #29 CppUnit::TestCaseMethodFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:32 (libcppunit-1.14.so.0+0xd61d2)
> #30 (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) unotest/source/cpp/unobootstrapprotector/unobootstrapprotector.cxx:89 (unobootstrapprotector.so+0x2204)
> #31 CppUnit::ProtectorChain::ProtectFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20 (libcppunit-1.14.so.0+0xc7614)
> #32 (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx:63 (unoexceptionprotector.so+0x23e9)
> #33 CppUnit::ProtectorChain::ProtectFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20 (libcppunit-1.14.so.0+0xc7614)
> #34 CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) workdir/UnpackedTarball/cppunit/src/cppunit/DefaultProtector.cpp:15 (libcppunit-1.14.so.0+0xa57ad)
> #35 CppUnit::ProtectorChain::ProtectFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20 (libcppunit-1.14.so.0+0xc7614)
> #36 CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:86 (libcppunit-1.14.so.0+0xc4a96)
> #37 CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:182 (libcppunit-1.14.so.0+0xf4714)
> #38 CppUnit::TestCase::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:91 (libcppunit-1.14.so.0+0xd5750)
> #39 CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64 (libcppunit-1.14.so.0+0xd6d5a)
> #40 CppUnit::TestComposite::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23 (libcppunit-1.14.so.0+0xd6a2e)
> #41 CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64 (libcppunit-1.14.so.0+0xd6d5a)
> #42 CppUnit::TestComposite::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23 (libcppunit-1.14.so.0+0xd6a2e)
> #43 CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:47 (libcppunit-1.14.so.0+0x10282c)
> #44 CppUnit::TestResult::runTest(CppUnit::Test*) workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:149 (libcppunit-1.14.so.0+0xf4223)
> #45 CppUnit::TestRunner::run(CppUnit::TestResult&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:96 (libcppunit-1.14.so.0+0x102c76)
> #46 (anonymous namespace)::ProtectedFixtureFunctor::run() const sal/cppunittester/cppunittester.cxx:316 (cppunittester+0x4bd1e8)
> #47 sal_main() sal/cppunittester/cppunittester.cxx:466 (cppunittester+0x4bbe1e)
> #48 main sal/cppunittester/cppunittester.cxx:373 (cppunittester+0x4bb695)
>
> Mutex M497501575317668160 previously acquired by the same thread here:
> #0 pthread_mutex_lock compiler-rt/lib/tsan/../sanitizer_common/sanitizer_common_interceptors.inc:3800 (cppunittester+0x45abd7)
> #1 osl_acquireMutex sal/osl/unx/mutex.cxx:97 (libuno_sal.so.3+0xc1f0a)
> #2 osl::Mutex::acquire() include/osl/mutex.hxx:56 (libutllo.so+0xc0468)
> #3 Guard include/osl/mutex.hxx:129 (libutllo.so+0xbca6f)
> #4 SvtSysLocaleOptions unotools/source/config/syslocaleoptions.cxx:504 (libutllo.so+0x219c1d)
> #5 SvtSysLocale_Impl unotools/source/misc/syslocale.cxx:60 (libutllo.so+0x2b1862)
> #6 void __gnu_cxx::new_allocator<SvtSysLocale_Impl>::construct<SvtSysLocale_Impl>(SvtSysLocale_Impl*) /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/ext/new_allocator.h:120 (libutllo.so+0x2b45d4)
> #7 void std::allocator_traits<std::allocator<SvtSysLocale_Impl> >::construct<SvtSysLocale_Impl>(std::allocator<SvtSysLocale_Impl>&, SvtSysLocale_Impl*) /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/bits/alloc_traits.h:475 (libutllo.so+0x2b4258)
> #8 _Sp_counted_ptr_inplace<> /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/bits/shared_ptr_base.h:520 (libutllo.so+0x2b3d1a)
> #9 __shared_count<SvtSysLocale_Impl, std::allocator<SvtSysLocale_Impl>> /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/bits/shared_ptr_base.h:615 (libutllo.so+0x2b39bb)
> #10 __shared_ptr<std::allocator<SvtSysLocale_Impl>> /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/bits/shared_ptr_base.h:1099 (libutllo.so+0x2b3827)
> #11 shared_ptr<std::allocator<SvtSysLocale_Impl>> /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/bits/shared_ptr.h:319 (libutllo.so+0x2b37a8)
> #12 std::shared_ptr<SvtSysLocale_Impl> std::allocate_shared<SvtSysLocale_Impl, std::allocator<SvtSysLocale_Impl>>(std::allocator<SvtSysLocale_Impl> const&) /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/bits/shared_ptr.h:619 (libutllo.so+0x2b36b7)
> #13 std::shared_ptr<SvtSysLocale_Impl> std::make_shared<SvtSysLocale_Impl>() /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/bits/shared_ptr.h:635 (libutllo.so+0x2b2f98)
> #14 SvtSysLocale unotools/source/misc/syslocale.cxx:123 (libutllo.so+0x2b232e)
> #15 OnDemandLocaleDataWrapper include/svl/ondemand.hxx:69 (libsvllo.so+0x3fb364)
> #16 SvNumberFormatter svl/source/numbers/zforlist.cxx:258 (libsvllo.so+0x3db143)
> #17 (anonymous namespace)::Test::testNumberFormat() svl/qa/unit/svl.cxx:242 (libtest_svl_qa_cppunit.so+0x108b7)
> #18 void std::__invoke_impl<void, void ((anonymous namespace)::Test::* const&)(), (anonymous namespace)::Test*&>(std::__invoke_memfun_deref, void ((anonymous namespace)::Test::* const&)(), (anonymous namespace)::Test*&) /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/functional:227 (libtest_svl_qa_cppunit.so+0x1e46e)
> #19 std::result_of<void ((anonymous namespace)::Test::* const&((anonymous namespace)::Test*&))()>::type std::__invoke<void ((anonymous namespace)::Test::* const&)(), (anonymous namespace)::Test*&>(void ((anonymous namespace)::Test::* const&)(), (anonymous namespace)::Test*&) /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/functional:250 (libtest_svl_qa_cppunit.so+0x1e35d)
> #20 _ZNKSt12_Mem_fn_baseIMN12_GLOBAL__N_14TestEFvvELb1EEclIJRPS1_EEEDTclsr3stdE8__invokedtdefpT6_M_pmfspclsr3stdE7forwardIT_Efp_EEEDpOS8_ /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/functional:604 (libtest_svl_qa_cppunit.so+0x1e23b)
> #21 void std::_Bind<std::_Mem_fn<void ((anonymous namespace)::Test::*)()> ((anonymous namespace)::Test*)>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/functional:933 (libtest_svl_qa_cppunit.so+0x1e1ab)
> #22 void std::_Bind<std::_Mem_fn<void ((anonymous namespace)::Test::*)()> ((anonymous namespace)::Test*)>::operator()<, void>() /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/functional:991 (libtest_svl_qa_cppunit.so+0x1e0b6)
> #23 std::_Function_handler<void (), std::_Bind<std::_Mem_fn<void ((anonymous namespace)::Test::*)()> ((anonymous namespace)::Test*)> >::_M_invoke(std::_Any_data const&) /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/functional:1731 (libtest_svl_qa_cppunit.so+0x1da7a)
> #24 std::function<void ()>::operator()() const /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/functional:2127 (libtest_svl_qa_cppunit.so+0x2a71e)
> #25 CppUnit::TestCaller<(anonymous namespace)::Test>::runTest() workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:175 (libtest_svl_qa_cppunit.so+0x1d21c)
> #26 CppUnit::TestCaseMethodFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:32 (libcppunit-1.14.so.0+0xd61d2)
> #27 (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) unotest/source/cpp/unobootstrapprotector/unobootstrapprotector.cxx:89 (unobootstrapprotector.so+0x2204)
> #28 CppUnit::ProtectorChain::ProtectFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20 (libcppunit-1.14.so.0+0xc7614)
> #29 (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx:63 (unoexceptionprotector.so+0x23e9)
> #30 CppUnit::ProtectorChain::ProtectFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20 (libcppunit-1.14.so.0+0xc7614)
> #31 CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) workdir/UnpackedTarball/cppunit/src/cppunit/DefaultProtector.cpp:15 (libcppunit-1.14.so.0+0xa57ad)
> #32 CppUnit::ProtectorChain::ProtectFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20 (libcppunit-1.14.so.0+0xc7614)
> #33 CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:86 (libcppunit-1.14.so.0+0xc4a96)
> #34 CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:182 (libcppunit-1.14.so.0+0xf4714)
> #35 CppUnit::TestCase::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:91 (libcppunit-1.14.so.0+0xd5750)
> #36 CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64 (libcppunit-1.14.so.0+0xd6d5a)
> #37 CppUnit::TestComposite::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23 (libcppunit-1.14.so.0+0xd6a2e)
> #38 CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64 (libcppunit-1.14.so.0+0xd6d5a)
> #39 CppUnit::TestComposite::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23 (libcppunit-1.14.so.0+0xd6a2e)
> #40 CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:47 (libcppunit-1.14.so.0+0x10282c)
> #41 CppUnit::TestResult::runTest(CppUnit::Test*) workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:149 (libcppunit-1.14.so.0+0xf4223)
> #42 CppUnit::TestRunner::run(CppUnit::TestResult&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:96 (libcppunit-1.14.so.0+0x102c76)
> #43 (anonymous namespace)::ProtectedFixtureFunctor::run() const sal/cppunittester/cppunittester.cxx:316 (cppunittester+0x4bd1e8)
> #44 sal_main() sal/cppunittester/cppunittester.cxx:466 (cppunittester+0x4bbe1e)
> #45 main sal/cppunittester/cppunittester.cxx:373 (cppunittester+0x4bb695)
>
> Mutex M497501575317668160 acquired here while holding mutex M374215535518415904 in main thread:
> #0 pthread_mutex_lock compiler-rt/lib/tsan/../sanitizer_common/sanitizer_common_interceptors.inc:3800 (cppunittester+0x45abd7)
> #1 osl_acquireMutex sal/osl/unx/mutex.cxx:97 (libuno_sal.so.3+0xc1f0a)
> #2 osl::Mutex::acquire() include/osl/mutex.hxx:56 (libutllo.so+0xc0468)
> #3 Guard include/osl/mutex.hxx:129 (libutllo.so+0xbca6f)
> #4 ~SvtSysLocaleOptions unotools/source/config/syslocaleoptions.cxx:518 (libutllo.so+0x219fdf)
> #5 ~SvtSysLocaleOptions unotools/source/config/syslocaleoptions.cxx:517 (libutllo.so+0x21a11c)
> #6 ItemHolder1::impl_deleteItem(TItemInfo&) unotools/source/config/itemholder1.cxx:230 (libutllo.so+0x1a27a9)
> #7 ItemHolder1::impl_releaseAllItems() unotools/source/config/itemholder1.cxx:123 (libutllo.so+0x1a0c09)
> #8 ItemHolder1::disposing(com::sun::star::lang::EventObject const&) unotools/source/config/itemholder1.cxx:89 (libutllo.so+0x1a11ba)
> #9 non-virtual thunk to ItemHolder1::disposing(com::sun::star::lang::EventObject const&) :? (libutllo.so+0x1a127c)
> #10 cppu::OInterfaceContainerHelper::disposeAndClear(com::sun::star::lang::EventObject const&) cppuhelper/source/interfacecontainer.cxx:300 (libuno_cppuhelpergcc3.so.3+0xba149)
> #11 cppu::OMultiTypeInterfaceContainerHelper::disposeAndClear(com::sun::star::lang::EventObject const&) cppuhelper/source/interfacecontainer.cxx:472 (libuno_cppuhelpergcc3.so.3+0xbb6a5)
> #12 cppu::WeakComponentImplHelperBase::dispose() cppuhelper/source/implbase.cxx:101 (libuno_cppuhelpergcc3.so.3+0xb0de8)
> #13 cppu::PartialWeakComponentImplHelper<com::sun::star::lang::XServiceInfo, com::sun::star::lang::XMultiServiceFactory, com::sun::star::util::XRefreshable, com::sun::star::util::XFlushable, com::sun::star::lang::XLocalizable>::dispose() include/cppuhelper/compbase.hxx:93 (libconfigmgrlo.so+0x116708)
> #14 non-virtual thunk to cppu::PartialWeakComponentImplHelper<com::sun::star::lang::XServiceInfo, com::sun::star::lang::XMultiServiceFactory, com::sun::star::util::XRefreshable, com::sun::star::util::XFlushable, com::sun::star::lang::XLocalizable>::dispose() include/cppuhelper/compbase.hxx:? (libconfigmgrlo.so+0x116a0c)
> #15 cppu::ComponentContext::disposing() cppuhelper/source/component_context.cxx:451 (libuno_cppuhelpergcc3.so.3+0x5cdc0)
> #16 cppu::WeakComponentImplHelperBase::dispose() cppuhelper/source/implbase.cxx:102 (libuno_cppuhelpergcc3.so.3+0xb0e09)
> #17 cppu::PartialWeakComponentImplHelper<com::sun::star::uno::XComponentContext, com::sun::star::container::XNameContainer>::dispose() include/cppuhelper/compbase.hxx:93 (libuno_cppuhelpergcc3.so.3+0x65a88)
> #18 non-virtual thunk to cppu::PartialWeakComponentImplHelper<com::sun::star::uno::XComponentContext, com::sun::star::container::XNameContainer>::dispose() include/cppuhelper/compbase.hxx:? (libuno_cppuhelpergcc3.so.3+0x65d8c)
> #19 ~Test svl/qa/unit/svl.cxx:113 (libtest_svl_qa_cppunit.so+0x10061)
> #20 ~Test svl/qa/unit/svl.cxx:112 (libtest_svl_qa_cppunit.so+0x1013c)
> #21 ~TestCaller workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:170 (libtest_svl_qa_cppunit.so+0x1d171)
> #22 ~TestCaller workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:168 (libtest_svl_qa_cppunit.so+0x1d1cc)
> #23 CppUnit::TestSuite::deleteContents() workdir/UnpackedTarball/cppunit/src/cppunit/TestSuite.cpp:29 (libcppunit-1.14.so.0+0x103666)
> #24 ~TestSuite workdir/UnpackedTarball/cppunit/src/cppunit/TestSuite.cpp:19 (libcppunit-1.14.so.0+0x103504)
> #25 ~TestSuite workdir/UnpackedTarball/cppunit/src/cppunit/TestSuite.cpp:18 (libcppunit-1.14.so.0+0x10358c)
> #26 CppUnit::TestSuite::deleteContents() workdir/UnpackedTarball/cppunit/src/cppunit/TestSuite.cpp:29 (libcppunit-1.14.so.0+0x103666)
> #27 ~TestSuite workdir/UnpackedTarball/cppunit/src/cppunit/TestSuite.cpp:19 (libcppunit-1.14.so.0+0x103504)
> #28 ~TestSuite workdir/UnpackedTarball/cppunit/src/cppunit/TestSuite.cpp:18 (libcppunit-1.14.so.0+0x10358c)
> #29 CppUnit::TestSuite::deleteContents() workdir/UnpackedTarball/cppunit/src/cppunit/TestSuite.cpp:29 (libcppunit-1.14.so.0+0x103666)
> #30 ~TestSuite workdir/UnpackedTarball/cppunit/src/cppunit/TestSuite.cpp:19 (libcppunit-1.14.so.0+0x103504)
> #31 ~WrappingSuite workdir/UnpackedTarball/cppunit/src/cppunit/../../include/cppunit/TestRunner.h:100 (libcppunit-1.14.so.0+0x102d48)
> #32 ~WrappingSuite workdir/UnpackedTarball/cppunit/src/cppunit/../../include/cppunit/TestRunner.h:100 (libcppunit-1.14.so.0+0x102d8c)
> #33 ~TestRunner workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:78 (libcppunit-1.14.so.0+0x102a95)
> #34 (anonymous namespace)::ProtectedFixtureFunctor::run() const sal/cppunittester/cppunittester.cxx:322 (cppunittester+0x4bd2f2)
> #35 sal_main() sal/cppunittester/cppunittester.cxx:466 (cppunittester+0x4bbe1e)
> #36 main sal/cppunittester/cppunittester.cxx:373 (cppunittester+0x4bb695)
>
> Mutex M374215535518415904 previously acquired by the same thread here:
> #0 pthread_mutex_lock compiler-rt/lib/tsan/../sanitizer_common/sanitizer_common_interceptors.inc:3800 (cppunittester+0x45abd7)
> #1 osl_acquireMutex sal/osl/unx/mutex.cxx:97 (libuno_sal.so.3+0xc1f0a)
> #2 osl::Mutex::acquire() include/osl/mutex.hxx:56 (libutllo.so+0xc0468)
> #3 ClearableGuard include/osl/mutex.hxx:163 (libutllo.so+0x1a535f)
> #4 ResettableGuard include/osl/mutex.hxx:208 (libutllo.so+0x1a2d5c)
> #5 ItemHolder1::impl_releaseAllItems() unotools/source/config/itemholder1.cxx:115 (libutllo.so+0x1a0b5c)
> #6 ItemHolder1::disposing(com::sun::star::lang::EventObject const&) unotools/source/config/itemholder1.cxx:89 (libutllo.so+0x1a11ba)
> #7 non-virtual thunk to ItemHolder1::disposing(com::sun::star::lang::EventObject const&) :? (libutllo.so+0x1a127c)
> #8 cppu::OInterfaceContainerHelper::disposeAndClear(com::sun::star::lang::EventObject const&) cppuhelper/source/interfacecontainer.cxx:300 (libuno_cppuhelpergcc3.so.3+0xba149)
> #9 cppu::OMultiTypeInterfaceContainerHelper::disposeAndClear(com::sun::star::lang::EventObject const&) cppuhelper/source/interfacecontainer.cxx:472 (libuno_cppuhelpergcc3.so.3+0xbb6a5)
> #10 cppu::WeakComponentImplHelperBase::dispose() cppuhelper/source/implbase.cxx:101 (libuno_cppuhelpergcc3.so.3+0xb0de8)
> #11 cppu::PartialWeakComponentImplHelper<com::sun::star::lang::XServiceInfo, com::sun::star::lang::XMultiServiceFactory, com::sun::star::util::XRefreshable, com::sun::star::util::XFlushable, com::sun::star::lang::XLocalizable>::dispose() include/cppuhelper/compbase.hxx:93 (libconfigmgrlo.so+0x116708)
> #12 non-virtual thunk to cppu::PartialWeakComponentImplHelper<com::sun::star::lang::XServiceInfo, com::sun::star::lang::XMultiServiceFactory, com::sun::star::util::XRefreshable, com::sun::star::util::XFlushable, com::sun::star::lang::XLocalizable>::dispose() :? (libconfigmgrlo.so+0x116a0c)
> #13 cppu::ComponentContext::disposing() cppuhelper/source/component_context.cxx:451 (libuno_cppuhelpergcc3.so.3+0x5cdc0)
> #14 cppu::WeakComponentImplHelperBase::dispose() cppuhelper/source/implbase.cxx:102 (libuno_cppuhelpergcc3.so.3+0xb0e09)
> #15 cppu::PartialWeakComponentImplHelper<com::sun::star::uno::XComponentContext, com::sun::star::container::XNameContainer>::dispose() include/cppuhelper/compbase.hxx:93 (libuno_cppuhelpergcc3.so.3+0x65a88)
> #16 non-virtual thunk to cppu::PartialWeakComponentImplHelper<com::sun::star::uno::XComponentContext, com::sun::star::container::XNameContainer>::dispose() :? (libuno_cppuhelpergcc3.so.3+0x65d8c)
> #17 ~Test svl/qa/unit/svl.cxx:113 (libtest_svl_qa_cppunit.so+0x10061)
> #18 ~Test svl/qa/unit/svl.cxx:112 (libtest_svl_qa_cppunit.so+0x1013c)
> #19 ~TestCaller workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:170 (libtest_svl_qa_cppunit.so+0x1d171)
> #20 ~TestCaller workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:168 (libtest_svl_qa_cppunit.so+0x1d1cc)
> #21 CppUnit::TestSuite::deleteContents() workdir/UnpackedTarball/cppunit/src/cppunit/TestSuite.cpp:29 (libcppunit-1.14.so.0+0x103666)
> #22 ~TestSuite workdir/UnpackedTarball/cppunit/src/cppunit/TestSuite.cpp:19 (libcppunit-1.14.so.0+0x103504)
> #23 ~TestSuite workdir/UnpackedTarball/cppunit/src/cppunit/TestSuite.cpp:18 (libcppunit-1.14.so.0+0x10358c)
> #24 CppUnit::TestSuite::deleteContents() workdir/UnpackedTarball/cppunit/src/cppunit/TestSuite.cpp:29 (libcppunit-1.14.so.0+0x103666)
> #25 ~TestSuite workdir/UnpackedTarball/cppunit/src/cppunit/TestSuite.cpp:19 (libcppunit-1.14.so.0+0x103504)
> #26 ~TestSuite workdir/UnpackedTarball/cppunit/src/cppunit/TestSuite.cpp:18 (libcppunit-1.14.so.0+0x10358c)
> #27 CppUnit::TestSuite::deleteContents() workdir/UnpackedTarball/cppunit/src/cppunit/TestSuite.cpp:29 (libcppunit-1.14.so.0+0x103666)
> #28 ~TestSuite workdir/UnpackedTarball/cppunit/src/cppunit/TestSuite.cpp:19 (libcppunit-1.14.so.0+0x103504)
> #29 ~WrappingSuite workdir/UnpackedTarball/cppunit/src/cppunit/../../include/cppunit/TestRunner.h:100 (libcppunit-1.14.so.0+0x102d48)
> #30 ~WrappingSuite workdir/UnpackedTarball/cppunit/src/cppunit/../../include/cppunit/TestRunner.h:100 (libcppunit-1.14.so.0+0x102d8c)
> #31 ~TestRunner workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:78 (libcppunit-1.14.so.0+0x102a95)
> #32 (anonymous namespace)::ProtectedFixtureFunctor::run() const sal/cppunittester/cppunittester.cxx:322 (cppunittester+0x4bd2f2)
> #33 sal_main() sal/cppunittester/cppunittester.cxx:466 (cppunittester+0x4bbe1e)
> #34 main sal/cppunittester/cppunittester.cxx:373 (cppunittester+0x4bb695)
Change-Id: I82d0b4ebcd33340a229404692f846024d3662fdd
-rw-r--r-- | unotools/source/config/itemholder1.cxx | 23 | ||||
-rw-r--r-- | unotools/source/config/itemholder1.hxx | 1 |
2 files changed, 8 insertions, 16 deletions
diff --git a/unotools/source/config/itemholder1.cxx b/unotools/source/config/itemholder1.cxx index b845b9f8eb00..ea658bc0dc1d 100644 --- a/unotools/source/config/itemholder1.cxx +++ b/unotools/source/config/itemholder1.cxx @@ -112,17 +112,19 @@ void ItemHolder1::impl_addItem(EItem eItem) void ItemHolder1::impl_releaseAllItems() { - ::osl::ResettableMutexGuard aLock(m_aLock); + TItems items; + { + ::osl::MutexGuard aLock(m_aLock); + items.swap(m_lItems); + } TItems::iterator pIt; - for ( pIt = m_lItems.begin(); - pIt != m_lItems.end(); + for ( pIt = items.begin(); + pIt != items.end(); ++pIt ) { - TItemInfo& rInfo = *pIt; - impl_deleteItem(rInfo); + delete pIt->pItem; } - m_lItems.clear(); } void ItemHolder1::impl_newItem(TItemInfo& rItem) @@ -223,13 +225,4 @@ void ItemHolder1::impl_newItem(TItemInfo& rItem) } } -void ItemHolder1::impl_deleteItem(TItemInfo& rItem) -{ - if (rItem.pItem) - { - delete rItem.pItem; - rItem.pItem = nullptr; - } -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unotools/source/config/itemholder1.hxx b/unotools/source/config/itemholder1.hxx index c181c579da1f..406a34eaec56 100644 --- a/unotools/source/config/itemholder1.hxx +++ b/unotools/source/config/itemholder1.hxx @@ -51,7 +51,6 @@ class ItemHolder1 : private ItemHolderMutexBase void impl_addItem(EItem eItem); void impl_releaseAllItems(); static void impl_newItem(TItemInfo& rItem); - static void impl_deleteItem(TItemInfo& rItem); }; // namespaces |