summaryrefslogtreecommitdiff
path: root/stoc
AgeCommit message (Collapse)AuthorFilesLines
2024-05-08drop requirement for rtl_random_getBytes to have "Pool" argCaolán McNamara1-4/+1
Seeing as since: commit e9531b792ddf0cfc2db11713b574c5fc7ae09e2c Date: Tue Feb 6 14:39:47 2024 +0100 sal: rtlRandomPool: require OS random device, abort if not present Both rtl_random_createPool() and rtl_random_getBytes() first try to get random data from the OS, via /dev/urandom or rand_s() (documented to call RtlGenRandom(), see [1]). we don't use the initial arg to rtl_random_getBytes anymore, drop the requirement to have one. Then simplify our usages of that, and addtionally deprecate rtl_random_createPool and rtl_random_destroyPool. Change-Id: I13dcc067714a8a741a4e8f2bfcf2006373f832c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167067 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-30WaE: C6011 Dereferencing NULL pointer warningsCaolán McNamara2-4/+5
Change-Id: I498c10e8bc134b41e3606d8a05cf3103a9274735 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166937 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-30Drop some uses of css::uno::Sequence::getConstArray ...Mike Kaganski4-26/+21
where it was obsoleted by commits 2484de6728bd11bb7949003d112f1ece2223c7a1 (Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and fb3c04bd1930eedacd406874e1a285d62bbf27d9 (Drop non-const Sequence::operator[] in internal code 2021-11-05). Change-Id: I4ccc647bb794515c8c11f8dfd9a26563f4aa094b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166819 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-03-30tdf#146619 Drop unused 'using namespace' in: stoc/Gabor Kelemen6-6/+0
Change-Id: I86e2dd229e377995e52d323b1b5be5a9a280b68f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165514 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-03-25tdf#147021 replace SAL_N_ELEMENTS() with std::size()Mohit Marathe1-7/+7
Change-Id: I8d704123aaa968352033d1b6680d5da6153eba21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165268 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-03-21tdf#143148 Use #pragma once instead of include guardsMohit Marathe2-10/+3
Change-Id: Ia55d226aa308413365659b5537eca7a136ec308a Signed-off-by: Mohit Marathe <mohitmarathe@proton.me> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165064 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-03-08use more string_viewNoel Grandin1-8/+8
found by tweaking the stringview loplugin Change-Id: I92203ba99642bef7951ffa146184c5562cb31d09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163744 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-01-27Drop std::as_const from css::uno::Sequence iterationsMike Kaganski3-5/+5
Obsoleted by commit 2484de6728bd11bb7949003d112f1ece2223c7a1 (Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and commit fb3c04bd1930eedacd406874e1a285d62bbf27d9 (Drop non-const Sequence::operator[] in internal code, 2021-11-05). Change-Id: Idbafef5d34c0d4771cbbf75b9db9712e504164cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162640 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-12cid#1545535 COPY_INSTEAD_OF_MOVECaolán McNamara3-5/+5
and cid#1545526 COPY_INSTEAD_OF_MOVE cid#1545442 COPY_INSTEAD_OF_MOVE cid#1545426 COPY_INSTEAD_OF_MOVE cid#1545425 COPY_INSTEAD_OF_MOVE cid#1545387 COPY_INSTEAD_OF_MOVE cid#1545379 COPY_INSTEAD_OF_MOVE cid#1545337 COPY_INSTEAD_OF_MOVE cid#1545334 COPY_INSTEAD_OF_MOVE cid#1545289 COPY_INSTEAD_OF_MOVE cid#1545282 COPY_INSTEAD_OF_MOVE cid#1545270 COPY_INSTEAD_OF_MOVE cid#1545237 COPY_INSTEAD_OF_MOVE Change-Id: Iae44a7347c85ae2e367bf672214b2013f30466f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161968 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-12cid#1546222 COPY_INSTEAD_OF_MOVECaolán McNamara2-2/+2
and cid#1546154 COPY_INSTEAD_OF_MOVE cid#1546120 COPY_INSTEAD_OF_MOVE cid#1546115 COPY_INSTEAD_OF_MOVE cid#1546111 COPY_INSTEAD_OF_MOVE cid#1546096 COPY_INSTEAD_OF_MOVE cid#1546016 COPY_INSTEAD_OF_MOVE cid#1545980 COPY_INSTEAD_OF_MOVE cid#1545942 COPY_INSTEAD_OF_MOVE cid#1545902 COPY_INSTEAD_OF_MOVE cid#1545869 COPY_INSTEAD_OF_MOVE cid#1545853 COPY_INSTEAD_OF_MOVE cid#1545769 COPY_INSTEAD_OF_MOVE cid#1545742 COPY_INSTEAD_OF_MOVE cid#1545735 COPY_INSTEAD_OF_MOVE cid#1545689 COPY_INSTEAD_OF_MOVE Change-Id: If93debe8b00991761cf1876b3fce27b09906749e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161966 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-24cid#1545470 COPY_INSTEAD_OF_MOVECaolán McNamara1-2/+2
and cid#1545468 COPY_INSTEAD_OF_MOVE cid#1545446 COPY_INSTEAD_OF_MOVE cid#1545435 COPY_INSTEAD_OF_MOVE cid#1545419 COPY_INSTEAD_OF_MOVE cid#1545415 COPY_INSTEAD_OF_MOVE cid#1545410 COPY_INSTEAD_OF_MOVE cid#1545390 COPY_INSTEAD_OF_MOVE cid#1545384 COPY_INSTEAD_OF_MOVE cid#1545374 COPY_INSTEAD_OF_MOVE cid#1545371 COPY_INSTEAD_OF_MOVE cid#1545368 COPY_INSTEAD_OF_MOVE cid#1545366 COPY_INSTEAD_OF_MOVE cid#1545335 COPY_INSTEAD_OF_MOVE cid#1545331 COPY_INSTEAD_OF_MOVE cid#1545327 COPY_INSTEAD_OF_MOVE cid#1545308 COPY_INSTEAD_OF_MOVE cid#1545280 COPY_INSTEAD_OF_MOVE cid#1545199 COPY_INSTEAD_OF_MOVE Change-Id: If05a13125b05ccd93d34d0eced566e7b3b58aaef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161256 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-10cid#1546281 COPY_INSTEAD_OF_MOVECaolán McNamara1-2/+1
and cid#1546278 COPY_INSTEAD_OF_MOVE cid#1546276 COPY_INSTEAD_OF_MOVE cid#1546247 COPY_INSTEAD_OF_MOVE cid#1546244 COPY_INSTEAD_OF_MOVE cid#1546243 COPY_INSTEAD_OF_MOVE cid#1546220 COPY_INSTEAD_OF_MOVE cid#1546209 COPY_INSTEAD_OF_MOVE cid#1546207 COPY_INSTEAD_OF_MOVE cid#1546206 COPY_INSTEAD_OF_MOVE cid#1546205 COPY_INSTEAD_OF_MOVE cid#1546197 COPY_INSTEAD_OF_MOVE cid#1546180 COPY_INSTEAD_OF_MOVE cid#1546172 COPY_INSTEAD_OF_MOVE cid#1546165 COPY_INSTEAD_OF_MOVE cid#1546164 COPY_INSTEAD_OF_MOVE cid#1546158 COPY_INSTEAD_OF_MOVE cid#1546151 COPY_INSTEAD_OF_MOVE cid#1546135 COPY_INSTEAD_OF_MOVE cid#1546132 COPY_INSTEAD_OF_MOVE cid#1546129 COPY_INSTEAD_OF_MOVE cid#1546128 COPY_INSTEAD_OF_MOVE cid#1546122 COPY_INSTEAD_OF_MOVE cid#1546117 COPY_INSTEAD_OF_MOVE cid#1546113 COPY_INSTEAD_OF_MOVE cid#1546106 COPY_INSTEAD_OF_MOVE cid#1546099 COPY_INSTEAD_OF_MOVE cid#1546091 COPY_INSTEAD_OF_MOVE cid#1546085 COPY_INSTEAD_OF_MOVE cid#1546069 COPY_INSTEAD_OF_MOVE cid#1546063 COPY_INSTEAD_OF_MOVE cid#1546062 COPY_INSTEAD_OF_MOVE cid#1546058 COPY_INSTEAD_OF_MOVE cid#1546056 COPY_INSTEAD_OF_MOVE cid#1546051 COPY_INSTEAD_OF_MOVE cid#1546040 COPY_INSTEAD_OF_MOVE cid#1546030 COPY_INSTEAD_OF_MOVE cid#1546028 COPY_INSTEAD_OF_MOVE cid#1546015 COPY_INSTEAD_OF_MOVE cid#1546001 COPY_INSTEAD_OF_MOVE Change-Id: Ib954c92a300fc323b29f27880fdf8bc46ed98862 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160520 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-10cid#1546298 COPY_INSTEAD_OF_MOVECaolán McNamara1-2/+1
and cid#1546297 COPY_INSTEAD_OF_MOVE Change-Id: I8fbb2bb1692cc822a79652312c6268379226a9c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160517 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-09cid#1556778 COPY_INSTEAD_OF_MOVECaolán McNamara1-2/+1
and cid#1546474 COPY_INSTEAD_OF_MOVE cid#1546473 COPY_INSTEAD_OF_MOVE cid#1546469 COPY_INSTEAD_OF_MOVE cid#1546467 COPY_INSTEAD_OF_MOVE cid#1546458 COPY_INSTEAD_OF_MOVE cid#1546448 COPY_INSTEAD_OF_MOVE cid#1546446 COPY_INSTEAD_OF_MOVE cid#1546441 COPY_INSTEAD_OF_MOVE cid#1546424 COPY_INSTEAD_OF_MOVE cid#1546377 COPY_INSTEAD_OF_MOVE cid#1546374 COPY_INSTEAD_OF_MOVE cid#1546352 COPY_INSTEAD_OF_MOVE cid#1546334 COPY_INSTEAD_OF_MOVE cid#1546328 COPY_INSTEAD_OF_MOVE cid#1546310 COPY_INSTEAD_OF_MOVE cid#1546303 COPY_INSTEAD_OF_MOVE Change-Id: I8a43fdd574857ba1d3ec416f23c8269a9a08e12f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160515 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-08cid#1546472 COPY_INSTEAD_OF_MOVECaolán McNamara1-2/+1
and cid#1546459 COPY_INSTEAD_OF_MOVE cid#1546452 COPY_INSTEAD_OF_MOVE cid#1546403 COPY_INSTEAD_OF_MOVE cid#1546396 COPY_INSTEAD_OF_MOVE cid#1546394 COPY_INSTEAD_OF_MOVE cid#1546338 COPY_INSTEAD_OF_MOVE cid#1546324 COPY_INSTEAD_OF_MOVE Change-Id: If61457cfaf1d7ce4a069bcecdc0cc657aeb43c68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160445 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-04cid#1545597 Using invalid iteratorJulien Nabet1-1/+1
and : cid#1545537 Using invalid iterator cid#1545508 Using invalid iterator cid#1545494 Using invalid iterator cid#1545478 Using invalid iterator cid#1545427 Using invalid iterator cid#1545420 Using invalid iterator cid#1545400 Using invalid iterator cid#1545300 Using invalid iterator cid#1545258 Using invalid iterator cid#1545257 Using invalid iterator cid#1545200 Using invalid iterator cid#1545183 Using invalid iterator Change-Id: Ibf3a41902f34286967195c5c3b22e337a4b06809 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160322 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-11-16tdf#146386 deprecate, remove usage of Inet::Settings::ooInetFTPProxyNameMichael Stahl1-87/+2
* officecfg: deprecate Inet::Settings::ooInetFTPProxyName/Port * ucbhelper: stop handling these settings * sfx2: remove SID_INET_FTP_PROXY_NAME and SID_INET_FTP_PROXY_PORT and usage from SfxApplication::GetOptions() * shell: remove proxy config code from backends * stoc: the JavaVM would have its "ftp.proxyHost" properties set based on officecfg values; remove that * sysui,vcl: remove protocol from KDE desktop files and file picker Change-Id: Iba02676cf6e519e2fa60ba925209436d38e75f49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159500 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-10-20Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: stocStephan Bergmann3-23/+23
Change-Id: Ic8c251b97f5e5bdf81599534384d86ac9904da53 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158222 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-18loplugin:indentationStephan Bergmann1-3/+3
Change-Id: If81844107209c3fb04d39c9f2b826b623068fc30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158120 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-15tdf#101376 don't detach thread if it is the main thread on macOSPatrick Luby2-0/+21
On macOS, many AWT classes do their work on the main thread deep in native methods in the java.awt.* classes. The problem is that Oracle's and OpenJDK's JVMs don't bracket their "perform on main thread" native calls with "attach/detach current thread" calls to the JVM. Change-Id: I0859dc9e20f34bd0b43bb321898507764fd530fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157985 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-10-14Use exception ctors, instead of setting members laterMike Kaganski3-18/+7
Avoids overwriting source location in message Change-Id: Ia0290c7dd1ab3ea1357712a27ecab75c7b583dd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157893 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-09-24tdf#157288: "Primary key" missing when right click a field during table editionJulien Nabet1-1/+2
Revert partly 0c2b2c9babfd781e0d9d68bb2a14a045b0c6ec4c "Use getXWeak in stoc" Change-Id: I0344510dee33c8740937354d64c0e60115606d26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157178 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-09-10using decls should come after #includeNoel Grandin1-4/+1
Change-Id: I058551e87bca42adede860f6f299b0f7ae2af3b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156798 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-09NestedRegistryImpl does not need to implement XAggreggationNoel Grandin1-2/+1
Checked on jenkins using 'make check' and + void SAL_CALL setDelegator(css::uno::Reference<css::uno::XInterface> const &) final { assert(false); } Change-Id: I3eb7f69ab16bedbe32e457f67257393822dc90d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156718 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-24Small refactorMike Kaganski1-2/+4
Change-Id: I25fb8a769cd5e97863e5bd9fabae670589e4a18a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156018 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-08-23tdf#156701: Move DontEnableJava handling into askForRetryMike Kaganski1-6/+3
Change-Id: I0deeed09fcea765e66c1967f40d60a1222f90c08 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155964 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-07-31tdf#156161: Honor "DontEnableJava" when failed because selected JRE uninstalledMike Kaganski1-0/+3
Change-Id: Id90f530fda9e565a5a53853a3acb8195035a80ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155078 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-06-18Use getXWeak in stocMike Kaganski20-138/+136
Change-Id: Icd694eeae002ab28cbd06ba3097e9039e299de3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150871 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-05-25merge some stringaddsNoel Grandin3-29/+16
found with a lightly tweaked version of the loplugin:stringadd and some hand-holding. Change-Id: I146aadcaf665e98fea89a9cad2df4dc3935622f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152275 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-06tdf#145538 Use range based for loopsektagoel121-2/+2
Change-Id: Ib74318a36898270c7b6e45e5e064ddd696a91be8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145905 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2023-03-30loplugin:stringadd in starmath..svlNoel Grandin4-26/+16
when applying my upcoming patch to also consider O[U]StringBuffer Change-Id: Id8f229c3a5223dee8d2710caf15d4612594fc763 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149748 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-22Remove unused fileStephan Bergmann1-85/+0
...that 9111536f1bbaed489ed3ed36315e05d4b3940f5b "Introduce css.reflection.Dump singleton" had added by mistake Change-Id: I15e273c3186312c45b7d435f983f17eb2f93a56e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149292 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-03-22Introduce css.reflection.Dump singletonStephan Bergmann7-0/+635
...and revert e1c6f36d8bcc0799281e3a7e244175f682d97cb2 "Add a to_string() function to the code generated for UNO IDL constant groups". (But keep the constants groups the latter had added to cppu/qa/cppumaker/types.idl, and use them in the newly added CppunitTest_stoc_dump, for better or worse.) Change-Id: I56e9eaeb1e45b83a72a25eceef13e719dc6f3a1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149281 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Jenkins
2023-02-16Drop 'using namespace ::std' in dirs s*Gabor Kelemen3-8/+5
Change-Id: If3119a1f2274aac0bf70576458e3adb4505a2a45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147076 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com>
2023-02-02osl::Mutex->std::mutex in JavaComponentLoader::getJavaLoaderNoel Grandin1-2/+3
Change-Id: Iecde82fcd1c637d4447b2bca491308a2becc38cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146467 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-20Related: rhbz#2136459 use a value which is exactly representable as a floatCaolán McNamara1-1/+1
20 builds in a row with the old value all succeeded for me on F38 anyway, so if the problem still exists this almost certainly doesn't do anything. But it's nice for debugging to use something that is printed the same by a debugger as seen in the source. also see: tdf#125978 Change-Id: I42dc5f18c22acc006bffb57578bacb65dbc16013 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143116 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-19Base IdlReflectionServiceImpl on WeakComponentImplHelperStephan Bergmann2-61/+9
...rather than on the deprecated OComponentHelper Change-Id: Icb83d3cc0a0588a703a9041c00730b2a8d8bb90b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145789 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-09use std::this_thread::sleep_for instead of osl equivalentArnaud VERSINI1-2/+3
Change-Id: I5b4edc5417e5bb5e082688df616e1d5735717d92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142357 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-19loplugin:implinheritancehelper in stocNoel Grandin5-236/+15
use more ImplInheritanceHelper to reduce boilerplate Change-Id: I2b4937ebee2e8cc16759df0eacdeb160343a7001 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144440 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-14Destruction of Registry and RegitsryKey isn't MT-safeStephan Bergmann1-39/+50
...as the underlying ORegistry and ORegKey modify their ref counts outside any locked mutexes. For example, <https://ci.libreoffice.org/job/lo_ubsan/2572/> had failed during CustomTarget_odk/build-examples_java with > ==402==ERROR: AddressSanitizer: heap-use-after-free on address 0x60d00035d920 at pc 0x7f379ce963d9 bp 0x7ffe74b1ac60 sp 0x7ffe74b1ac58 > READ of size 4 at 0x60d00035d920 thread T0 > #0 0x7f379ce963d8 in ORegistry::acquire() /registry/source/regimpl.hxx:49:18 > #1 0x7f379ce947a3 in acquire(void*) /registry/source/registry.cxx:38:15 > #2 0x7f375ee9287e in Registry::operator=(Registry const&) /include/registry/registry.hxx:961:9 > #3 0x7f375ee92654 in RegistryKey::setRegistry(Registry const&) /include/registry/registry.hxx:647:20 > #4 0x7f375ee91d66 in Registry::openRootKey(RegistryKey&) /include/registry/registry.hxx:979:18 > #5 0x7f375ee725da in (anonymous namespace)::SimpleRegistry::getRootKey() /stoc/source/simpleregistry/simpleregistry.cxx:889:30 > #6 0x7f375ee73a56 in non-virtual thunk to (anonymous namespace)::SimpleRegistry::getRootKey() /stoc/source/simpleregistry/simpleregistry.cxx > #7 0x7f37828e142c in gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*) /bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:77:5 > #8 0x7f37828db812 in cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, _typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*, void*, void**, _uno_Any**) /bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:233:13 > #9 0x7f37828d8668 in unoInterfaceProxyDispatch /bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:413:13 > #10 0x7f375cfebc05 in binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::__debug::vector<binaryurp::BinaryAny, std::allocator<binaryurp::BinaryAny> >*) const /binaryurp/source/incomingrequest.cxx:236:13 > #11 0x7f375cfe5a46 in binaryurp::IncomingRequest::execute() const /binaryurp/source/incomingrequest.cxx:79:26 > #12 0x7f375d0ae662 in request /binaryurp/source/reader.cxx:86:9 > #13 0x7f37b5cf5a2b in cppu_threadpool::JobQueue::enter(void const*, bool) /cppu/source/threadpool/jobqueue.cxx:100:17 > #14 0x7f37b5d44637 in cppu_threadpool::ThreadPool::enter(rtl::ByteSequence const&, void const*) /cppu/source/threadpool/threadpool.cxx:304:33 > #15 0x7f37b5d468d4 in uno_threadpool_enter /cppu/source/threadpool/threadpool.cxx:408:33 > #16 0x7f375cf144fa in binaryurp::Bridge::makeCall(rtl::OUString const&, com::sun::star::uno::TypeDescription const&, bool, std::__debug::vector<binaryurp::BinaryAny, std::allocator<binaryurp::BinaryAny> >&&, binaryurp::BinaryAny*, std::__debug::vector<binaryurp::BinaryAny, std::allocator<binaryurp::BinaryAny> >*) /binaryurp/source/bridge.cxx:606:9 > #17 0x7f375d0aa130 in binaryurp::Proxy::do_dispatch_throw(_typelib_TypeDescription const*, void*, void**, _uno_Any**) const /binaryurp/source/proxy.cxx:169:18 > #18 0x7f375d0a82f4 in binaryurp::Proxy::do_dispatch(_typelib_TypeDescription const*, void*, void**, _uno_Any**) const /binaryurp/source/proxy.cxx:102:13 > #19 0x7f375d0a80cf in proxy_dispatchInterface /binaryurp/source/proxy.cxx:61:36 > #20 0x7f3782881fff in cpp2uno_call(bridges::cpp_uno::shared::CppInterfaceProxy*, _typelib_TypeDescription const*, _typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*, void**, void**, void**, unsigned long*) /bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx:191:5 > #21 0x7f378287ef40 in cpp_vtable_call /bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx:389:28 > #22 0x7f378292d60d in privateSnippetExecutor (/instdir/program/libgcc3_uno.so+0x13960d) > #23 0x7f3774fd11c7 in dp_registry::backend::component::(anonymous namespace)::BackendImpl::ComponentPackageImpl::processPackage_(osl::ResettableGuard<osl::Mutex>&, bool, bool, rtl::Reference<dp_misc::AbortChannel> const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&) /desktop/source/deployment/registry/component/dp_component.cxx:1376:17 > #24 0x7f37750f1c11 in dp_registry::backend::Package::processPackage_impl(bool, bool, com::sun::star::uno::Reference<com::sun::star::task::XAbortChannel> const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&) /desktop/source/deployment/registry/dp_backend.cxx:631:17 > #25 0x7f37750f3f4b in dp_registry::backend::Package::registerPackage(unsigned char, com::sun::star::uno::Reference<com::sun::star::task::XAbortChannel> const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&) /desktop/source/deployment/registry/dp_backend.cxx:688:5 > #26 0x7f3775206b47 in dp_registry::backend::bundle::(anonymous namespace)::BackendImpl::PackageImpl::processPackage_(osl::ResettableGuard<osl::Mutex>&, bool, bool, rtl::Reference<dp_misc::AbortChannel> const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&) /desktop/source/deployment/registry/package/dp_package.cxx:805:27 > #27 0x7f37750f1c11 in dp_registry::backend::Package::processPackage_impl(bool, bool, com::sun::star::uno::Reference<com::sun::star::task::XAbortChannel> const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&) /desktop/source/deployment/registry/dp_backend.cxx:631:17 > #28 0x7f37750f3f4b in dp_registry::backend::Package::registerPackage(unsigned char, com::sun::star::uno::Reference<com::sun::star::task::XAbortChannel> const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&) /desktop/source/deployment/registry/dp_backend.cxx:688:5 > #29 0x7f3774e55b17 in dp_manager::ExtensionManager::activateExtension(com::sun::star::uno::Sequence<com::sun::star::uno::Reference<com::sun::star::deployment::XPackage> > const&, bool, bool, com::sun::star::uno::Reference<com::sun::star::task::XAbortChannel> const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&) /desktop/source/deployment/manager/dp_extensionmanager.cxx:473:23 > #30 0x7f3774e54ab4 in dp_manager::ExtensionManager::activateExtension(rtl::OUString const&, rtl::OUString const&, bool, bool, com::sun::star::uno::Reference<com::sun::star::task::XAbortChannel> const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&) /desktop/source/deployment/manager/dp_extensionmanager.cxx:423:5 > #31 0x7f3774e5fa40 in dp_manager::ExtensionManager::addExtension(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::NamedValue> const&, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::task::XAbortChannel> const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&) /desktop/source/deployment/manager/dp_extensionmanager.cxx:723:21 > #32 0x7f3774e62b64 in non-virtual thunk to dp_manager::ExtensionManager::addExtension(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::NamedValue> const&, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::task::XAbortChannel> const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&) /desktop/source/deployment/manager/dp_extensionmanager.cxx > #33 0x7f37ba706dcf in unopkg_main /desktop/source/pkgchk/unopkg/unopkg_app.cxx:429:40 > #34 0x501298 in sal_main /desktop/source/pkgchk/unopkg/unopkg_main.c:24:31 > #35 0x501276 in main /desktop/source/pkgchk/unopkg/unopkg_main.c:24:1 > > 0x60d00035d920 is located 0 bytes inside of 136-byte region [0x60d00035d920,0x60d00035d9a8) > freed by thread T6 (cppu_threadpool) here: > #0 0x4fe928 in operator delete(void*, unsigned long) /home/tdf/lode/packages/llvm-llvmorg-12.0.1.src/compiler-rt/lib/asan/asan_new_delete.cpp:172 > #1 0x7f379ce94875 in release(void*) /registry/source/registry.cxx:47:9 > #2 0x7f375ee8e6b5 in Registry::~Registry() /include/registry/registry.hxx:955:13 > #3 0x7f375ee92582 in RegistryKey::~RegistryKey() /include/registry/registry.hxx:655:5 > #4 0x7f375ee744e6 in (anonymous namespace)::Key::~Key() /stoc/source/simpleregistry/simpleregistry.cxx:101:7 > #5 0x7f375ee74558 in (anonymous namespace)::Key::~Key() /stoc/source/simpleregistry/simpleregistry.cxx:101:7 > #6 0x7f37b53a682a in cppu::OWeakObject::release() /cppuhelper/source/weak.cxx:230:9 > #7 0x7f375ec5c009 in cppu::WeakImplHelper<com::sun::star::registry::XRegistryKey>::release() /include/cppuhelper/implbase.hxx:115:66 > #8 0x7f37828f0054 in freeUnoInterfaceProxy /bridges/source/cpp_uno/shared/unointerfaceproxy.cxx:42:19 > #9 0x7f37b5ee924d in (anonymous namespace)::s_stub_defenv_revokeInterface(__va_list_tag (*) [1]) /cppu/source/uno/lbenv.cxx:372:17 > #10 0x7f37b5e8fcbc in s_environment_invoke_v(_uno_Environment*, _uno_Environment*, void (*)(__va_list_tag (*) [1]), __va_list_tag (*) [1]) /cppu/source/uno/EnvStack.cxx:293:9 > #11 0x7f37b5e8fa04 in uno_Environment_invoke_v /cppu/source/uno/EnvStack.cxx:312:5 > #12 0x7f37b5e9016a in uno_Environment_invoke /cppu/source/uno/EnvStack.cxx:321:5 > #13 0x7f37b5ec2dc5 in (anonymous namespace)::defenv_revokeInterface(_uno_ExtEnvironment*, void*) /cppu/source/uno/lbenv.cxx:426:5 > #14 0x7f37828f0f08 in releaseProxy /bridges/source/cpp_uno/shared/unointerfaceproxy.cxx:78:9 > #15 0x7f375cf305c5 in com::sun::star::uno::UnoInterfaceReference::~UnoInterfaceReference() /include/uno/dispatcher.hxx:107:9 > #16 0x7f375cf0f387 in binaryurp::Bridge::releaseStub(rtl::OUString const&, com::sun::star::uno::TypeDescription const&) /binaryurp/source/bridge.cxx:514:1 > #17 0x7f375cfe8b9b in binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::__debug::vector<binaryurp::BinaryAny, std::allocator<binaryurp::BinaryAny> >*) const /binaryurp/source/incomingrequest.cxx:138:18 > #18 0x7f375cfe5a46 in binaryurp::IncomingRequest::execute() const /binaryurp/source/incomingrequest.cxx:79:26 > #19 0x7f375d0ae662 in request /binaryurp/source/reader.cxx:86:9 > #20 0x7f37b5cf5a2b in cppu_threadpool::JobQueue::enter(void const*, bool) /cppu/source/threadpool/jobqueue.cxx:100:17 > #21 0x7f37b5d161c4 in cppu_threadpool::ORequestThread::run() /cppu/source/threadpool/thread.cxx:165:31 > #22 0x7f37b5d20fc4 in threadFunc /include/osl/thread.hxx:189:15 > #23 0x7f37bb9d9f0f in osl_thread_start_Impl(void*) /sal/osl/unx/thread.cxx:265:9 > #24 0x7f37b9e35ea4 in start_thread /usr/src/debug/glibc-2.17-c758a686/nptl/pthread_create.c:307 The SimpleRegistry UNO implementation appears to be the only one of the few remaining uses of the legacy registry functionality that suffers from this issue, so address things there and keep the registry functionality itself non- MT-safe. Change-Id: I5a87f1c66d838603672f6dfd19e6d1b617fbe691 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142713 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-11-02Use o3tl::to_underlying() instead of static_cast<int>()Tor Lillqvist1-2/+3
sberg says it is better, and I trust him. Change-Id: I32b343cd899f807c0eb803e74e856b0eb9610074 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142132 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2022-11-01Make exception message a bit more informativeTor Lillqvist1-2/+2
Change-Id: I61141eab37f07d012ff2c5033efdfa1e0126786f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142075 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2022-10-25tdf#145759 Use symbolic constants instead of magic numerical constantsOmkarAcharekar1-2/+3
Change-Id: I68f9dd0bbe5a98de35253220dc33382139b4950e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141657 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-10-11revert pessimizationNoel Grandin1-9/+9
revert part of commit 113d9bba057b2fd634fcfcebb83a4d92cf41d69f Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Fri Sep 30 09:06:51 2022 +0200 use more string_view in stoc <sberg> This is another case of a potential pessimization, for no gain: The passed in schemeSpecificPart will always be an OUString, and path may be a view of its full content (if there is neither authority nor query part). Change-Id: Ibc60fb1f5f351668ef924e25ee3aeb1d80f6f710 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141205 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-11Deduplicate O(U)StringConcatenationMike Kaganski1-8/+8
And use an overloaded helper function with a better (?) unified name to show that the result is not an O(U)String. Change-Id: I8956338b05d02bf46a6185828130ea8ef145d46b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141203 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-09-30use more string_view in stocNoel Grandin2-28/+29
Change-Id: I6552f3daee7b18dbd311ac7e80ebf1e84e36704d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140787 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-27clang-tidy modernize-pass-by-value in stocNoel Grandin19-61/+76
Change-Id: Ia628b2af646e576d52b6c72352255710a885c23f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136452 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-13Drop obsolete preprocessor directives from UNOIDL filesStephan Bergmann9-34/+0
...which were used by ildc, which is gone since a8485d558fab53291e2530fd9a1be581c1628deb "[API CHANGE] Remove deprecated idlc and regmerge from the SDK", and have always been ignored as legacy by its unoidl-write replacement. This change has been carried out (making use of GNU sed extensions) with > for i in $(git ls-files \*.idl); do sed -i -z -E -e 's/\n\n((#[^\n]*\n)+\n)*(#[^\n]*\n)+\n?/\n\n/g' -e 's/\n(#[^\n]*\n)+/\n/g' "$i"; done && git checkout extensions/source/activex/so_activex.idl odk/examples/OLE/activex/so_activex.idl which apparently happened to do the work. (The final two files are not UNOIDL source files.) Change-Id: Ic9369e05d46e8f7e8a304ab01740b171b92335cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135683 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-11[API CHANGE] Deprecate css.registry.XSimpleRegistry::mergeKeyStephan Bergmann2-31/+4
...and let its implementations just throw a RuntimeException, now that regmerge has been removed in "[API CHANGE] Remove deprecated idlc and regmerge from the SDK". Deprecate css.registry.MergeConflictException along with it (though stoc/source/implementationregistration/ still uses it internally). And remove the previously unused include/registry/writer.hxx along with the newly unused include/registry/writer.h, RegistryTypeWriter, and RegistryTypeReader. Change-Id: I10fd286617975dc0ef9f74460a3a3eab8060939d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123615 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-03Use more appropriate index variable typesStephan Bergmann1-9/+8
Change-Id: I3c8985862aeccb350c4e8e04d3f71f9dc7018e43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135334 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>