Because the mutex has already been freed because raptor calls
xmlCleanupParser
I have logged a feature request against raptor for a flag to turn off
this behaviour, but until that lands, this will have to do.
-----
make CppunitTest_filter_pdf results in
WARNING: ThreadSanitizer: use of an invalid mutex (e.g. uninitialized or
destroyed) (pid=330602)
0 pthread_mutex_lock
/home/noel/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1371
(discriminator 8) (cppunittester+0x7e1be)
1 xmlDictFree ??:? (libxml2.so.2+0x3404b) (BuildId:
14c9410dbe8278dfa121dabc48c9ae25eac169d1)
2 lt_xml_unref
/home/noel/libo-tsan/workdir/UnpackedTarball/liblangtag/liblangtag/lt-xml.c:351
(liblangtag-lo.so.1+0x1fc6a)
3 lt_db_finalize
/home/noel/libo-tsan/workdir/UnpackedTarball/liblangtag/liblangtag/lt-database.c:144
(liblangtag-lo.so.1+0xac22)
4 (anonymous namespace)::LiblangtagDataRef::teardown()
/home/noel/libo-tsan/i18nlangtag/source/languagetag/languagetag.cxx:219
(libi18nlangtag.so+0x20951)
5 (anonymous namespace)::LiblangtagDataRef::~LiblangtagDataRef()
/home/noel/libo-tsan/i18nlangtag/source/languagetag/languagetag.cxx:204
(libi18nlangtag.so+0x20951)
6 cxa_at_exit_callback_installed_at(void*)
/home/noel/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:445
(cppunittester+0x6e3af)
7 LanguageTagImpl::canonicalize()
/home/noel/libo-tsan/i18nlangtag/source/languagetag/languagetag.cxx:190
(libi18nlangtag.so+0xe370)
8 main /home/noel/libo-tsan/sal/cppunittester/cppunittester.cxx:482
(cppunittester+0x10cf6c)
Change-Id: I5d9ff1c5667f8e19e5858cd5a408e8f95d2a98e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177320
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>