office-gobmx/i18npool
Noel Grandin 35f1e9c7f9 fix data races in cclass_Unicode
WARNING: ThreadSanitizer: data race (pid=1220516)
  Write of size 4 at 0x7b1c00035510 by thread T19 (mutexes: write M0):
i18npool::Transliteration_casemapping::setMappingType(MappingType,
com::sun::lang::Locale const&) :? (libi18npoollo.so+0xe5685)
i18npool::cclass_Unicode::toUpper(rtl::OUString const&, int, int,
com::sun::lang::Locale const&) :? (libi18npoollo.so+0x792fa)
i18npool::CharacterClassificationImpl::toUpper(rtl::OUString const&,
int, int, com::sun::lang::Locale const&) :?
(libi18npoollo.so+0x83855)
(libutllo.so+0xc6f42)
(libsvllo.so+0xc5823)
const&) ??:? (libsclo.so+0x4978f3)
const&, std::shared_ptr<oox::xls::RichString> const&) :?
(libscfiltlo.so+0x46b354)
const&, int) :? (libscfiltlo.so+0x46b44a)
(libscfiltlo.so+0x4764a0)
:? (libscfiltlo.so+0x4764e9)
oox::core::ContextHandler2::endFastElement(int) ??:?
(libooxlo.so+0x1a10eb)
(libexpwraplo.so+0x2fbdf)
(libexpwraplo.so+0x2fb21)
char const*, unsigned char const*, unsigned char const*)
fastparser.cxx:? (libexpwraplo.so+0x2c255)
/build/libxml2-vTtzwD/libxml2-2.9.12+dfsg/builddir/main/../../parser.c:9736
(libxml2.so.2+0x5751a) (BuildId:
baaa02c136f3351b1c499bbbbe94450b9b9c0d4e)
/build/libxml2-vTtzwD/libxml2-2.9.12+dfsg/builddir/main/../../parser.c:9691
(libxml2.so.2+0x5751a)
sax_fastparser::FastSaxParserImpl::parseStream(com::sun::xml::sax::InputSource
const&) :? (libexpwraplo.so+0x2972d)
sax_fastparser::FastSaxParser::parseStream(com::sun::xml::sax::InputSource
const&) ??:? (libexpwraplo.so+0x30e88)
oox::core::FastParser::parseStream(com::sun::xml::sax::InputSource
const&, bool) ??:? (libooxlo.so+0x1a3220)
oox::core::FastParser::parseStream(com::sun::uno::Reference<com::sun::io::XInputStream>
const&, rtl::OUString const&) ??:? (libooxlo.so+0x1a3467)
oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler>
const&, oox::core::FastParser&) ??:? (libooxlo.so+0x1c46c1)
oox::xls::WorkbookHelper::importOoxFragment(rtl::Reference<oox::core::FragmentHandler>
const&, oox::core::FastParser&) :? (libscfiltlo.so+0x4be642)
workbookfragment.cxx:? (libscfiltlo.so+0x4b618d)
(libcomphelper.so+0x15e63b)
(libuno_salhelpergcc3.so.3+0x5257)
    #25 threadFunc :? (libuno_salhelpergcc3.so.3+0x550e)
(libuno_sal.so.3+0x67e25)

Previous write of size 4 at 0x7b1c00035510 by thread T18 (mutexes:
write M1):
i18npool::Transliteration_casemapping::setMappingType(MappingType,
com::sun::lang::Locale const&) :? (libi18npoollo.so+0xe5685)
i18npool::cclass_Unicode::toUpper(rtl::OUString const&, int, int,
com::sun::lang::Locale const&) :? (libi18npoollo.so+0x792fa)
i18npool::CharacterClassificationImpl::toUpper(rtl::OUString const&,
int, int, com::sun::lang::Locale const&) :?
(libi18npoollo.so+0x83855)
(libutllo.so+0xc6f42)
(libsvllo.so+0xc5823)
const&) ??:? (libsclo.so+0x4978f3)
const&, std::shared_ptr<oox::xls::RichString> const&) :?
(libscfiltlo.so+0x46b354)
const&, int) :? (libscfiltlo.so+0x46b44a)
(libscfiltlo.so+0x4764a0)
:? (libscfiltlo.so+0x4764e9)
oox::core::ContextHandler2::endFastElement(int) ??:?
(libooxlo.so+0x1a10eb)
(libexpwraplo.so+0x2fbdf)
(libexpwraplo.so+0x2fb21)
char const*, unsigned char const*, unsigned char const*)
fastparser.cxx:? (libexpwraplo.so+0x2c255)
/build/libxml2-vTtzwD/libxml2-2.9.12+dfsg/builddir/main/../../parser.c:9736
(libxml2.so.2+0x5751a) (BuildId:
baaa02c136f3351b1c499bbbbe94450b9b9c0d4e)
/build/libxml2-vTtzwD/libxml2-2.9.12+dfsg/builddir/main/../../parser.c:9691
(libxml2.so.2+0x5751a)
sax_fastparser::FastSaxParserImpl::parseStream(com::sun::xml::sax::InputSource
const&) :? (libexpwraplo.so+0x2972d)
sax_fastparser::FastSaxParser::parseStream(com::sun::xml::sax::InputSource
const&) ??:? (libexpwraplo.so+0x30e88)
oox::core::FastParser::parseStream(com::sun::xml::sax::InputSource
const&, bool) ??:? (libooxlo.so+0x1a3220)
oox::core::FastParser::parseStream(com::sun::uno::Reference<com::sun::io::XInputStream>
const&, rtl::OUString const&) ??:? (libooxlo.so+0x1a3467)
oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler>
const&, oox::core::FastParser&) ??:? (libooxlo.so+0x1c46c1)
oox::xls::WorkbookHelper::importOoxFragment(rtl::Reference<oox::core::FragmentHandler>
const&, oox::core::FastParser&) :? (libscfiltlo.so+0x4be642)
workbookfragment.cxx:? (libscfiltlo.so+0x4b618d)
(libcomphelper.so+0x15e63b)
(libuno_salhelpergcc3.so.3+0x5257)
    #25 threadFunc :? (libuno_salhelpergcc3.so.3+0x550e)
