summaryrefslogtreecommitdiff
path: root/cppu/source/threadpool/current.cxx
AgeCommit message (Collapse)Author
2024-11-02No need to use SAL_THROW_EXTERN_C macro in CXXMike Kaganski
Change-Id: I6eb9f0431a9402479a2d90d5b6f68b611d52a9f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175957 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-30try to workaround clang crashCaolán McNamara
Stack dump: 0. Program arguments: clang++ -stdlib=libc++ -fsanitize-blacklist=/src/libreoffice/bin/sanitize-excludelist.txt -DBOOST_SYSTEM_NO_DEPRECATED -DCPPU_ENV=gcc3 -DLINUX -DNDEBUG -DOSL_DEBUG_LEVEL=0 -DUNIX -DUNX -DX86_64 -D_PTHREADS -D_REENTRANT -DCPPU_DLLIMPLEMENTATION -fvisibility=hidden -Wall -Wno-missing-braces -Wendif-labels -Wextra -Wundef -Wunreachable-code -Wshadow -Wunused-macros -Wembedded-directive -finput-charset=UTF-8 -fmessage-length=0 -fno-common -pipe -fstack-protector-strong -Wdeprecated-copy-dtor -Wimplicit-fallthrough -Wunused-exception-parameter -Wrange-loop-analysis -fvisibility-inlines-hidden -fPIC -Wshadow -Woverloaded-virtual -std=c++20 -pthread -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize-coverage=trace-pc-guard,indirect-calls,trace-cmp -stdlib=libc++ -fexceptions -DLIBO_INTERNAL_ONLY -c /src/libreoffice/cppu/source/threadpool/current.cxx -o /work/workdir_for_build/CxxObject/cppu/source/threadpool/current.o -MMD -MT /work/workdir_for_build/CxxObject/cppu/source/threadpool/current.o -MP -MF /work/workdir_for_build/Dep/CxxObject/cppu/source/threadpool/current.d_ -I/src/libreoffice/include -I/work/config_build -I/work/workdir_for_build/UnoApiHeadersTarget/udkapi/normal 1. /src/libreoffice/cppu/source/threadpool/current.cxx:77:8: current parser token ';' 2. /src/libreoffice/cppu/source/threadpool/current.cxx:37:1: parsing namespace 'cppu' 3. /src/libreoffice/cppu/source/threadpool/current.cxx:41:1: parsing function body 'cppu::get_type_XCurrentContext' 4. /src/libreoffice/cppu/source/threadpool/current.cxx:41:1: in compound statement ('{}') #0 0x000000000190f863 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/local/bin/clang-15+0x190f863) #1 0x000000000190d7ae llvm::sys::RunSignalHandlers() (/usr/local/bin/clang-15+0x190d7ae) #2 0x000000000190ed0d llvm::sys::CleanupOnSignal(unsigned long) (/usr/local/bin/clang-15+0x190ed0d) #3 0x0000000001893000 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0 #4 0x00007f628aef1420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420) #5 0x00007f628aafc963 (/lib/x86_64-linux-gnu/libc.so.6+0x18b963) #6 0x000000000186b31b llvm::APInt::APInt(unsigned int, llvm::ArrayRef<unsigned long>) (/usr/local/bin/clang-15+0x186b31b) #7 0x0000000003d5031a (anonymous namespace)::StmtPrinter::VisitUserDefinedLiteral(clang::UserDefinedLiteral*) StmtPrinter.cpp:0:0 #8 0x0000000003d44e40 clang::Stmt::printPretty(llvm::raw_ostream&, clang::PrinterHelper*, clang::PrintingPolicy const&, unsigned int, llvm::StringRef, clang::ASTContext const*) const (/usr/local/bin/clang-15+0x3d44e40) Change-Id: I963a7ee431748b21ab587a90208f9cdbb2df2bf9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166918 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-27loplugin:ostr in cppu,cppuhelperNoel Grandin
Change-Id: I15c00d7a87396d07be2d10a0311f308a93e8eec3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166751 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-03-29tdf#146619 Drop unused 'using namespace' in: cppu/ cppuhelper/Gabor Kelemen
Change-Id: I4658c2a5c780fa5e8dd83381eb9978510973e0a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165511 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2021-12-21loplugin:flatten in canvas..cuiNoel Grandin
Change-Id: I208767eaa60d913fe2882403f1f9351eb08256f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127224 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-10clang:optin.performance.Padding in cppuNoel Grandin
Excessive padding in 'struct cppu::IdContainer' (11 padding bytes, where 3 is optimal). Excessive padding in 'struct (anonymous namespace)::ObjectEntry' (11 padding bytes, where 3 is optimal). Change-Id: I39216b9927abeb8ec61ab590dc25bc203a112028 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121921 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-06return a reference instead of a pointerCaolán McNamara
and remove redundant nullptr OSL_ENSURE check Change-Id: I19e202c3786386ed6f094504a0e1eb6928aa423a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120105 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-06cid#1489779 Uninitialized pointer fieldCaolán McNamara
Change-Id: I3a9405ff1ed161a02b590d2ac996d88b5fb1978d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120099 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-04osl_createThreadKey->thread_local in IdContainerNoel Grandin
Change-Id: I5989610bd49597259d387b81dd7e8c63738255a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120000 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-30Don't use global mutex here for static initializationMike Kaganski
Change-Id: I3fa0cd7e31a8c89b5fb1eba7b36636e02a785df8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110140 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-04-18loplugin:flatten in cppuNoel Grandin
Change-Id: I202698a0310bd26b98c1f744c8f21288f87643f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92450 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-22Extend loplugin:external to warn about classesStephan Bergmann
...following up on 314f15bff08b76bf96acf99141776ef64d2f1355 "Extend loplugin:external to warn about enums". Cases where free functions were moved into an unnamed namespace along with a class, to not break ADL, are in: filter/source/svg/svgexport.cxx sc/source/filter/excel/xelink.cxx sc/source/filter/excel/xilink.cxx svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx All other free functions mentioning moved classes appear to be harmless and not give rise to (silent, even) ADL breakage. (One remaining TODO in compilerplugins/clang/external.cxx is that derived classes are not covered by computeAffectedTypes, even though they could also be affected by ADL-breakage--- but don't seem to be in any acutal case across the code base.) For friend declarations using elaborate type specifiers, like class C1 {}; class C2 { friend class C1; }; * If C2 (but not C1) is moved into an unnamed namespace, the friend declaration must be changed to not use an elaborate type specifier (i.e., "friend C1;"; see C++17 [namespace.memdef]/3: "If the name in a friend declaration is neither qualified nor a template-id and the declaration is a function or an elaborated-type-specifier, the lookup to determine whether the entity has been previously declared shall not consider any scopes outside the innermost enclosing namespace.") * If C1 (but not C2) is moved into an unnamed namespace, the friend declaration must be changed too, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882> "elaborated-type-specifier friend not looked up in unnamed namespace". Apart from that, to keep changes simple and mostly mechanical (which should help avoid regressions), out-of-line definitions of class members have been left in the enclosing (named) namespace. But explicit specializations of class templates had to be moved into the unnamed namespace to appease <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598> "explicit specialization of template from unnamed namespace using unqualified-id in enclosing namespace". Also, accompanying declarations (of e.g. typedefs or static variables) that could arguably be moved into the unnamed namespace too have been left alone. And in some cases, mention of affected types in blacklists in other loplugins needed to be adapted. And sc/qa/unit/mark_test.cxx uses a hack of including other .cxx, one of which is sc/source/core/data/segmenttree.cxx where e.g. ScFlatUInt16SegmentsImpl is not moved into an unnamed namespace (because it is declared in sc/inc/segmenttree.hxx), but its base ScFlatSegmentsImpl is. GCC warns about such combinations with enabled-by-default -Wsubobject-linkage, but "The compiler doesn’t give this warning for types defined in the main .C file, as those are unlikely to have multiple definitions." (<https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Warning-Options.html>) The warned-about classes also don't have multiple definitions in the given test, so disable the warning when including the .cxx. Change-Id: Ib694094c0d8168be68f8fe90dfd0acbb66a3f1e4 Reviewed-on: https://gerrit.libreoffice.org/83239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-29tdf#42949 Fix IWYU warnings in cppu/Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ia1b2f0a9c99acc7ac538f3b41c1b6757d414db35 Reviewed-on: https://gerrit.libreoffice.org/66970 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-04replace double-checked locking patterns with thread safe local staticsMike Kaganski
Change-Id: Ie1aae7ecbd065a88b371d8c0deb586f54f7eff65 Reviewed-on: https://gerrit.libreoffice.org/62835 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-24remove more rtl::OUString and OString prefixesNoel Grandin
which seem to have snuck back in since the great rounds of removals. Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1 Reviewed-on: https://gerrit.libreoffice.org/62229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-17New loplugin:externalStephan Bergmann
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-11loplugin:salcall fix functionsNoel Grandin
since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23loplugin:includeform: cppuStephan Bergmann
Change-Id: I438346398fd8430cf4357b8a3d8e9f423966f2ca
2017-05-07revert OSL_ASSERT changesChris Sherlock
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
2017-05-07tdf#43157: convert cppu's threadpool from OSL_ASSERT to assertChris Sherlock
Change-Id: Id9cb46db0dd6f635014982ce958804dd0f02dd83
2017-02-23Assert IdContainer's bInit in uno_releaseIdFromCurrentThreadStephan Bergmann
...implying that pLocalThreadId, nRefCountOfCurrentId, pCurrentId are initialized, implying that zero-initializing them during construction isn't necessary. Change-Id: I98399203694edde14abc664a82861ba50dfb357c
2016-04-20loplugin:salbool: Automatic rewrite of sal_False/TrueStephan Bergmann
Change-Id: I47acc5590a935c7f9089231efbb1319664942f16
2016-02-09Remove excess newlinesChris Sherlock
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I17eb40b2923793280ea220e519f97563c8490a19
2015-06-09cppcheck: noExplicitConstructorCaolán McNamara
Change-Id: Ic33ee6936f40bec4f3a82aea39a180ae6e9a0928
2015-03-31Reduce to static_cast any reinterpret_cast from void pointersStephan Bergmann
Change-Id: I22ee2cbacad8b19bb55db234e816d401edcf4a35
2015-01-20Some more loplugin:cstylecast: cppuStephan Bergmann
Change-Id: Iec1251648031afa9eddd7445135fb08dc74821bd
2015-01-05Fix includeStephan Bergmann
Change-Id: Ie5253f9b32bb6ed1099eca75b442ba26528f2b32
2015-01-05Include function declarationsStephan Bergmann
Change-Id: Ib1ce66bf9ec71280409335c0a5022ecfe229f494
2014-11-20Clean up includesStephan Bergmann
Change-Id: Id3aaae19d86b706fd5ddb5982340472d28a75610
2014-06-05cppu: remove SAL_THROW macroNoel Grandin
Change-Id: I2f1909f953846f0d0b6fb402b4beb373bba8b2a8
2014-05-11coverity#707713 Uninitialized pointer fieldCaolán McNamara
Change-Id: I4c51287f20d070fe3227adb5a1909c9539938f27
2014-02-27Remove visual noise from cppuAlexander Wilms
Change-Id: Ib776a6e5397eb9731cf908c4015642c29b320ff6 Reviewed-on: https://gerrit.libreoffice.org/8247 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-23Remove unneccessary commentsAlexander Wilms
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb Reviewed-on: https://gerrit.libreoffice.org/8182 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-17cppu: sal_Bool -> boolStephan Bergmann
Change-Id: I1288f1f6f38d1475b4eb5272509e479bd9f2552d
2013-12-16Clean-up uno/lbnames.hStephan Bergmann
Change-Id: I4bd729499aa8be58f04194656e35c1f79d5d4919
2013-09-04UNO interface UIKs are unused for a very long timeStephan Bergmann
...so mark them as @deprecated more thoroughly and always force them to zero. Change-Id: I5db2dab924fc5a4145a0e5dd055b654985ce2ef9
2013-03-19removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings declarationsThomas Arnhold
s/(OUString\s+[a-zA-Z_][A-Za-z0-9_]*\s*)\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/$1\($2\)/gms Change-Id: Iad20f242c80c4bdc69df17e2d7a69d58ea53654b Reviewed-on: https://gerrit.libreoffice.org/2835 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
2012-06-13re-base on ALv2 code.Michael Meeks
2012-03-14Dead codeStephan Bergmann
2012-03-14Enable -Wnon-virtual-dtor for GCC 4.6Stephan Bergmann
...which has the necessary features to support it. Change a lot of classes to either contain a protected non-virtual dtor (which is backwards compatible, so even works for cppumaker-generated UNO headers) or a public virtual one. cppuhelper/propertysetmixin.hxx still needs to disable the warning, as the relevant class has a non-virtual dtor but friends, which would still cause GCC to warn. Includes a patch for libcmis, intended to be upstreamed.
2012-01-26Code cleanup: ( () ) replaced by (())Alexander Bergmann
2011-12-19cppu: add visibility symbolsMatúš Kukan
2011-11-27remove include of pch header in cppuNorbert Thiebaud
2010-10-14Add vim/emacs modelines to all source filesSebastian Spaeth
Fixes #fdo30794 Based on bin/add-modelines script (originally posted in mail 1286706307.1871.1399280959@webmail.messagingengine.com) Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2010-10-11#i107490# cppu lifecycle cleanupCaolán McNamara
2010-02-12changefileheader2: #i109125#: change source file copyright notice from Sun ↵Jens-Heiner Rechtien
Microsystems to Oracle; remove CVS style keywords (RCSfile, Revision)
2008-04-11INTEGRATION: CWS changefileheader (1.15.40); FILE MERGEDRüdiger Timm
2008/03/31 07:23:20 rt 1.15.40.1: #i87441# Change license header to LPGL v3.
2007-05-09INTEGRATION: CWS bunoexttm (1.14.28); FILE MERGEDKurt Zenker
2007/03/08 12:16:48 thb 1.14.28.5: #i10000# Fixed build breakages with DBG_UTIL build and OSX 2007/03/01 09:18:31 kr 1.14.28.4: simplified: rely on IdentityMapping 2007/03/01 09:14:33 kr 1.14.28.3: simplified: use uno::Mapping and uno::Environment instead of C types 2007/03/01 09:01:36 kr 1.14.28.2: simplified: removed unreachable code 2007/03/01 08:56:38 kr 1.14.28.1: fixed: removed all hard casts, manage obj lifecycle vie env. only
2006-09-16INTEGRATION: CWS pchfix02 (1.13.60); FILE MERGEDOliver Bolte
2006/09/01 17:23:01 kaib 1.13.60.1: #i68856# Added header markers and pch files