(libuno_sal.so.3+0x67e25)

Change-Id: Idf8d9c307c09bc1af8541178331af23d146da927
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130787
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-01 17:55:52 +01:00
..
inc fix data races in cclass_Unicode 2022-03-01 17:55:52 +01:00
qa/cppunit tdf#145759 30.6001 -> monthDaysWithoutJanFeb 2022-02-25 19:12:41 +01:00
source fix data races in cclass_Unicode 2022-03-01 17:55:52 +01:00
util
CppunitTest_i18npool_breakiterator.mk Remove redundant _test from i18npool/CppunitTest* 2022-02-28 08:49:26 +01:00
CppunitTest_i18npool_calendar.mk Remove redundant _test from i18npool/CppunitTest* 2022-02-28 08:49:26 +01:00
CppunitTest_i18npool_characterclassification.mk Remove redundant _test from i18npool/CppunitTest* 2022-02-28 08:49:26 +01:00
CppunitTest_i18npool_defaultnumberingprovider.mk
CppunitTest_i18npool_ordinalsuffix.mk Remove redundant _test from i18npool/CppunitTest* 2022-02-28 08:49:26 +01:00
CppunitTest_i18npool_textsearch.mk Remove redundant _test from i18npool/CppunitTest* 2022-02-28 08:49:26 +01:00
CustomTarget_breakiterator.mk
CustomTarget_collator.mk
CustomTarget_indexentry.mk
CustomTarget_localedata.mk
CustomTarget_textconversion.mk
Executable_gencoll_rule.mk
Executable_genconv_dict.mk
Executable_gendict.mk
Executable_genindex_data.mk
Executable_saxparser.mk
IwyuFilter_i18npool.yaml
Library_collator_data.mk
Library_dict_ja.mk
Library_dict_zh.mk
Library_i18npool.mk
Library_i18nsearch.mk
Library_index_data.mk
Library_localedata_en.mk
Library_localedata_es.mk
Library_localedata_euro.mk
Library_localedata_others.mk
Library_textconv_dict.mk
Makefile
Module_i18npool.mk Remove redundant _test from i18npool/CppunitTest* 2022-02-28 08:49:26 +01:00
Rdb_saxparser.mk
README.md

Internationalisation Pool (i18npool) Framework

Internationalisation pool (i18npool) framework ensures that the suite is adaptable to the requirements of different native languages, their local settings and customs, etc without source code modification. (Wow, that is such marketing-speak...)

Specifically for locale data documentation please see i18npool/source/localedata/data/locale.dtd

On iOS we put the largest data generated here, the dict_ja and dict_zh stuff, into separate files and not into code to keep the size of an app binary down. Temporary test code:

static bool beenhere = false;
if (!beenhere) {
    beenhere = true;
    uno::Reference< uno::XComponentContext > xComponentContext(::cppu::defaultBootstrap_InitialComponentContext());
    uno::Reference< lang::XMultiComponentFactory > xMultiComponentFactoryClient( xComponentContext->getServiceManager() );
    uno::Reference< uno::XInterface > xInterface =
        xMultiComponentFactoryClient->createInstanceWithContext( "com.sun.star.i18n.BreakIterator_ja", xComponentContext );
}

See Also

http://wiki.documentfoundation.org/Category:I18n