100 Commits
Author SHA1 Message Date
Stephan Bergmann ddb73f1538 Adapt compilerplugins to isCXX11ConstantExpr signature change
...in
<https://github.com/llvm/llvm-project/commit/2dc95bd763b87ffb563e2a90180bb7e8c49ec16a>
"[clang][AST] Make Result parameter of `isCXX11ConstantExpr` mandatory
(#226493)" towards LLVM 24

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I1f7d859559d095ab79e28a86a441c9c756b3fef7
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/14253
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 361d0cf87c1ed06f5437ec03c33f317bf8d9b864)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211835
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-10-06 09:55:20 +02:00
Stephan Bergmann 63301fc8d2 Prevent assertion in loplugin:cppunitassertequals
> clang++: /home/sberg/github.com/llvm/llvm-project/clang/lib/AST/ExprConstant.cpp:22171: bool clang::Expr::isCXX11ConstantExpr(const ASTContext &, APValue *) const: Assertion `!isValueDependent() && "Expression evaluator can't be called on a dependent expression."' failed.

as seen at engine/sc/qa/unit/ucalc_pivottable.cxx:269

>     CPPUNIT_ASSERT_EQUAL_MESSAGE("Unexpected data range.",
>                            static_cast<SCCOL>(FieldCount - 1), nCol2);

since 94299df72efeddb3d5af31396f5008300d66a90d "sc: Use #SPILL! error if the
pivot table output is blocked"

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I83f7949a7458ce030c13e94e2d9682ae080cc763
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1895
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit c3dec06e55716011a69d7b47163747007e05d905)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211834
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-10-06 09:55:14 +02:00
Stephan Bergmann 1c0b50766a Fix heap-use-after-free
...as seen once during JunitTest_forms_complex,

> ==2007790==ERROR: AddressSanitizer: heap-use-after-free on address 0x7ccbfe8b3a38 at pc 0x7f5c5361ed51 bp 0x7b5bd4ac7420 sp 0x7b5bd4ac7418
> READ of size 2 at 0x7ccbfe8b3a38 thread T8
>  #0 in SfxItemPool::IsInRange(unsigned short) const at engine/include/svl/itempool.hxx:331:66
>  #1 in SfxItemPool::getTargetPool(unsigned short) const at engine/svl/source/items/itempool.cxx:452:9
>  #2 in SfxItemPool::CheckItemInfoFlag(unsigned short, unsigned short) const at engine/svl/source/items/itempool.cxx:461:26
>  #3 in SfxItemPool::NeedsSurrogateSupport(unsigned short) const at engine/include/svl/itempool.hxx:343:18
>  #4 in SfxItemSet::checkRemovePoolRegistration(SfxPoolItem const*) at engine/svl/source/items/itemset.cxx:384:20
>  #5 in SfxItemSet::ClearSingleItem_PrepareRemove(SfxPoolItem const*) at engine/svl/source/items/itemset.cxx:364:5
>  #6 in SfxItemSet::ClearAllItemsImpl() at engine/svl/source/items/itemset.cxx:443:9
>  #7 in SfxItemSet::~SfxItemSet() at engine/svl/source/items/itemset.cxx:318:5
>  #8 in std::_Optional_payload_base<SfxItemSet>::_M_destroy() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/optional:305:23
>  #9 in std::_Optional_payload_base<SfxItemSet>::_M_reset() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/optional:341:4
>  #10 in std::_Optional_payload<SfxItemSet, false, false, false>::~_Optional_payload() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/optional:464:57
>  #11 in std::_Optional_base<SfxItemSet, false, false>::~_Optional_base() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/optional:488:12
>  #12 in std::optional<SfxItemSet>::~optional() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/optional:781:11
>  #13 in sdr::properties::DefaultProperties::~DefaultProperties() at engine/svx/source/sdr/properties/defaultproperties.cxx:92:50
>  #14 in sdr::properties::AttributeProperties::~AttributeProperties() at engine/svx/source/sdr/properties/attributeproperties.cxx:221:9
>  #15 in sdr::properties::TextProperties::~TextProperties() at engine/svx/source/sdr/properties/textproperties.cxx:79:9
>  #16 in sdr::properties::RectangleProperties::~RectangleProperties() at engine/svx/source/sdr/properties/rectangleproperties.cxx:38:9
>  #17 in sdr::properties::RectangleProperties::~RectangleProperties() at engine/svx/source/sdr/properties/rectangleproperties.cxx:37:9
>  #18 in std::default_delete<sdr::properties::BaseProperties>::operator()(sdr::properties::BaseProperties*) const at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/unique_ptr.h:92:2
>  #19 in std::__uniq_ptr_impl<sdr::properties::BaseProperties, std::default_delete<sdr::properties::BaseProperties>>::reset(sdr::properties::BaseProperties*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/unique_ptr.h:204:4
>  #20 in std::unique_ptr<sdr::properties::BaseProperties, std::default_delete<sdr::properties::BaseProperties>>::reset(sdr::properties::BaseProperties*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/unique_ptr.h:530:7
>  #21 in SdrObject::~SdrObject() at engine/svx/source/svdraw/svdobj.cxx:589:18
>  #22 in SdrAttrObj::~SdrAttrObj() at engine/svx/source/svdraw/svdoattr.cxx:42:28
>  #23 in SdrTextObj::~SdrTextObj() at engine/svx/source/svdraw/svdotext.cxx:156:1
>  #24 in SdrRectObj::~SdrRectObj() at engine/svx/source/svdraw/svdorect.cxx:69:25
>  #25 in SdrUnoObj::~SdrUnoObj() at engine/svx/source/svdraw/svdouno.cxx:223:1
>  #26 in FmFormObj::~FmFormObj() at engine/svx/source/form/fmobj.cxx:120:1
>  #27 in FmFormObj::~FmFormObj() at engine/svx/source/form/fmobj.cxx:113:1
>  #28 in SdrObject::release() at engine/svx/source/svdraw/svdobj.cxx:612:9
>  #29 in rtl::Reference<SdrObject>::clear() at engine/include/rtl/ref.hxx:181:19
>  #30 in SvxShape::~SvxShape() at engine/svx/source/unodraw/unoshape.cxx:199:21
>  #31 in SvxShapeText::~SvxShapeText() at engine/svx/source/unodraw/unoshape.cxx:3828:1
>  #32 in SvxShapeControl::~SvxShapeControl() at engine/svx/source/unodraw/unoshap2.cxx:393:1
>  #33 in SvxShapeControl::~SvxShapeControl() at engine/svx/source/unodraw/unoshap2.cxx:392:1
>  #34 in cppu::OWeakObject::release() at engine/cppuhelper/source/weak.cxx:231:9
>  #35 in cppu::OWeakAggObject::release() at engine/cppuhelper/source/weak.cxx:293:22
>  #36 in cppu::WeakAggImplHelper12<com::sun::star::drawing::XShape, com::sun::star::lang::XComponent, com::sun::star::beans::XPropertySet, com::sun::star::beans::XMultiPropertySet, com::sun::star::beans::XPropertyState, com::sun::star::lang::XUnoTunnel, com::sun::star::container::XNamed, com::sun::star::drawing::XGluePointsSupplier, com::sun::star::container::XChild, com::sun::star::lang::XServiceInfo, com::sun::star::document::XActionLockable, com::sun::star::beans::XMultiPropertyStates>::release() at engine/include/cppuhelper/implbase12.hxx:161:31
>  #37 in SvxShapeText::release() at engine/include/svx/unoshape.hxx:357:17
>  #38 in SvxShapeControl::release() at engine/include/svx/unoshape.hxx:508:21
>  #39 in freeUnoInterfaceProxy at engine/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx:42:19
>  #40 in (anonymous namespace)::s_stub_defenv_revokeInterface(__va_list_tag (*) [1]) at engine/cppu/source/uno/lbenv.cxx:369:17
>  #41 in s_environment_invoke_v(_uno_Environment*, _uno_Environment*, void (*)(__va_list_tag (*) [1]), __va_list_tag (*) [1]) at engine/cppu/source/uno/EnvStack.cxx:292:9
>  #42 in uno_Environment_invoke_v at engine/cppu/source/uno/EnvStack.cxx:310:5
>  #43 in uno_Environment_invoke at engine/cppu/source/uno/EnvStack.cxx:318:5
>  #44 in (anonymous namespace)::defenv_revokeInterface(_uno_ExtEnvironment*, void*) at engine/cppu/source/uno/lbenv.cxx:423:5
>  #45 in releaseProxy at engine/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx:78:9
>  #46 in com::sun::star::uno::UnoInterfaceReference::~UnoInterfaceReference() at engine/include/uno/dispatcher.hxx:93:9
>  #47 in binaryurp::Bridge::releaseStub(rtl::OUString const&, com::sun::star::uno::TypeDescription const&) at engine/binaryurp/source/bridge.cxx:509:1
>  #48 in binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::__debug::vector<binaryurp::BinaryAny, std::allocator<binaryurp::BinaryAny>>*) const at engine/binaryurp/source/incomingrequest.cxx:138:18
>  #49 in binaryurp::IncomingRequest::execute() const at engine/binaryurp/source/incomingrequest.cxx:79:26
>  #50 in request at engine/binaryurp/source/reader.cxx:86:9
>  #51 in cppu_threadpool::JobQueue::enter(void const*, bool) at engine/cppu/source/threadpool/jobqueue.cxx:100:17
>  #52 in cppu_threadpool::ORequestThread::run() at engine/cppu/source/threadpool/thread.cxx:165:31
>  #53 in threadFunc at engine/include/osl/thread.hxx:175:15
>  #54 in osl_thread_start_Impl(void*) at engine/sal/osl/unx/thread.cxx:240:9
>
> 0x7ccbfe8b3a38 is located 184 bytes inside of 648-byte region [0x7ccbfe8b3980,0x7ccbfe8b3c08)
> freed by thread T23 here:
>  #0 in operator delete(void*, unsigned long) at ~/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:187:3
>  #1 in SdrItemPool::~SdrItemPool() at engine/svx/source/svdraw/svdattr.cxx:514:1
>  #2 in salhelper::SimpleReferenceObject::release() at engine/include/salhelper/simplereferenceobject.hxx:61:13
>  #3 in rtl::Reference<SfxItemPool>::~Reference() at engine/include/rtl/ref.hxx:116:22
>  #4 in SdrModel::~SdrModel() at engine/svx/source/svdraw/svdmodel.cxx:275:1
>  #5 in FmFormModel::~FmFormModel() at engine/svx/source/form/fmmodel.cxx:69:1
>  #6 in SdDrawDocument::~SdDrawDocument() at engine/sd/source/core/drawdoc.cxx:418:1
>  #7 in sd::DrawDocShell::~DrawDocShell() at engine/sd/source/ui/docshell/docshell.cxx:192:9
>  #8 in sd::GraphicDocShell::~GraphicDocShell() at engine/sd/source/ui/docshell/grdocsh.cxx:57:38
>  #9 in sd::GraphicDocShell::~GraphicDocShell() at engine/sd/source/ui/docshell/grdocsh.cxx:57:37
>  #10 in cppu::OWeakObject::release() at engine/cppuhelper/source/weak.cxx:231:9
>  #11 in rtl::Reference<SfxObjectShell>::~Reference() at engine/include/rtl/ref.hxx:116:22
>  #12 in IMPL_SfxBaseModel_DataContainer::~IMPL_SfxBaseModel_DataContainer() at engine/sfx2/source/doc/sfxbasemodel.cxx:268:5
>  #13 in void std::destroy_at<IMPL_SfxBaseModel_DataContainer>(IMPL_SfxBaseModel_DataContainer*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/stl_construct.h:88:15
>  #14 in void std::_Destroy<IMPL_SfxBaseModel_DataContainer>(IMPL_SfxBaseModel_DataContainer*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/stl_construct.h:164:7
>  #15 in void std::allocator_traits<std::allocator<void>>::destroy<IMPL_SfxBaseModel_DataContainer>(std::allocator<void>&, IMPL_SfxBaseModel_DataContainer*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/alloc_traits.h:863:4
>  #16 in std::_Sp_counted_ptr_inplace<IMPL_SfxBaseModel_DataContainer, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/shared_ptr_base.h:650:2
>  #17 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/shared_ptr_base.h:423:8
>  #18 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/shared_ptr_base.h:1100:11
>  #19 in std::__shared_ptr<IMPL_SfxBaseModel_DataContainer, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/shared_ptr_base.h:1574:31
>  #20 in std::__shared_ptr<IMPL_SfxBaseModel_DataContainer, (__gnu_cxx::_Lock_policy)2>::reset() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/shared_ptr_base.h:1692:9
>  #21 in SfxBaseModel::dispose() at engine/sfx2/source/doc/sfxbasemodel.cxx:802:13
>  #22 in SdXImpressDocument::dispose() at engine/sd/source/ui/unoidl/unomodel.cxx:5515:19
>  #23 in SfxBaseModel::close(bool) at engine/sfx2/source/doc/sfxbasemodel.cxx:1544:5
>  #24 in gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*) at engine/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:87:5
>  #25 in cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, _typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*, void*, void**, _uno_Any**) at engine/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:230:13
>  #26 in unoInterfaceProxyDispatch at engine/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:410:13
>  #27 in binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::__debug::vector<binaryurp::BinaryAny, std::allocator<binaryurp::BinaryAny>>*) const at engine/binaryurp/source/incomingrequest.cxx:236:13
>  #28 in binaryurp::IncomingRequest::execute() const at engine/binaryurp/source/incomingrequest.cxx:79:26
>  #29 in request at engine/binaryurp/source/reader.cxx:86:9
>  #30 in cppu_threadpool::JobQueue::enter(void const*, bool) at engine/cppu/source/threadpool/jobqueue.cxx:100:17
>  #31 in cppu_threadpool::ORequestThread::run() at engine/cppu/source/threadpool/thread.cxx:165:31
>  #32 in threadFunc at engine/include/osl/thread.hxx:175:15
>  #33 in osl_thread_start_Impl(void*) at engine/sal/osl/unx/thread.cxx:240:9

Change-Id: Ib38eb730f9178976d4432f77857b4f09ebfbdbcf
Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/6296
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit 7a151cb95d66be93ef2a2687d1ff55ca37daa410)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211728
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-10-05 08:52:33 +02:00
Stephan Bergmann e53d782042 Adapt loplugins to glibc 2.44 assert macro internals
...which started to cause issues like

> [CXX] sal/osl/all/acceptableaccessdenial.cxx
> engine/sal/osl/all/acceptableaccessdenial.cxx:30:5: error: implicit conversion (IntegralCast) from 'bool' to 'int' [loplugin:implicitboolconversion]
>    30 |     assert(acceptableAccessDenials > 0);
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/include/assert.h:139:23: note: expanded from macro 'assert'
>   139 |       ? void (1 ? 1 : bool (__VA_ARGS__))                               \
>       |                       ^~~~~~~~~~~~~~~~~~
> engine/sal/osl/all/acceptableaccessdenial.cxx:30:5: error: redundant functional cast from 'bool' to 'bool' [loplugin:redundantcast]
>    30 |     assert(acceptableAccessDenials > 0);
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/include/assert.h:139:23: note: expanded from macro 'assert'
>   139 |       ? void (1 ? 1 : bool (__VA_ARGS__))                               \
>       |                       ^~~~~~~~~~~~~~~~~~

and

> [C  ] soltools/cpp/_tokens.c
> engine/soltools/cpp/_tokens.c:56:17: error: possibly unwanted implicit conversion when calling bool param [loplugin:pointerbool]
>    56 |     assert(trp->bp); // realloc failure is OOM -> no point to handle
>       |            ~~~~~^~
> /usr/include/assert.h:164:42: note: expanded from macro 'assert'
>   164 |     ((void) sizeof (__assert_single_arg (__VA_ARGS__)), __extension__ ({ \
>       |                                          ^~~~~~~~~~~
> /usr/include/assert.h:114:40: note: method here [loplugin:pointerbool]
>   114 | extern _Bool __assert_single_arg (_Bool);
>       |                                   ~~~~~^
> engine/soltools/cpp/_tokens.c:56:12: error: implicit conversion (PointerToBoolean) of call argument from 'Token *' (aka 'struct token *') to 'bool' [loplugin:implicitboolconversion]
>    56 |     assert(trp->bp); // realloc failure is OOM -> no point to handle
>       |            ^~~~~~~
> /usr/include/assert.h:164:42: note: expanded from macro 'assert'
>   164 |     ((void) sizeof (__assert_single_arg (__VA_ARGS__)), __extension__ ({ \
>       |                                          ^~~~~~~~~~~

and

> [CPT] compilerplugins/clang/test/consttobool.cxx
> error: 'expected-error' diagnostics seen but not expected:
>   Line 72: implicit conversion of constant &"msg"[0] of type 'const char *' to 'bool'; use 'true' instead [loplugin:consttobool]
> 1 error generated.

against glibc-devel-2.44-1.fc45.x86_64

[Cherry-pick note by Michael Weghorn:
clang-format was run on the files modified by this commit
to adhere to code style as mandated by the LibreOffice clang-format rules,
while the Collabora repository that this commit was cherry-picked
from doesn't check clang-format rules any more.
Based on the discussion in
https://gerrit.libreoffice.org/c/core/+/211063/comments/d368cf20_d66d1a50 ,
I'm adding myself as co-author to clarify the cherry-picked commit
contains those additional changes to the original commit by Stephan
from the Collabora main branch.]

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I53d66f280ea82d295a2c2c086f4d02a965a893d7
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12738
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit ecce89b1fe7f0b1f09c13c46625b33443b1dadfb)
Co-authored-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211063
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-21 11:49:48 +02:00
Stephan Bergmann 2dc002cab1 Fix UBSan dynamic-type-mismatch
...at

> engine/sc/source/ui/unoobj/chart2uno.cxx:1622:20: runtime error: downcast of address 0x7c6579dde660 which does not point to an object of type 'ScDoubleRefToken'
> 0x7c6579dde660: note: object is of type 'ScExternalDoubleRefToken'
>  00 00 00 00  b0 11 4e 1b f5 7b 00 00  00 00 13 00 01 00 00 00  00 00 be be be be be be  80 16 8d 79
>               ^~~~~~~~~~~~~~~~~~~~~~~
>               vptr for 'ScExternalDoubleRefToken'
>  #0 in (anonymous namespace)::InsertTabNumber::operator()(boost::intrusive_ptr<formula::FormulaToken> const&) const at engine/sc/source/ui/unoobj/chart2uno.cxx:1622:20
>  #1 in __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<boost::intrusive_ptr<formula::FormulaToken>*, std::__cxx1998::vector<boost::intrusive_ptr<formula::FormulaToken>, std::allocator<boost::intrusive_ptr<formula::FormulaToken>>>>, std::__debug::vector<boost::intrusive_ptr<formula::FormulaToken>, std::allocator<boost::intrusive_ptr<formula::FormulaToken>>>, std::random_access_iterator_tag> std::__for_each<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<boost::intrusive_ptr<formula::FormulaToken>*, std::__cxx1998::vector<boost::intrusive_ptr<formula::FormulaToken>, std::allocator<boost::intrusive_ptr<formula::FormulaToken>>>>, std::__debug::vector<boost::intrusive_ptr<formula::FormulaToken>, std::allocator<boost::intrusive_ptr<formula::FormulaToken>>>, std::random_access_iterator_tag>, (anonymous namespace)::InsertTabNumber>(__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<boost::intrusive_ptr<formula::FormulaToken>*, std::__cxx1998::vector<boost::intrusive_ptr<formula::FormulaToken>, std::allocator<boost::intrusive_ptr<formula::FormulaToken>>>>, std::__debug::vector<boost::intrusive_ptr<formula::FormulaToken>, std::allocator<boost::intrusive_ptr<formula::FormulaToken>>>, std::random_access_iterator_tag>, __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<boost::intrusive_ptr<formula::FormulaToken>*, std::__cxx1998::vector<boost::intrusive_ptr<formula::FormulaToken>, std::allocator<boost::intrusive_ptr<formula::FormulaToken>>>>, std::__debug::vector<boost::intrusive_ptr<formula::FormulaToken>, std::allocator<boost::intrusive_ptr<formula::FormulaToken>>>, std::random_access_iterator_tag>, (anonymous namespace)::InsertTabNumber&) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/stl_algo.h:159:6
>  #2 in (anonymous namespace)::InsertTabNumber std::for_each<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<boost::intrusive_ptr<formula::FormulaToken>*, std::__cxx1998::vector<boost::intrusive_ptr<formula::FormulaToken>, std::allocator<boost::intrusive_ptr<formula::FormulaToken>>>>, std::__debug::vector<boost::intrusive_ptr<formula::FormulaToken>, std::allocator<boost::intrusive_ptr<formula::FormulaToken>>>, std::random_access_iterator_tag>, (anonymous namespace)::InsertTabNumber>(__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<boost::intrusive_ptr<formula::FormulaToken>*, std::__cxx1998::vector<boost::intrusive_ptr<formula::FormulaToken>, std::allocator<boost::intrusive_ptr<formula::FormulaToken>>>>, std::__debug::vector<boost::intrusive_ptr<formula::FormulaToken>, std::allocator<boost::intrusive_ptr<formula::FormulaToken>>>, std::random_access_iterator_tag>, __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<boost::intrusive_ptr<formula::FormulaToken>*, std::__cxx1998::vector<boost::intrusive_ptr<formula::FormulaToken>, std::allocator<boost::intrusive_ptr<formula::FormulaToken>>>>, std::__debug::vector<boost::intrusive_ptr<formula::FormulaToken>, std::allocator<boost::intrusive_ptr<formula::FormulaToken>>>, std::random_access_iterator_tag>, (anonymous namespace)::InsertTabNumber) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/stl_algo.h:3846:7
>  #3 in ScChart2DataProvider::detectArguments(com::sun::star::uno::Reference<com::sun::star::chart2::data::XDataSource> const&) at engine/sc/source/ui/unoobj/chart2uno.cxx:1961:16
>  #4 in non-virtual thunk to ScChart2DataProvider::detectArguments(com::sun::star::uno::Reference<com::sun::star::chart2::data::XDataSource> const&) at engine/sc/source/ui/unoobj/chart2uno.cxx
>  #5 in oox::drawingml::ChartExport::getSplitCategoriesList(rtl::OUString const&) at engine/oox/source/export/chartexport.cxx:723:106
>  #6 in oox::drawingml::ChartExport::exportSeriesCategory(com::sun::star::uno::Reference<com::sun::star::chart2::data::XDataSequence> const&, int) at engine/oox/source/export/chartexport.cxx:4498:89
>  #7 in oox::drawingml::ChartExport::exportSeries_chart(com::sun::star::uno::Reference<com::sun::star::chart2::XChartType> const&, cpo::uno::Sequence<com::sun::star::uno::Reference<com::sun::star::chart2::XDataSeries>> const&, bool&) at engine/oox/source/export/chartexport.cxx:4048:21
>  #8 in oox::drawingml::ChartExport::exportAllSeries(com::sun::star::uno::Reference<com::sun::star::chart2::XChartType> const&, bool&) at engine/oox/source/export/chartexport.cxx:3881:5
>  #9 in oox::drawingml::ChartExport::exportPieChart(com::sun::star::uno::Reference<com::sun::star::chart2::XChartType> const&) at engine/oox/source/export/chartexport.cxx:3687:5
>  #10 in oox::drawingml::ChartExport::exportPlotArea(com::sun::star::uno::Reference<com::sun::star::chart::XChartDocument> const&, bool) at engine/oox/source/export/chartexport.cxx:2932:33
>  #11 in oox::drawingml::ChartExport::exportChart(com::sun::star::uno::Reference<com::sun::star::chart::XChartDocument> const&, bool) at engine/oox/source/export/chartexport.cxx:2302:5
>  #12 in oox::drawingml::ChartExport::exportChartSpace(com::sun::star::uno::Reference<com::sun::star::chart::XChartDocument> const&, bool, bool) at engine/oox/source/export/chartexport.cxx:1570:5
>  #13 in oox::drawingml::ChartExport::ExportContent_(bool) at engine/oox/source/export/chartexport.cxx:1480:9
>  #14 in oox::drawingml::ChartExport::ExportContent() at engine/oox/source/export/chartexport.cxx:1457:5
>  #15 in oox::drawingml::ChartExport::WriteChartObj(com::sun::star::uno::Reference<com::sun::star::drawing::XShape> const&, int, int) at engine/oox/source/export/chartexport.cxx:1273:5
>  #16 in XclExpChartObj::SaveXml(XclExpXmlStream&) at engine/sc/source/filter/excel/xeescher.cxx:1897:22
>  #17 in (anonymous namespace)::SaveDrawingMLObjects(XclExpObjList&, XclExpXmlStream&) at engine/sc/source/filter/xcl97/xcl97rec.cxx:304:16
>  #18 in XclExpObjList::SaveXml(XclExpXmlStream&) at engine/sc/source/filter/xcl97/xcl97rec.cxx:414:5
>  #19 in XclExpRecordList<XclExpRecordBase>::SaveXml(XclExpXmlStream&) at engine/sc/source/filter/inc/xerecord.hxx:386:21
>  #20 in ExcTable::WriteXml(XclExpXmlStream&) at engine/sc/source/filter/excel/excdoc.cxx:717:14
>  #21 in ExcDocument::WriteXml(XclExpXmlStream&) at engine/sc/source/filter/excel/excdoc.cxx:918:44
>  #22 in XclExpXmlStream::exportDocument() at engine/sc/source/filter/excel/xestream.cxx:1163:18
>  #23 in oox::core::FilterBase::filter(cpo::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at engine/oox/source/core/filterbase.cxx:500:83
>  #24 in oox::xls::ExcelFilter::filter(cpo::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at engine/sc/source/filter/oox/excelfilter.cxx:200:27
>  #25 in SfxObjectShell::ExportTo(SfxMedium&) at engine/sfx2/source/doc/objstor.cxx:2743:25
>  #26 in SfxObjectShell::SaveTo_Impl(SfxMedium&, SfxItemSet const*) at engine/sfx2/source/doc/objstor.cxx:1853:19
>  #27 in SfxObjectShell::PreDoSaveAs_Impl(rtl::OUString const&, rtl::OUString const&, SfxItemSet const&, cpo::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at engine/sfx2/source/doc/objstor.cxx:3263:39
>  #28 in SfxObjectShell::CommonSaveAs_Impl(INetURLObject const&, rtl::OUString const&, SfxItemSet&, cpo::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at engine/sfx2/source/doc/objstor.cxx:3051:20
>  #29 in SfxObjectShell::APISaveAs_Impl(std::basic_string_view<char16_t, std::char_traits<char16_t>>, SfxItemSet&, cpo::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at engine/sfx2/source/doc/objserv.cxx:329:19
>  #30 in SfxBaseModel::impl_store(rtl::OUString const&, cpo::uno::Sequence<com::sun::star::beans::PropertyValue> const&, bool) at engine/sfx2/source/doc/sfxbasemodel.cxx:3247:42
>  #31 in SfxBaseModel::storeToURL(rtl::OUString const&, cpo::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at engine/sfx2/source/doc/sfxbasemodel.cxx:1830:13
>  #32 in UnoApiTest::save(TestFilter, cpo::uno::Sequence<com::sun::star::beans::PropertyValue> const&, char const*) at engine/test/source/unoapi_test.cxx:386:16
>  #33 in testCool14390_ChartExternalRef::TestBody() at engine/sc/qa/unit/subsequent_export_test4.cxx:881:5

apparently caused by 003c0007c13e443fe4e520d1b70586266abf7811 "reduce
Sc*Ref*Token virtual calls".  Now using the helper that was introduced there.

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I3e1c82e8069cb03af29e8dc260017fc3e867f72b
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/11014
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 3797f2792490a1c114ce0a80db2d544bce08670b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210500
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-04 19:47:07 +02:00
Stephan Bergmann 787d22487b Use std::swap
...to avoid a false libc++ -Werror,-Wunused-but-set-variable as seen with
LLVM 24 trunk libc++ since
<https://github.com/llvm/llvm-project/commit/97f332f8d1274f74e02b2445a7c7317a4b458cb2>
"[libc++] Diagnose variables of container types" (see
<https://github.com/llvm/llvm-project/issues/215545> "Over-eager
-Wunused-but-set-variable for libc++ containers used only for side effect")

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I9996e63600a6711991b1c71c36af234bf4388d08
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/8989
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit ccbbd16488a00cf618b834395528b40a67c48252)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210497
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-04 19:46:42 +02:00
Stephan Bergmann 11d6547889 Handle missing default values in JS UNO structs
Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I63b589645a8c1efc95b6fb023931c45b1d08b65e
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/7624
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 0e55d63d948f177f3b3dabf459000b576e169815)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208737
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-28 23:32:25 +02:00
Stephan Bergmann 427f2f79e9 external/boost: Silence new Clang 24 trunk -Werror,-Wunused-template
as seen e.g. at

> In file included from engine/cppuhelper/source/defaultbootstrap.cxx:27:
> In file included from engine/cppuhelper/source/servicemanager.hxx:35:
> In file included from engine/external/boost/include/boost/container/small_vector.hpp:31:
> In file included from engine/workdir/UnpackedTarball/boost/boost/container/small_vector.hpp:27:
> In file included from engine/workdir/UnpackedTarball/boost/boost/container/vector.hpp:61:
> In file included from engine/workdir/UnpackedTarball/boost/boost/move/algo/adaptive_merge.hpp:16:
> engine/workdir/UnpackedTarball/boost/boost/move/algo/detail/adaptive_sort_merge.hpp:261:17: error: unused function template 'needed_keys_count' [-Werror,-Wunused-template]
>   261 | static SizeType needed_keys_count(SizeType n_block_a, SizeType n_block_b)
>       |                 ^~~~~~~~~~~~~~~~~

and

> In file included from engine/vcl/source/outdev/eps.cxx:22:
> In file included from engine/include/vcl/metaact.hxx:45:
> In file included from engine/workdir/UnpackedTarball/boost/boost/container/vector.hpp:61:
> In file included from engine/workdir/UnpackedTarball/boost/boost/move/algo/adaptive_merge.hpp:16:
> engine/workdir/UnpackedTarball/boost/boost/move/algo/detail/adaptive_sort_merge.hpp:261:17: error: unused function template 'needed_keys_count' [-Werror,-Wunused-template]
>   261 | static SizeType needed_keys_count(SizeType n_block_a, SizeType n_block_b)
>       |                 ^~~~~~~~~~~~~~~~~

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I1c81650c82df717317846769ea3ac016d9a14652
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/7281
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit fd3a8cc0417525806d45522fc6752c6678b2d433)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208736
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-28 23:24:12 +02:00
Stephan Bergmann dff972be18 Clang 23 trunk supports -std=c++2d now
...since
<https://github.com/llvm/llvm-project/commit/1381ef49fc5cc8c5bd76aa9b86fdf2507312d78d>
"[Clang] Add flags and lang option for C++2d (#203992)"

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I51ba2a7265663ced6a7dc2e9c9420b8c7b8a851f
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/7334
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit d239d80aef979e2371c33c49061b153d9f4c72d3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208734
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-28 14:39:53 +02:00
Stephan Bergmann 4bfd2fe88c external/skia: Support --with-latest-c++ with GCC 17 trunk and Clang 24 trunk
...in the same vein as a015d0798cf846d10b712ac80451ba9678ff61d8 "Add support for
C++29 to --with-latest-c++" and d239d80aef979e2371c33c49061b153d9f4c72d3 "Clang
23 trunk supports -std=c++2d now"

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I26add201dab5f4329379e45cbc2965cec0ee7f3f
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/7400
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 811e5fe3b3738c1d1aca48e8d6c3955d78c76e9d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208733
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-07-28 14:39:24 +02:00
Stephan Bergmann 5e058924d9 Fix use-after-free when a deferred fill-bitmap link's host dies
...as seen in CppunitTest_sw_tiledrendering2 since
d8a09afac6108d7ba23b253ed83b564af8a31c55 "register writer XATTR_FILLBITMAP URLs
as SvBaseLinks via SwFormat and SwContentNode",

> ==2824606==ERROR: AddressSanitizer: heap-use-after-free on address 0x7cc203206790 at pc 0x7bb1cfa02361 bp 0x7ffdaad4bb30 sp 0x7ffdaad4bb28
> READ of size 8 at 0x7cc203206790 thread T0
>  #0 in __gnu_cxx::__normal_iterator<SvtBroadcaster* const*, std::__cxx1998::vector<SvtBroadcaster*, std::allocator<SvtBroadcaster*>>>::__normal_iterator(SvtBroadcaster* const* const&) at /home/sberg/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/stl_iterator.h:1059:20
>  #1 in std::__cxx1998::vector<SvtBroadcaster*, std::allocator<SvtBroadcaster*>>::begin() const at /home/sberg/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/stl_vector.h:1051:16
>  #2 in std::__debug::vector<SvtBroadcaster*, std::allocator<SvtBroadcaster*>>::begin() const at /home/sberg/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/debug/vector:355:38
>  #3 in __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<SvtBroadcaster* const*, std::__cxx1998::vector<SvtBroadcaster*, std::allocator<SvtBroadcaster*>>>, std::__debug::vector<SvtBroadcaster*, std::allocator<SvtBroadcaster*>>, std::random_access_iterator_tag> o3tl::sorted_vector<SvtBroadcaster*, std::less<SvtBroadcaster*>, o3tl::find_unique>::find<SvtBroadcaster*>(SvtBroadcaster* const&) const at engine/include/o3tl/sorted_vector.hxx:220:69
>  #4 in SvtListener::BroadcasterDying(SvtBroadcaster&) at engine/svl/source/notify/listener.cxx:58:58
>  #5 in SvtBroadcaster::~SvtBroadcaster() at engine/svl/source/notify/broadcast.cxx:203:25
>  #6 in sw::BroadcasterMixin::~BroadcasterMixin() at engine/sw/inc/calbck.hxx:102:24
>  #7 in sw::BroadcastingModify::~BroadcastingModify() at engine/sw/inc/calbck.hxx:245:59
>  #8 in SwContentNode::~SwContentNode() at engine/sw/source/core/docnode/node.cxx:1115:1
>  #9 in SwTextNode::~SwTextNode() at engine/sw/source/core/txtnode/ndtxt.cxx:298:1
>  #10 in SwTextNode::~SwTextNode() at engine/sw/source/core/txtnode/ndtxt.cxx:296:1
>  #11 in SwNodes::RemoveNode(o3tl::strong_int<int, Tag_SwNodeOffset>, o3tl::strong_int<int, Tag_SwNodeOffset>, bool) at engine/sw/source/core/docnode/nodes.cxx:2417:13
>  #12 in SwNodes::DelNodes(SwNodeIndex const&, o3tl::strong_int<int, Tag_SwNodeOffset>) at engine/sw/source/core/docnode/nodes.cxx:1417:17
>  #13 in SwDoc::~SwDoc() at engine/sw/source/core/doc/docnew.cxx:514:15
>  #14 in SwDoc::release() at engine/sw/source/core/doc/doc.cxx:137:9
>  #15 in rtl::Reference<SwDoc>::clear() at engine/include/rtl/ref.hxx:181:19
>  #16 in SwDocShell::RemoveLink() at engine/sw/source/uibase/app/docshini.cxx:451:16
>  #17 in SwDocShell::~SwDocShell() at engine/sw/source/uibase/app/docshini.cxx:379:5
>  #18 in SwDocShell::~SwDocShell() at engine/sw/source/uibase/app/docshini.cxx:369:1
>  #19 in cppu::OWeakObject::release() at engine/cppuhelper/source/weak.cxx:230:9
>  #20 in rtl::Reference<SfxObjectShell>::~Reference() at engine/include/rtl/ref.hxx:116:22
>  #21 in IMPL_SfxBaseModel_DataContainer::~IMPL_SfxBaseModel_DataContainer() at engine/sfx2/source/doc/sfxbasemodel.cxx:267:5
>  #22 in void std::destroy_at<IMPL_SfxBaseModel_DataContainer>(IMPL_SfxBaseModel_DataContainer*) at /home/sberg/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/stl_construct.h:88:15
>  #23 in void std::_Destroy<IMPL_SfxBaseModel_DataContainer>(IMPL_SfxBaseModel_DataContainer*) at /home/sberg/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/stl_construct.h:164:7
>  #24 in void std::allocator_traits<std::allocator<void>>::destroy<IMPL_SfxBaseModel_DataContainer>(std::allocator<void>&, IMPL_SfxBaseModel_DataContainer*) at /home/sberg/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/alloc_traits.h:863:4
>  #25 in std::_Sp_counted_ptr_inplace<IMPL_SfxBaseModel_DataContainer, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() at /home/sberg/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/shared_ptr_base.h:650:2
>  #26 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() at /home/sberg/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/shared_ptr_base.h:423:8
>  #27 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() at /home/sberg/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/shared_ptr_base.h:1100:11
>  #28 in std::__shared_ptr<IMPL_SfxBaseModel_DataContainer, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() at /home/sberg/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/shared_ptr_base.h:1574:31
>  #29 in std::__shared_ptr<IMPL_SfxBaseModel_DataContainer, (__gnu_cxx::_Lock_policy)2>::reset() at /home/sberg/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/shared_ptr_base.h:1692:9
>  #30 in SfxBaseModel::dispose() at engine/sfx2/source/doc/sfxbasemodel.cxx:801:13
>  #31 in SwXTextDocument::dispose() at engine/sw/source/uibase/uno/unotxdoc.cxx:581:19
>  #32 in SfxBaseModel::close(unsigned char) at engine/sfx2/source/doc/sfxbasemodel.cxx:1543:5
>  #33 in SwXTextDocument::close(unsigned char) at engine/sw/source/uibase/uno/unotxdoc.cxx:594:19
>  #34 in SfxBaseModel::dispose() at engine/sfx2/source/doc/sfxbasemodel.cxx:752:13
>  #35 in SwXTextDocument::dispose() at engine/sw/source/uibase/uno/unotxdoc.cxx:581:19
>  #36 in UnoApiTest::tearDown() at engine/test/source/unoapi_test.cxx:66:22
>  #37 in SwTiledRenderingTest::tearDown() at engine/sw/qa/unit/swtiledrenderingtest.cxx:63:22
>
> 0x7cc203206790 is located 144 bytes inside of 200-byte region [0x7cc203206700,0x7cc2032067c8)
> freed by thread T0 here:
>  #0 in operator delete(void*, unsigned long) at /home/sberg/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:187:3
>  #1 in (anonymous namespace)::SwHostFillBitmapLink<SwContentNode>::~SwHostFillBitmapLink() at engine/sw/source/core/doc/FillBitmapLinkTracker.cxx:54:7
>  #2 in SvRefBase::ReleaseRef() at engine/include/tools/ref.hxx:161:29
>  #3 in tools::SvRef<sfx2::SvBaseLink>::~SvRef() at engine/include/tools/ref.hxx:57:36
>  #4 in (anonymous namespace)::SwHostFillBitmapLink<SwContentNode>::Notify(SfxHint const&) at engine/sw/source/core/doc/FillBitmapLinkTracker.cxx:95:5
>  #5 in SvtBroadcaster::Broadcast(SfxHint const&) at engine/svl/source/notify/broadcast.cxx:220:25
>  #6 in SvtBroadcaster::~SvtBroadcaster() at engine/svl/source/notify/broadcast.cxx:188:5

SwHostFillBitmapLink is both an sfx2::SvBaseLink (held by the tracker map and
the LinkManager) and an SvtListener on its host node's broadcaster.  On the
host's SfxHintId::Dying it asked the tracker to drop it, which erased the map
entry and released its last reference, so the link freed itself while still in
the broadcaster's listener list.  SvtBroadcaster::~SvtBroadcaster then ran its
BroadcasterDying pass over that list and called into the freed link.

So park a removed link's reference in m_aPendingRelease and free it on a later
call, once the host's Dying broadcast that removed it is over, so the link
outlives the broadcaster's destructor.  (Fixing it in SvtBroadcaster instead,
recording a self-removing listener in maDestructedListeners under mbDisposing so
the destructor's pass skips it, would be exactly the tarpit that the sequence
4a29088858 "SvtBroadcaster unify the normal and
PrepareForDestruction paths", a20ec3b5cd "fix
iterator invalidation assert", and 97dac306e6 "try
to fix SvtBroadcaster on macOS" ("no idea what is going on") already gave up on
earlier.)

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I69b11e1a526b61416d7737add3619fbaf621e1a4
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4153
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit a177d8506dccf2d008bcf5979f33a38cecb79e72)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208583
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-25 01:48:59 +02:00
Stephan Bergmann 0a654a90d2 external/harfbuzz: Silence new Clang 24 trunk -Werror,-Wunused-template
> In file included from ../src/hb-number.cc:26:
> In file included from ../src/hb.hh:560:
> ../src/hb-meta.hh:131:3: error: unused function template 'operator()' [-Werror,-Wunused-template]
>   131 |   operator () (T&& v) const HB_AUTO_RETURN (std::forward<T> (v))
>       |   ^~~~~~~~

etc.

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I69284c010e4970db55ecb6e1507186648b8b5271
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/7282
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 6b03159992ce09f1b63a799ca99476c048758054)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208278
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-21 00:09:33 +02:00
Stephan Bergmann 727d62727e Fix --with-latest-c++ build against libstdc++ 16
(e.g., libstdc++-devel-16.1.1-2.fc44.x86_64) after
f320d95d89ecc9bea81182795969f83b05ec903c "Avoid deprecated
std::filesystem::path::string",

> In file included from engine/codemaker/source/netmaker/netproduce.cxx:19:
> engine/codemaker/source/netmaker/csharpfile.hxx: In member function ‘std::string CSharpFile::getPath() const’:
> engine/codemaker/source/netmaker/csharpfile.hxx:31:27: error: ‘const class std::filesystem::__cxx11::path’ has no member named ‘display_string’
>    31 |         return m_filePath.display_string();
>       |                           ^~~~~~~~~~~~~~

etc.

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: Ib51f9e0d0e1f902726f0d68a11fe28110388ef6a
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/6554
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit 63e9ab3b87cc5a793c8733e375dc86d99419a88d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208277
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-21 00:09:20 +02:00
Stephan Bergmann 67bf3bc2cc Drop the long-dead SCP2_URE_DL name-construction macros
Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I30c4e7c00a14da9a1ffce0b257a1686ac8ebe79a
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4072
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 43c99b68075a4f71d12fde826debd24ad5e61c60)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208013
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-07-13 12:28:20 +02:00
Stephan Bergmann 1df02d7afa Fix heap-buffer-overflow in formula::FormulaTokenArray::Add
ScTokenArray::Clone and CloneValue have always allocated the parse-token array
pCode to hold exactly nLen entries, but unlike Assign they left mbFinalized at
false.  And FormulaTokenArray::Add assumes that a non-finalized pCode has room
for at least MAX_FAST_TOKENS entries.  Which now started to break with
a21f6a3a0eae72fef90576d249d96dc00beeb2c5 "sc: round-trip dynamic-array masters
and @ through ODF",

> ==611420==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7befc900e420 at pc 0x7b8f762c6d53 bp 0x7ffdf0776f90 sp 0x7ffdf0776f88
> WRITE of size 8 at 0x7befc900e420 thread T0
>  #0 in formula::FormulaTokenArray::Add(formula::FormulaToken*) at engine/formula/source/core/api/token.cxx:772:25
>  #1 in ScTokenArray::AddRawToken(ScRawToken const&) at engine/sc/source/core/tool/token.cxx:2004:12
>  #2 in ScTokenArray::AddOpCode(OpCode) at engine/sc/source/core/tool/token.cxx:2224:12
>  #3 in (anonymous namespace)::prependImplicitIntersection(ScTokenArray&) at engine/sc/source/core/data/formulacell.cxx:1654:49
>  #4 in ScFormulaCell::ResolveImplicitIntersection(ScTokenArray&, ScDocument&, ScAddress const&) at engine/sc/source/core/data/formulacell.cxx:2716:9
>  #5 in ImportExcel::Formula(XclAddress const&, unsigned short, unsigned short, double, bool) at engine/sc/source/filter/excel/excform.cxx:127:17
>  #6 in ImportExcel::Formula25() at engine/sc/source/filter/excel/excform.cxx:72:5
>  #7 in ImportExcel8::Read() at engine/sc/source/filter/excel/read.cxx:1184:49
>  #8 in ScFormatFilterPluginImpl::ScImportExcel(SfxMedium&, ScDocument*, EXCIMPFORMAT) at engine/sc/source/filter/excel/excel.cxx:255:35
>  #9 in ScDocShell::ConvertFrom(SfxMedium&) at engine/sc/source/ui/docshell/docsh.cxx:1329:52
>  #10 in SfxObjectShell::DoLoad(SfxMedium*) at engine/sfx2/source/doc/objstor.cxx:777:27
>  #11 in ScFilterTestBase::loadDoc(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, int) at engine/sc/qa/unit/helper/scfiltertestbase.cxx:40:21
>  #12 in ScFiltersTest::load(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) at engine/sc/qa/unit/filters-test.cxx:68:31
>  #13 in non-virtual thunk to ScFiltersTest::load(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) at engine/sc/qa/unit/filters-test.cxx
>  #14 in test::FiltersTest::recursiveScan(test::filterStatus, rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) at engine/unotest/source/cpp/filters-test.cxx:132:20
>  #15 in test::FiltersTest::testDir(rtl::OUString const&, std::basic_string_view<char16_t, std::char_traits<char16_t>>, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) at engine/unotest/source/cpp/filters-test.cxx:157:5
>  #16 in ScFiltersTest::testCVEs() at engine/sc/qa/unit/filters-test.cxx:91:5
>
> 0x7befc900e420 is located 0 bytes after 64-byte region [0x7befc900e3e0,0x7befc900e420)
> allocated by thread T0 here:
>  #0 in operator new[](unsigned long) at /home/sberg/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:111:37
>  #1 in ScTokenArray::Clone() const at engine/sc/source/core/tool/token.cxx:1901:24
>  #2 in ImportExcel::Formula(XclAddress const&, unsigned short, unsigned short, double, bool) at engine/sc/source/filter/excel/excform.cxx:126:70
>  #3 in ImportExcel::Formula25() at engine/sc/source/filter/excel/excform.cxx:72:5

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I2ce67e89c24fee8e1bdfa7baf40ce02783637254
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4962
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit e4161389322e3f096e3b1537058a94e0636eaeaa)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207469
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-07-08 18:00:08 +02:00
Stephan Bergmann d862077a2e external/afdko: Fix some errors
...hitting at least with recent Clang 23 trunk and --with-latest-c++,

> engine/workdir/UnpackedTarball/afdko/c/shared/absfont/absfont_dump.cpp:555:19: error: invalid comparison of floating-point type 'float' with enumeration type '(unnamed enum at
engine/workdir/UnpackedTarball/afdko/c/shared/include/absfont.h:541:1)'
>   555 |         if (width == ABF_EDGE_HINT_LO) {
>       |             ~~~~~ ^  ~~~~~~~~~~~~~~~~

etc. and

> .../include/c++/17.0.0/bits/unique_ptr.h:90:16: error: invalid application of 'sizeof' to an incomplete type 'VarModel'
>    90 |         static_assert(sizeof(_Tp)>0,
>       |                       ^~~~~~~~~~~
> [...]
> engine/workdir/UnpackedTarball/afdko/c/shared/include/varsupport.h:466:5: note: in defaulted default constructor for 'std::vector<std::unique_ptr<VarModel>>' first required here
>   466 |     itemVariationStore() {}
>       |     ^
> engine/workdir/UnpackedTarball/afdko/c/shared/include/varsupport.h:424:7: note: forward declaration of 'VarModel'
>   424 | class VarModel;

presumably new with 6c40019917bd6e88f6b54d0a2d53d64729c64166 "afdko:
upgrade to 5.0.1"

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I7f7de8233fcd9a2447d0080af3ff14b0bdf69a10
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4879
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 7bc7ade726e4d50c1589247123e8104783a5e604)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207287
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-26 11:17:07 +02:00
Stephan Bergmann a3a4e2b88b external/afdko: Fix references to temporaries
> engine/workdir/UnpackedTarball/afdko/c/addfeatures/hotconv/FeatCtx.cpp: In member function ‘const GPat::ClassRec& FeatCtx::lookupGlyphClass(const std::string&)’:
> engine/workdir/UnpackedTarball/afdko/c/addfeatures/hotconv/FeatCtx.cpp:494:22: error: returning reference to temporary [-Wreturn-local-addr]
>   494 |         return GPat::ClassRec {};
>       |                      ^~~~~~~~~~~

and

> engine/workdir/UnpackedTarball/afdko/c/addfeatures/hotconv/GPOS.cpp: In member function ‘GPat::ClassRec& GPOS::getCR(uint32_t, int)’:
> engine/workdir/UnpackedTarball/afdko/c/addfeatures/hotconv/GPOS.cpp:1002:12: error: cannot bind non-const lvalue reference of type ‘GPat::ClassRec&’ to an rvalue of type ‘GPat::ClassRec’
>  1002 |     return cr;
>       |            ^~

presumably new with 6c40019917bd6e88f6b54d0a2d53d64729c64166 "afdko:
upgrade to
5.0.1"

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: Id8d7f8c924fd270631b6d9a0c97f39a4f8826c74
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4837
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 95050b2a21d0625d97024cc041bd3dd9837ca190)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207286
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-26 11:16:57 +02:00
Stephan Bergmann a3550ef87f Add support for C++29 to --with-latest-c++
...now that at least GCC 17 trunk supports it since
<https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=0c5c6249a2e9a75d2e7d1c6c434487c8dc077130>
"c++, libcpp: Add -std=c++2[9d] and -std=gnu++2[9d] options".  (But we need two
TODOs until Clang and Meson support it, too.)

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: Idff90c0a9068072cdc60c1cf88998bbb39ef54b4
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4973
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit a015d0798cf846d10b712ac80451ba9678ff61d8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207166
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-23 14:58:50 +02:00
Stephan Bergmann da446e66eb Pass --enable-debug into external/cppunittest
Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I531f4e7cdb461dd40be0d06e88ffa9c677820446
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4813
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit d44f929cb922ca9e2e6c2503429ca4587255a325)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207170
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-23 13:44:17 +02:00
Stephan Bergmann 6c22a1050e This bogus -Warray-bounds still hits with GCC 17
Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I986acdaee26da6b684afc51955ab658a0674d309
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4853
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit 78330ecdc4f447a47cde4afe64e55dfab061ef27)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207169
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-23 12:27:24 +02:00
Stephan Bergmann 60fdd8f4f8 Silence some more spurious -Werror=array-bounds=
seen at least with GCC 16 trunk and --enable-optimized,

> In file included from /usr/include/c++/16/bits/char_traits.h:59,
>                  from /usr/include/c++/16/ios:44,
>                  from /usr/include/c++/16/bits/ostream.h:43,
>                  from /usr/include/c++/16/ostream:42,
>                  from engine/include/rtl/ustring.hxx:30,
>                  from engine/include/vcl/ctrl.hxx:23,
>                  from engine/include/vcl/InterimItemWindow.hxx:13,
>                  from engine/include/svtools/scrolladaptor.hxx:24,
>                  from engine/dbaccess/source/ui/inc/JoinTableView.hxx:21,
>                  from engine/dbaccess/source/ui/inc/QueryTableView.hxx:21,
>                  from engine/dbaccess/source/ui/querydesign/QueryTableView.cxx:20:
> In function ‘constexpr void std::destroy_at(_Tp*) [with _Tp = dbaui::OQueryTableWindowData]’,
>     inlined from ‘constexpr void std::_Destroy(_Tp*) [with _Tp = dbaui::OQueryTableWindowData]’ at /usr/include/c++/16/bits/stl_construct.h:164:22,
>     inlined from ‘static constexpr void std::allocator_traits<std::allocator<void> >::destroy(allocator_type&, _Up*) [with _Up = dbaui::OQueryTableWindowData]’ at /usr/include/c++/16/bits/alloc_traits.h:859:17,
>     inlined from ‘void std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_dispose() [with _Tp = dbaui::OQueryTableWindowData; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:682:35,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:423:18,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:392:5,
>     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1136:21,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = dbaui::OQueryTableConnectionData; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1610:7,
>     inlined from ‘std::shared_ptr<dbaui::OQueryTableConnectionData>::~shared_ptr()’ at /usr/include/c++/16/bits/shared_ptr.h:175:11,
>     inlined from ‘void {anonymous}::addConnections(dbaui::OQueryTableView*, const dbaui::OQueryTableWindow&, const dbaui::OQueryTableWindow&, const com::sun::star::uno::Reference<com::sun::star::container::XNameAccess>&)’ at engine/dbaccess/source/ui/querydesign/QueryTableView.cxx:174:5:
> /usr/include/c++/16/bits/stl_construct.h:88:25: error: array subscript ‘dbaui::OQueryTableWindowData[0]’ is partly outside array bounds of ‘unsigned char [104]’ [-Werror=array-bounds=]
>    88 |         __location->~_Tp();
>       |         ~~~~~~~~~~~~~~~~^~
> In file included from /usr/include/c++/16/x86_64-redhat-linux/bits/c++allocator.h:33,
>                  from /usr/include/c++/16/bits/allocator.h:46,
>                  from /usr/include/c++/16/string:46,
>                  from /usr/include/c++/16/bits/locale_classes.h:43,
>                  from /usr/include/c++/16/bits/ios_base.h:43,
>                  from /usr/include/c++/16/ios:46:
> In member function ‘constexpr _Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_ptr_inplace<dbaui::OQueryTableConnectionData, std::allocator<void>, __gnu_cxx::_S_atomic>]’,
>     inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = std::_Sp_counted_ptr_inplace<dbaui::OQueryTableConnectionData, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at /usr/include/c++/16/bits/allocator.h:206:40,
>     inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_ptr_inplace<dbaui::OQueryTableConnectionData, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at /usr/include/c++/16/bits/alloc_traits.h:638:28,
>     inlined from ‘std::__allocated_ptr<_Alloc> std::__allocate_guarded(_Alloc&) [with _Alloc = allocator<_Sp_counted_ptr_inplace<dbaui::OQueryTableConnectionData, allocator<void>, __gnu_cxx::_S_atomic> >]’ at /usr/include/c++/16/bits/allocated_ptr.h:103:69,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = dbaui::OQueryTableConnectionData; _Alloc = std::allocator<void>; _Args = {const std::shared_ptr<dbaui::OTableWindowData>&, const std::shared_ptr<dbaui::OTableWindowData>&}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1034:9,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {const std::shared_ptr<dbaui::OTableWindowData>&, const std::shared_ptr<dbaui::OTableWindowData>&}; _Tp = dbaui::OQueryTableConnectionData; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1812:14,
>     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {const std::shared_ptr<dbaui::OTableWindowData>&, const std::shared_ptr<dbaui::OTableWindowData>&}; _Tp = dbaui::OQueryTableConnectionData]’ at /usr/include/c++/16/bits/shared_ptr.h:463:59,
>     inlined from ‘std::shared_ptr<std::_NonArray<_Tp> > std::make_shared(_Args&& ...) [with _Tp = dbaui::OQueryTableConnectionData; _Args = {const shared_ptr<dbaui::OTableWindowData>&, const shared_ptr<dbaui::OTableWindowData>&}]’ at /usr/include/c++/16/bits/shared_ptr.h:1066:39,
>     inlined from ‘void {anonymous}::addConnections(dbaui::OQueryTableView*, const dbaui::OQueryTableWindow&, const dbaui::OQueryTableWindow&, const com::sun::star::uno::Reference<com::sun::star::container::XNameAccess>&)’ at engine/dbaccess/source/ui/querydesign/QueryTableView.cxx:127:111:
> /usr/include/c++/16/bits/new_allocator.h:162:75: note: at offset 16 into object of size 104 allocated by ‘operator new’
>   162 |           return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
>       |                                                                           ^
> In function ‘constexpr void std::destroy_at(_Tp*) [with _Tp = dbaui::OQueryTableWindowData]’,
>     inlined from ‘constexpr void std::_Destroy(_Tp*) [with _Tp = dbaui::OQueryTableWindowData]’ at /usr/include/c++/16/bits/stl_construct.h:164:22,
>     inlined from ‘static constexpr void std::allocator_traits<std::allocator<void> >::destroy(allocator_type&, _Up*) [with _Up = dbaui::OQueryTableWindowData]’ at /usr/include/c++/16/bits/alloc_traits.h:859:17,
>     inlined from ‘void std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_dispose() [with _Tp = dbaui::OQueryTableWindowData; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:682:35,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:423:18,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:392:5,
>     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1136:21,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = dbaui::OQueryTableConnectionData; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1610:7,
>     inlined from ‘std::shared_ptr<dbaui::OQueryTableConnectionData>::~shared_ptr()’ at /usr/include/c++/16/bits/shared_ptr.h:175:11,
>     inlined from ‘virtual void dbaui::OQueryTableView::AddConnection(const dbaui::OJoinExchangeData&, const dbaui::OJoinExchangeData&)’ at engine/dbaccess/source/ui/querydesign/QueryTableView.cxx:558:5:
> /usr/include/c++/16/bits/stl_construct.h:88:25: error: array subscript ‘dbaui::OQueryTableWindowData[0]’ is partly outside array bounds of ‘unsigned char [104]’ [-Werror=array-bounds=]
>    88 |         __location->~_Tp();
>       |         ~~~~~~~~~~~~~~~~^~
> In member function ‘constexpr _Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_ptr_inplace<dbaui::OQueryTableConnectionData, std::allocator<void>, __gnu_cxx::_S_atomic>]’,
>     inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = std::_Sp_counted_ptr_inplace<dbaui::OQueryTableConnectionData, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at /usr/include/c++/16/bits/allocator.h:206:40,
>     inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_ptr_inplace<dbaui::OQueryTableConnectionData, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at /usr/include/c++/16/bits/alloc_traits.h:638:28,
>     inlined from ‘std::__allocated_ptr<_Alloc> std::__allocate_guarded(_Alloc&) [with _Alloc = allocator<_Sp_counted_ptr_inplace<dbaui::OQueryTableConnectionData, allocator<void>, __gnu_cxx::_S_atomic> >]’ at /usr/include/c++/16/bits/allocated_ptr.h:103:69,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = dbaui::OQueryTableConnectionData; _Alloc = std::allocator<void>; _Args = {const std::shared_ptr<dbaui::OTableWindowData>&, const std::shared_ptr<dbaui::OTableWindowData>&}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1034:9,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {const std::shared_ptr<dbaui::OTableWindowData>&, const std::shared_ptr<dbaui::OTableWindowData>&}; _Tp = dbaui::OQueryTableConnectionData; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1812:14,
>     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {const std::shared_ptr<dbaui::OTableWindowData>&, const std::shared_ptr<dbaui::OTableWindowData>&}; _Tp = dbaui::OQueryTableConnectionData]’ at /usr/include/c++/16/bits/shared_ptr.h:463:59,
>     inlined from ‘std::shared_ptr<std::_NonArray<_Tp> > std::make_shared(_Args&& ...) [with _Tp = dbaui::OQueryTableConnectionData; _Args = {const shared_ptr<dbaui::OTableWindowData>&, const shared_ptr<dbaui::OTableWindowData>&}]’ at /usr/include/c++/16/bits/shared_ptr.h:1066:39,
>     inlined from ‘virtual void dbaui::OQueryTableView::AddConnection(const dbaui::OJoinExchangeData&, const dbaui::OJoinExchangeData&)’ at engine/dbaccess/source/ui/querydesign/QueryTableView.cxx:539:121:
> /usr/include/c++/16/bits/new_allocator.h:162:75: note: at offset 16 into object of size 104 allocated by ‘operator new’
>   162 |           return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
>       |                                                                           ^

> In file included from /usr/include/c++/16/bits/stl_tempbuf.h:61,
>                  from /usr/include/c++/16/memory:68,
>                  from engine/include/dbaccess/dataview.hxx:22,
>                  from engine/reportdesign/source/ui/inc/DesignView.hxx:22,
>                  from engine/reportdesign/source/ui/inc/ReportController.hxx:22,
>                  from engine/reportdesign/source/ui/report/ReportController.cxx:20:
> In function ‘constexpr void std::destroy_at(_Tp*) [with _Tp = rptui::OGroupsSortingDialog]’,
>     inlined from ‘constexpr void std::_Destroy(_Tp*) [with _Tp = rptui::OGroupsSortingDialog]’ at /usr/include/c++/16/bits/stl_construct.h:164:22,
>     inlined from ‘static constexpr void std::allocator_traits<std::allocator<void> >::destroy(allocator_type&, _Up*) [with _Up = rptui::OGroupsSortingDialog]’ at /usr/include/c++/16/bits/alloc_traits.h:859:17,
>     inlined from ‘void std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_dispose() [with _Tp = rptui::OGroupsSortingDialog; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:682:35,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:423:18,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:392:5,
>     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1136:21,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = rptui::AnyConverter; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1610:7,
>     inlined from ‘std::shared_ptr<rptui::AnyConverter>::~shared_ptr()’ at /usr/include/c++/16/bits/shared_ptr.h:175:11,
>     inlined from ‘const com::sun::star::uno::Reference<com::sun::star::sdbc::XRowSet>& rptui::OReportController::getRowSet()’ at engine/reportdesign/source/ui/report/ReportController.cxx:2983:5:
> /usr/include/c++/16/bits/stl_construct.h:88:25: error: array subscript ‘rptui::OGroupsSortingDialog[0]’ is partly outside array bounds of ‘unsigned char [24]’ [-Werror=array-bounds=]
>    88 |         __location->~_Tp();
>       |         ~~~~~~~~~~~~~~~~^~
> In file included from /usr/include/c++/16/x86_64-redhat-linux/bits/c++allocator.h:33,
>                  from /usr/include/c++/16/bits/allocator.h:46,
>                  from /usr/include/c++/16/memory:67:
> In member function ‘constexpr _Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_ptr_inplace<rptui::AnyConverter, std::allocator<void>, __gnu_cxx::_S_atomic>]’,
>     inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = std::_Sp_counted_ptr_inplace<rptui::AnyConverter, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at /usr/include/c++/16/bits/allocator.h:206:40,
>     inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_Up> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_ptr_inplace<rptui::AnyConverter, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at /usr/include/c++/16/bits/alloc_traits.h:638:28,
>     inlined from ‘std::__allocated_ptr<_Alloc> std::__allocate_guarded(_Alloc&) [with _Alloc = allocator<_Sp_counted_ptr_inplace<rptui::AnyConverter, allocator<void>, __gnu_cxx::_S_atomic> >]’ at /usr/include/c++/16/bits/allocated_ptr.h:103:69,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = rptui::AnyConverter; _Alloc = std::allocator<void>; _Args = {}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1034:9,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {}; _Tp = rptui::AnyConverter; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1812:14,
>     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {}; _Tp = rptui::AnyConverter]’ at /usr/include/c++/16/bits/shared_ptr.h:463:59,
>     inlined from ‘std::shared_ptr<std::_NonArray<_Tp> > std::make_shared(_Args&& ...) [with _Tp = rptui::AnyConverter; _Args = {}]’ at /usr/include/c++/16/bits/shared_ptr.h:1066:39,
>     inlined from ‘const com::sun::star::uno::Reference<com::sun::star::sdbc::XRowSet>& rptui::OReportController::getRowSet()’ at engine/reportdesign/source/ui/report/ReportController.cxx:2974:60:
> /usr/include/c++/16/bits/new_allocator.h:162:75: note: at offset 16 into object of size 24 allocated by ‘operator new’
>   162 |           return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
>       |                                                                           ^

> In file included from /usr/include/c++/16/bits/unordered_map.h:33,
>                  from /usr/include/c++/16/unordered_map:43,
>                  from /usr/include/c++/16/functional:80,
>                  from engine/include/rtl/ref.hxx:27,
>                  from engine/include/vcl/vclptr.hxx:26,
>                  from engine/sc/inc/document.hxx:25,
>                  from engine/sc/source/core/data/document10.cxx:11:
> In destructor ‘std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>::~_Hashtable() [with _Key = short int; _Value = std::pair<const short int, std::unordered_map<short int, sc::ColumnBlockPosition> >; _Alloc = std::allocator<std::pair<const short int, std::unordered_map<short int, sc::ColumnBlockPosition> > >; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<short int>; _Hash = std::hash<short int>; _RangeHash = std::__detail::_Mod_range_hashing; _Unused = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; _Traits = std::__detail::_Hashtable_traits<false, false, true>]’,
>     inlined from ‘std::unordered_map<short int, std::unordered_map<short int, sc::ColumnBlockPosition> >::~unordered_map()’ at /usr/include/c++/16/bits/unordered_map.h:112:11,
>     inlined from ‘sc::ColumnBlockPositionSet::~ColumnBlockPositionSet()’ at engine/sc/inc/mtvelements.hxx:179:7,
>     inlined from ‘constexpr void std::destroy_at(_Tp*) [with _Tp = sc::ColumnBlockPositionSet]’ at /usr/include/c++/16/bits/stl_construct.h:88:18,
>     inlined from ‘constexpr void std::_Destroy(_Tp*) [with _Tp = sc::ColumnBlockPositionSet]’ at /usr/include/c++/16/bits/stl_construct.h:164:22,
>     inlined from ‘static constexpr void std::allocator_traits<std::allocator<void> >::destroy(allocator_type&, _Up*) [with _Up = sc::ColumnBlockPositionSet]’ at /usr/include/c++/16/bits/alloc_traits.h:859:17,
>     inlined from ‘void std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_dispose() [with _Tp = sc::ColumnBlockPositionSet; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:682:35,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:423:18,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:392:5,
>     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1136:21,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = sc::StartListeningContext; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1610:7,
>     inlined from ‘std::shared_ptr<sc::StartListeningContext>::~shared_ptr()’ at /usr/include/c++/16/bits/shared_ptr.h:175:11,
>     inlined from ‘{anonymous}::StartNeededListenersHandler::~StartNeededListenersHandler()’ at engine/sc/source/core/data/document10.cxx:552:7,
>     inlined from ‘void ScDocument::StartNeededListeners()’ at engine/sc/source/core/data/document10.cxx:574:18:
> /usr/include/c++/16/bits/hashtable.h:1904:5: error: array subscript ‘std::_Hashtable<short int, std::pair<const short int, std::unordered_map<short int, sc::ColumnBlockPosition> >, std::allocator<std::pair<const short int, std::unordered_map<short int, sc::ColumnBlockPosition> > >, std::__detail::_Select1st, std::equal_to<short int>, std::hash<short int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >[0]’ is partly outside array bounds of ‘unsigned char [56]’ [-Werror=array-bounds=]
>  1904 |     }
>       |     ^
> In file included from /usr/include/c++/16/x86_64-redhat-linux/bits/c++allocator.h:33,
>                  from /usr/include/c++/16/bits/allocator.h:46,
>                  from /usr/include/c++/16/memory:67,
>                  from engine/sc/source/core/data/document10.cxx:10:
> In member function ‘constexpr _Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_ptr_inplace<sc::StartListeningContext, std::allocator<void>, __gnu_cxx::_S_atomic>]’,
>     inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = std::_Sp_counted_ptr_inplace<sc::StartListeningContext, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at /usr/include/c++/16/bits/allocator.h:206:40,
>     inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_Up> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_ptr_inplace<sc::StartListeningContext, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at /usr/include/c++/16/bits/alloc_traits.h:638:28,
>     inlined from ‘std::__allocated_ptr<_Alloc> std::__allocate_guarded(_Alloc&) [with _Alloc = allocator<_Sp_counted_ptr_inplace<sc::StartListeningContext, allocator<void>, __gnu_cxx::_S_atomic> >]’ at /usr/include/c++/16/bits/allocated_ptr.h:103:69,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = sc::StartListeningContext; _Alloc = std::allocator<void>; _Args = {ScDocument&}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1034:9,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {ScDocument&}; _Tp = sc::StartListeningContext; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1812:14,
>     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {ScDocument&}; _Tp = sc::StartListeningContext]’ at /usr/include/c++/16/bits/shared_ptr.h:463:59,
>     inlined from ‘std::shared_ptr<std::_NonArray<_Tp> > std::make_shared(_Args&& ...) [with _Tp = sc::StartListeningContext; _Args = {ScDocument&}]’ at /usr/include/c++/16/bits/shared_ptr.h:1066:39,
>     inlined from ‘{anonymous}::StartNeededListenersHandler::StartNeededListenersHandler(ScDocument&)’ at engine/sc/source/core/data/document10.cxx:556:64,
>     inlined from ‘void ScDocument::StartNeededListeners()’ at engine/sc/source/core/data/document10.cxx:574:82:
> /usr/include/c++/16/bits/new_allocator.h:162:75: note: at offset 24 into object of size 56 allocated by ‘operator new’
>   162 |           return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
>       |                                                                           ^
> In file included from engine/sc/inc/column.hxx:28,
>                  from engine/sc/inc/table.hxx:25,
>                  from engine/sc/source/core/data/document10.cxx:14:
> In destructor ‘sc::ColumnBlockPositionSet::~ColumnBlockPositionSet()’,
>     inlined from ‘constexpr void std::destroy_at(_Tp*) [with _Tp = sc::ColumnBlockPositionSet]’ at /usr/include/c++/16/bits/stl_construct.h:88:18,
>     inlined from ‘constexpr void std::_Destroy(_Tp*) [with _Tp = sc::ColumnBlockPositionSet]’ at /usr/include/c++/16/bits/stl_construct.h:164:22,
>     inlined from ‘static constexpr void std::allocator_traits<std::allocator<void> >::destroy(allocator_type&, _Up*) [with _Up = sc::ColumnBlockPositionSet]’ at /usr/include/c++/16/bits/alloc_traits.h:859:17,
>     inlined from ‘void std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_dispose() [with _Tp = sc::ColumnBlockPositionSet; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:682:35,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:423:18,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:392:5,
>     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1136:21,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = sc::StartListeningContext; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1610:7,
>     inlined from ‘std::shared_ptr<sc::StartListeningContext>::~shared_ptr()’ at /usr/include/c++/16/bits/shared_ptr.h:175:11,
>     inlined from ‘{anonymous}::StartNeededListenersHandler::~StartNeededListenersHandler()’ at engine/sc/source/core/data/document10.cxx:552:7,
>     inlined from ‘void ScDocument::StartNeededListeners()’ at engine/sc/source/core/data/document10.cxx:574:18:
> engine/sc/inc/mtvelements.hxx:179:7: error: array subscript ‘sc::ColumnBlockPositionSet[0]’ is partly outside array bounds of ‘unsigned char [56]’ [-Werror=array-bounds=]
>   179 | class ColumnBlockPositionSet
>       |       ^~~~~~~~~~~~~~~~~~~~~~
> In member function ‘constexpr _Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_ptr_inplace<sc::StartListeningContext, std::allocator<void>, __gnu_cxx::_S_atomic>]’,
>     inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = std::_Sp_counted_ptr_inplace<sc::StartListeningContext, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at /usr/include/c++/16/bits/allocator.h:206:40,
>     inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_Up> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_ptr_inplace<sc::StartListeningContext, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at /usr/include/c++/16/bits/alloc_traits.h:638:28,
>     inlined from ‘std::__allocated_ptr<_Alloc> std::__allocate_guarded(_Alloc&) [with _Alloc = allocator<_Sp_counted_ptr_inplace<sc::StartListeningContext, allocator<void>, __gnu_cxx::_S_atomic> >]’ at /usr/include/c++/16/bits/allocated_ptr.h:103:69,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = sc::StartListeningContext; _Alloc = std::allocator<void>; _Args = {ScDocument&}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1034:9,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {ScDocument&}; _Tp = sc::StartListeningContext; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1812:14,
>     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {ScDocument&}; _Tp = sc::StartListeningContext]’ at /usr/include/c++/16/bits/shared_ptr.h:463:59,
>     inlined from ‘std::shared_ptr<std::_NonArray<_Tp> > std::make_shared(_Args&& ...) [with _Tp = sc::StartListeningContext; _Args = {ScDocument&}]’ at /usr/include/c++/16/bits/shared_ptr.h:1066:39,
>     inlined from ‘{anonymous}::StartNeededListenersHandler::StartNeededListenersHandler(ScDocument&)’ at engine/sc/source/core/data/document10.cxx:556:64,
>     inlined from ‘void ScDocument::StartNeededListeners()’ at engine/sc/source/core/data/document10.cxx:574:82:
> /usr/include/c++/16/bits/new_allocator.h:162:75: note: at offset 16 into object of size 56 allocated by ‘operator new’
>   162 |           return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
>       |                                                                           ^
> In destructor ‘std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>::~_Hashtable() [with _Key = short int; _Value = std::pair<const short int, std::unordered_map<short int, sc::ColumnBlockPosition> >; _Alloc = std::allocator<std::pair<const short int, std::unordered_map<short int, sc::ColumnBlockPosition> > >; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<short int>; _Hash = std::hash<short int>; _RangeHash = std::__detail::_Mod_range_hashing; _Unused = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; _Traits = std::__detail::_Hashtable_traits<false, false, true>]’,
>     inlined from ‘std::unordered_map<short int, std::unordered_map<short int, sc::ColumnBlockPosition> >::~unordered_map()’ at /usr/include/c++/16/bits/unordered_map.h:112:11,
>     inlined from ‘sc::ColumnBlockPositionSet::~ColumnBlockPositionSet()’ at engine/sc/inc/mtvelements.hxx:179:7,
>     inlined from ‘constexpr void std::destroy_at(_Tp*) [with _Tp = sc::ColumnBlockPositionSet]’ at /usr/include/c++/16/bits/stl_construct.h:88:18,
>     inlined from ‘constexpr void std::_Destroy(_Tp*) [with _Tp = sc::ColumnBlockPositionSet]’ at /usr/include/c++/16/bits/stl_construct.h:164:22,
>     inlined from ‘static constexpr void std::allocator_traits<std::allocator<void> >::destroy(allocator_type&, _Up*) [with _Up = sc::ColumnBlockPositionSet]’ at /usr/include/c++/16/bits/alloc_traits.h:859:17,
>     inlined from ‘void std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_dispose() [with _Tp = sc::ColumnBlockPositionSet; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:682:35,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:423:18,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:392:5,
>     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1136:21,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = sc::StartListeningContext; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1610:7,
>     inlined from ‘std::shared_ptr<sc::StartListeningContext>::~shared_ptr()’ at /usr/include/c++/16/bits/shared_ptr.h:175:11,
>     inlined from ‘{anonymous}::StartNeededListenersHandler::~StartNeededListenersHandler()’ at engine/sc/source/core/data/document10.cxx:552:7,
>     inlined from ‘void ScDocument::StartNeededListeners(const std::shared_ptr<const sc::ColumnSet>&)’ at engine/sc/source/core/data/document10.cxx:579:18:
> /usr/include/c++/16/bits/hashtable.h:1904:5: error: array subscript ‘std::_Hashtable<short int, std::pair<const short int, std::unordered_map<short int, sc::ColumnBlockPosition> >, std::allocator<std::pair<const short int, std::unordered_map<short int, sc::ColumnBlockPosition> > >, std::__detail::_Select1st, std::equal_to<short int>, std::hash<short int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >[0]’ is partly outside array bounds of ‘unsigned char [56]’ [-Werror=array-bounds=]
>  1904 |     }
>       |     ^
> In member function ‘constexpr _Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_ptr_inplace<sc::StartListeningContext, std::allocator<void>, __gnu_cxx::_S_atomic>]’,
>     inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = std::_Sp_counted_ptr_inplace<sc::StartListeningContext, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at /usr/include/c++/16/bits/allocator.h:206:40,
>     inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_Up> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_ptr_inplace<sc::StartListeningContext, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at /usr/include/c++/16/bits/alloc_traits.h:638:28,
>     inlined from ‘std::__allocated_ptr<_Alloc> std::__allocate_guarded(_Alloc&) [with _Alloc = allocator<_Sp_counted_ptr_inplace<sc::StartListeningContext, allocator<void>, __gnu_cxx::_S_atomic> >]’ at /usr/include/c++/16/bits/allocated_ptr.h:103:69,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = sc::StartListeningContext; _Alloc = std::allocator<void>; _Args = {ScDocument&}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1034:9,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {ScDocument&}; _Tp = sc::StartListeningContext; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1812:14,
>     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {ScDocument&}; _Tp = sc::StartListeningContext]’ at /usr/include/c++/16/bits/shared_ptr.h:463:59,
>     inlined from ‘std::shared_ptr<std::_NonArray<_Tp> > std::make_shared(_Args&& ...) [with _Tp = sc::StartListeningContext; _Args = {ScDocument&}]’ at /usr/include/c++/16/bits/shared_ptr.h:1066:39,
>     inlined from ‘{anonymous}::StartNeededListenersHandler::StartNeededListenersHandler(ScDocument&, const std::shared_ptr<const sc::ColumnSet>&)’ at engine/sc/source/core/data/document10.cxx:558:9,
>     inlined from ‘void ScDocument::StartNeededListeners(const std::shared_ptr<const sc::ColumnSet>&)’ at engine/sc/source/core/data/document10.cxx:579:92:
> /usr/include/c++/16/bits/new_allocator.h:162:75: note: at offset 24 into object of size 56 allocated by ‘operator new’
>   162 |           return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
>       |                                                                           ^
> In destructor ‘sc::ColumnBlockPositionSet::~ColumnBlockPositionSet()’,
>     inlined from ‘constexpr void std::destroy_at(_Tp*) [with _Tp = sc::ColumnBlockPositionSet]’ at /usr/include/c++/16/bits/stl_construct.h:88:18,
>     inlined from ‘constexpr void std::_Destroy(_Tp*) [with _Tp = sc::ColumnBlockPositionSet]’ at /usr/include/c++/16/bits/stl_construct.h:164:22,
>     inlined from ‘static constexpr void std::allocator_traits<std::allocator<void> >::destroy(allocator_type&, _Up*) [with _Up = sc::ColumnBlockPositionSet]’ at /usr/include/c++/16/bits/alloc_traits.h:859:17,
>     inlined from ‘void std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_dispose() [with _Tp = sc::ColumnBlockPositionSet; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:682:35,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:423:18,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:392:5,
>     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1136:21,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = sc::StartListeningContext; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1610:7,
>     inlined from ‘std::shared_ptr<sc::StartListeningContext>::~shared_ptr()’ at /usr/include/c++/16/bits/shared_ptr.h:175:11,
>     inlined from ‘{anonymous}::StartNeededListenersHandler::~StartNeededListenersHandler()’ at engine/sc/source/core/data/document10.cxx:552:7,
>     inlined from ‘void ScDocument::StartNeededListeners(const std::shared_ptr<const sc::ColumnSet>&)’ at engine/sc/source/core/data/document10.cxx:579:18:
> engine/sc/inc/mtvelements.hxx:179:7: error: array subscript ‘sc::ColumnBlockPositionSet[0]’ is partly outside array bounds of ‘unsigned char [56]’ [-Werror=array-bounds=]
>   179 | class ColumnBlockPositionSet
>       |       ^~~~~~~~~~~~~~~~~~~~~~
> In member function ‘constexpr _Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_ptr_inplace<sc::StartListeningContext, std::allocator<void>, __gnu_cxx::_S_atomic>]’,
>     inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = std::_Sp_counted_ptr_inplace<sc::StartListeningContext, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at /usr/include/c++/16/bits/allocator.h:206:40,
>     inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_Up> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_ptr_inplace<sc::StartListeningContext, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at /usr/include/c++/16/bits/alloc_traits.h:638:28,
>     inlined from ‘std::__allocated_ptr<_Alloc> std::__allocate_guarded(_Alloc&) [with _Alloc = allocator<_Sp_counted_ptr_inplace<sc::StartListeningContext, allocator<void>, __gnu_cxx::_S_atomic> >]’ at /usr/include/c++/16/bits/allocated_ptr.h:103:69,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = sc::StartListeningContext; _Alloc = std::allocator<void>; _Args = {ScDocument&}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1034:9,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {ScDocument&}; _Tp = sc::StartListeningContext; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1812:14,
>     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {ScDocument&}; _Tp = sc::StartListeningContext]’ at /usr/include/c++/16/bits/shared_ptr.h:463:59,
>     inlined from ‘std::shared_ptr<std::_NonArray<_Tp> > std::make_shared(_Args&& ...) [with _Tp = sc::StartListeningContext; _Args = {ScDocument&}]’ at /usr/include/c++/16/bits/shared_ptr.h:1066:39,
>     inlined from ‘{anonymous}::StartNeededListenersHandler::StartNeededListenersHandler(ScDocument&, const std::shared_ptr<const sc::ColumnSet>&)’ at engine/sc/source/core/data/document10.cxx:558:9,
>     inlined from ‘void ScDocument::StartNeededListeners(const std::shared_ptr<const sc::ColumnSet>&)’ at engine/sc/source/core/data/document10.cxx:579:92:
> /usr/include/c++/16/bits/new_allocator.h:162:75: note: at offset 16 into object of size 56 allocated by ‘operator new’
>   162 |           return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
>       |                                                                           ^

> In file included from engine/include/vcl/weld.hxx:13,
>                  from engine/include/sfx2/basedlgs.hxx:25,
>                  from engine/sw/source/uibase/inc/contentcontroldlg.hxx:21,
>                  from engine/sw/source/ui/misc/contentcontroldlg.cxx:20:
> In destructor ‘constexpr rtl::OUString::~OUString()’,
>     inlined from ‘constexpr SwContentControlListItem::~SwContentControlListItem()’ at engine/sw/inc/formatcontentcontrol.hxx:90:20,
>     inlined from ‘constexpr void std::destroy_at(_Tp*) [with _Tp = SwContentControlListItem]’ at /usr/include/c++/16/bits/stl_construct.h:88:18,
>     inlined from ‘constexpr void std::_Destroy(_Tp*) [with _Tp = SwContentControlListItem]’ at /usr/include/c++/16/bits/stl_construct.h:164:22,
>     inlined from ‘static constexpr void std::allocator_traits<std::allocator<void> >::destroy(allocator_type&, _Up*) [with _Up = SwContentControlListItem]’ at /usr/include/c++/16/bits/alloc_traits.h:859:17,
>     inlined from ‘void std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_dispose() [with _Tp = SwContentControlListItem; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:682:35,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:423:18,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:392:5,
>     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1136:21,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = SvxCharacterMap; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1610:7,
>     inlined from ‘std::shared_ptr<SvxCharacterMap>::~shared_ptr()’ at /usr/include/c++/16/bits/shared_ptr.h:175:11,
>     inlined from ‘void SwContentControlDlg::SelectCharHdl(weld::Button&)’ at engine/sw/source/ui/misc/contentcontroldlg.cxx:332:1:
> engine/include/rtl/ustring.hxx:540:32: error: array subscript 3 is outside array bounds of ‘void [24]’ [-Werror=array-bounds=]
>   540 |             rtl_uString_release( pData );
>       |             ~~~~~~~~~~~~~~~~~~~^~~~~~~~~
> In file included from /usr/include/c++/16/bits/shared_ptr.h:53,
>                  from /usr/include/c++/16/memory:82,
>                  from engine/include/sfx2/basedlgs.hxx:22:
> In constructor ‘std::__shared_count<_Lp>::__shared_count(_Ptr) [with _Ptr = SvxCharacterMap*; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Ptr, std::false_type) [with _Ptr = SvxCharacterMap*; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:992:22,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(_Yp*) [with _Yp = SvxCharacterMap; <template-parameter-2-2> = void; _Tp = SvxCharacterMap; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1555:17,
>     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(_Yp*) [with _Yp = SvxCharacterMap; <template-parameter-2-2> = void; _Tp = SvxCharacterMap]’ at /usr/include/c++/16/bits/shared_ptr.h:213:46,
>     inlined from ‘void SwContentControlDlg::SelectCharHdl(weld::Button&)’ at engine/sw/source/ui/misc/contentcontroldlg.cxx:305:97:
> /usr/include/c++/16/bits/shared_ptr_base.h:981:23: note: at offset 24 into object of size 24 allocated by ‘operator new’
>   981 |               _M_pi = new _Sp_counted_ptr<_Ptr, _Lp>(__p);
>       |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In destructor ‘constexpr rtl::OUString::~OUString()’,
>     inlined from ‘constexpr SwContentControlListItem::~SwContentControlListItem()’ at engine/sw/inc/formatcontentcontrol.hxx:90:20,
>     inlined from ‘constexpr void std::destroy_at(_Tp*) [with _Tp = SwContentControlListItem]’ at /usr/include/c++/16/bits/stl_construct.h:88:18,
>     inlined from ‘constexpr void std::_Destroy(_Tp*) [with _Tp = SwContentControlListItem]’ at /usr/include/c++/16/bits/stl_construct.h:164:22,
>     inlined from ‘static constexpr void std::allocator_traits<std::allocator<void> >::destroy(allocator_type&, _Up*) [with _Up = SwContentControlListItem]’ at /usr/include/c++/16/bits/alloc_traits.h:859:17,
>     inlined from ‘void std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_dispose() [with _Tp = SwContentControlListItem; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:682:35,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:423:18,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:392:5,
>     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1136:21,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = SvxCharacterMap; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1610:7,
>     inlined from ‘std::shared_ptr<SvxCharacterMap>::~shared_ptr()’ at /usr/include/c++/16/bits/shared_ptr.h:175:11,
>     inlined from ‘void SwContentControlDlg::SelectCharHdl(weld::Button&)’ at engine/sw/source/ui/misc/contentcontroldlg.cxx:332:1:
> engine/include/rtl/ustring.hxx:541:5: error: array subscript 3 is outside array bounds of ‘void [24]’ [-Werror=array-bounds=]
>   541 |     }
>       |     ^
> In constructor ‘std::__shared_count<_Lp>::__shared_count(_Ptr) [with _Ptr = SvxCharacterMap*; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Ptr, std::false_type) [with _Ptr = SvxCharacterMap*; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:992:22,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(_Yp*) [with _Yp = SvxCharacterMap; <template-parameter-2-2> = void; _Tp = SvxCharacterMap; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1555:17,
>     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(_Yp*) [with _Yp = SvxCharacterMap; <template-parameter-2-2> = void; _Tp = SvxCharacterMap]’ at /usr/include/c++/16/bits/shared_ptr.h:213:46,
>     inlined from ‘void SwContentControlDlg::SelectCharHdl(weld::Button&)’ at engine/sw/source/ui/misc/contentcontroldlg.cxx:305:97:
> /usr/include/c++/16/bits/shared_ptr_base.h:981:23: note: at offset 24 into object of size 24 allocated by ‘operator new’
>   981 |               _M_pi = new _Sp_counted_ptr<_Ptr, _Lp>(__p);
>       |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from engine/sw/inc/txatbase.hxx:32,
>                  from engine/sw/inc/textcontentcontrol.hxx:21,
>                  from engine/sw/source/ui/misc/contentcontroldlg.cxx:29:
> In destructor ‘constexpr SwContentControlListItem::~SwContentControlListItem()’,
>     inlined from ‘constexpr void std::destroy_at(_Tp*) [with _Tp = SwContentControlListItem]’ at /usr/include/c++/16/bits/stl_construct.h:88:18,
>     inlined from ‘constexpr void std::_Destroy(_Tp*) [with _Tp = SwContentControlListItem]’ at /usr/include/c++/16/bits/stl_construct.h:164:22,
>     inlined from ‘static constexpr void std::allocator_traits<std::allocator<void> >::destroy(allocator_type&, _Up*) [with _Up = SwContentControlListItem]’ at /usr/include/c++/16/bits/alloc_traits.h:859:17,
>     inlined from ‘void std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_dispose() [with _Tp = SwContentControlListItem; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:682:35,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:423:18,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:392:5,
>     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1136:21,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = SvxCharacterMap; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1610:7,
>     inlined from ‘std::shared_ptr<SvxCharacterMap>::~shared_ptr()’ at /usr/include/c++/16/bits/shared_ptr.h:175:11,
>     inlined from ‘void SwContentControlDlg::SelectCharHdl(weld::Button&)’ at engine/sw/source/ui/misc/contentcontroldlg.cxx:332:1:
> engine/sw/inc/formatcontentcontrol.hxx:90:20: error: array subscript ‘SwContentControlListItem[1]’ is partly outside array bounds of ‘unsigned char [24]’ [-Werror=array-bounds=]
>    90 | class SW_DLLPUBLIC SwContentControlListItem
>       |                    ^~~~~~~~~~~~~~~~~~~~~~~~
> In constructor ‘std::__shared_count<_Lp>::__shared_count(_Ptr) [with _Ptr = SvxCharacterMap*; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Ptr, std::false_type) [with _Ptr = SvxCharacterMap*; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:992:22,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(_Yp*) [with _Yp = SvxCharacterMap; <template-parameter-2-2> = void; _Tp = SvxCharacterMap; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/16/bits/shared_ptr_base.h:1555:17,
>     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(_Yp*) [with _Yp = SvxCharacterMap; <template-parameter-2-2> = void; _Tp = SvxCharacterMap]’ at /usr/include/c++/16/bits/shared_ptr.h:213:46,
>     inlined from ‘void SwContentControlDlg::SelectCharHdl(weld::Button&)’ at engine/sw/source/ui/misc/contentcontroldlg.cxx:305:97:
> /usr/include/c++/16/bits/shared_ptr_base.h:981:23: note: at offset 16 into object of size 24 allocated by ‘operator new’
>   981 |               _M_pi = new _Sp_counted_ptr<_Ptr, _Lp>(__p);
>       |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I59db4d41d745ac2bab8b0712fb2145a333fe5f42
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1155
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit 3e690ff02e2de8aeb052bf5a2d1f302134b907b1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207168
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-23 12:27:17 +02:00
Stephan Bergmann e3c26324dd Silence some more bogus -Wrestrict
...that hit at least with GCC 17,

> In file included from ~/gcc/inst/include/c++/17.0.0/memory:71,
>                  from engine/include/sfx2/tabdlg.hxx:22,
>                  from engine/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx:21,
>                  from engine/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx:20:
> In function ‘constexpr _ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator<const int*, vector<int> >; _ForwardIterator = int*]’,
>     inlined from ‘constexpr _ForwardIterator std::__uninitialized_copy_a(_InputIterator, _Sentinel, _ForwardIterator, allocator<_Tp>&) [with _InputIterator = __gnu_cxx::__normal_iterator<const int*, vector<int> >; _Sentinel = __gnu_cxx::__normal_iterator<const int*, vector<int> >; _ForwardIterator = int*; _Tp = int]’ at ~/gcc/inst/include/c++/17.0.0/bits/stl_uninitialized.h:659:32,
>     inlined from ‘constexpr std::vector< <template-parameter-1-1>, <template-parameter-1-2> >::_Alloc_result std::vector< <template-parameter-1-1>, <template-parameter-1-2> >::_M_allocate_and_copy(size_type, _ForwardIterator, _ForwardIterator) [with _ForwardIterator = __gnu_cxx::__normal_iterator<const int*, std::vector<int> >; _Tp = int; _Alloc = std::allocator<int>]’ at ~/gcc/inst/include/c++/17.0.0/bits/stl_vector.h:1957:6,
>     inlined from ‘constexpr void std::vector< <template-parameter-1-1>, <template-parameter-1-2> >::_M_replace_with(size_type, _ForwardIterator, _ForwardIterator) [with _ForwardIterator = __gnu_cxx::__normal_iterator<const int*, std::vector<int> >; _Tp = int; _Alloc = std::allocator<int>]’ at ~/gcc/inst/include/c++/17.0.0/bits/stl_vector.h:1979:44,
>     inlined from ‘constexpr std::vector<_Tp, _Alloc>& std::vector< <template-parameter-1-1>, <template-parameter-1-2> >::operator=(const std::vector< <template-parameter-1-1>, <template-parameter-1-2> >&) [with _Tp = int; _Alloc = std::allocator<int>]’ at ~/gcc/inst/include/c++/17.0.0/bits/vector.tcc:236:21,
>     inlined from ‘virtual void chart::SchOptionTabPage::Reset(const SfxItemSet*)’ at engine/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx:168:69:
> ~/gcc/inst/include/c++/17.0.0/bits/stl_uninitialized.h:294:31: error: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ accessing between 9223372032559808516 and 9223372036854775804 bytes at offsets 0 and 0 overlaps 9223372028264841225 bytes at offset 4294967291 [-Werror=restrict]
>   294 |               __builtin_memcpy(std::__niter_base(__result),
>       |               ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   295 |                                std::__miter_base(std::__niter_base(__first)),
>       |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   296 |                                __n * sizeof(_ValT));
>       |                                ~~~~~~~~~~~~~~~~~~~~

and

> In file included from ~/gcc/inst/include/c++/17.0.0/memory:71,
>                  from engine/include/rtl/stringconcat.hxx:20,
>                  from engine/include/rtl/string.hxx:44,
>                  from engine/include/rtl/ustring.hxx:39,
>                  from engine/include/com/sun/star/uno/Type.h:25,
>                  from engine/include/com/sun/star/uno/Sequence.h:25,
>                  from engine/include/com/sun/star/uno/Sequence.hxx:32,
>                  from engine/include/filter/msfilter/mscodec.hxx:22,
>                  from engine/filter/source/msfilter/mscodec.cxx:20:
> In function ‘constexpr _ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator<const unsigned char*, vector<unsigned char> >; _ForwardIterator = unsigned char*]’,
>     inlined from ‘constexpr _ForwardIterator std::__uninitialized_copy_a(_InputIterator, _Sentinel, _ForwardIterator, allocator<_Tp>&) [with _InputIterator = __gnu_cxx::__normal_iterator<const unsigned char*, vector<unsigned char> >; _Sentinel = __gnu_cxx::__normal_iterator<const unsigned char*, vector<unsigned char> >; _ForwardIterator = unsigned char*; _Tp = unsigned char]’ at ~/gcc/inst/include/c++/17.0.0/bits/stl_uninitialized.h:659:32,
>     inlined from ‘constexpr std::vector< <template-parameter-1-1>, <template-parameter-1-2> >::vector(const std::vector< <template-parameter-1-1>, <template-parameter-1-2> >&) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]’ at ~/gcc/inst/include/c++/17.0.0/bits/stl_vector.h:678:31,
>     inlined from ‘virtual bool msfilter::MSCodec_CryptoAPI::InitCipher(sal_uInt32)’ at engine/filter/source/msfilter/mscodec.cxx:471:51:
> ~/gcc/inst/include/c++/17.0.0/bits/stl_uninitialized.h:294:31: error: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ accessing 9223372032559808513 or more bytes at offsets 0 and 0 overlaps 9223372028264841219 bytes at offset 4294967294 [-Werror=restrict]
>   294 |               __builtin_memcpy(std::__niter_base(__result),
>       |               ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   295 |                                std::__miter_base(std::__niter_base(__first)),
>       |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   296 |                                __n * sizeof(_ValT));
>       |                                ~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: Ic7474db25c2c88c8796c44a110bdfecca0fa42fa
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4852
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit cf408bbc72fc2cd5d97ea767804f941770f3740c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207167
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-23 12:17:51 +02:00
Stephan Bergmann d8cd81b6cc Remove some broken gb_CppunitTest_set_include
...which all mentioned the wrong desktop_dialogs_test, so demonstratedly were
not missed by their respective CppunitTest_*.mk files, so can just go

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I8bbff02a50654c214d88635a3dc91553534a78e9
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4969
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 99a2f9d3f14fa4c1247103a8dbafce439000c592)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207110
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-22 16:04:10 +02:00
Stephan Bergmann 495918adb9 Fix heap-use-after-free in ScOutputData::FindChanged
The loop in ScOutputData::FindChanged reused the ScFormulaCell pointers cached
in mpRowInfo.  But the preceding EnsureFormulaCellResults call can contract
an auto-resizing matrix formula, and can thus delete the matrix's cells.

This apparently started to break in 8070124eb9f0f5a4c7ea26a0fe39366d2ff8d26a
"sc: fix crash when a matrix formula contracts mid-iteration", making the
CppunitTest_sc_uicalc2 it introduced fail with

> ==558773==ERROR: AddressSanitizer: heap-use-after-free on address 0x7ca7f493fc48 at pc 0x7bc78ec4338a bp 0x7ffdce34e080 sp 0x7ffdce34e078
> READ of size 8 at 0x7ca7f493fc48 thread T0
>  #0 in ScFormulaCell::IsRunning() const at engine/sc/inc/formulacell.hxx:363:48
>  #1 in ScOutputData::FindChanged() at engine/sc/source/ui/view/output.cxx:1963:29
>  #2 in ScGridWindow::UpdateFormulaRange(short, int, short, int) at engine/sc/source/ui/view/gridwin.cxx:5388:17
>  #3 in ScGridWindow::UpdateFormulas(short, int, short, int) at engine/sc/source/ui/view/gridwin.cxx:5336:5
>  #4 in ScTabView::UpdateFormulas(short, int, short, int) at engine/sc/source/ui/view/tabview3.cxx:2785:26
>  #5 in ScTabViewShell::Notify(SfxBroadcaster&, SfxHint const&) at engine/sc/source/ui/view/tabvwsh5.cxx:242:17
>  #6 in SfxBroadcaster::Broadcast(SfxHint const&) at engine/svl/source/notify/SfxBroadcaster.cxx:43:24
>  #7 in ScDocShell::PostDataChanged() at engine/sc/source/ui/docshell/docsh3.cxx:95:5
>  #8 in ScDocShell::SetDocumentModified() at engine/sc/source/ui/docshell/docsh.cxx:3265:9
>  #9 in ScDocShellModificator::SetDocumentModified() at engine/sc/source/ui/docshell/docsh.cxx:3656:19
>  #10 in (anonymous namespace)::performAutoFormatAndUpdate(std::basic_string_view<char16_t, std::char_traits<char16_t>>, ScMarkData const&, short, int, short, bool, bool, std::shared_ptr<ScDocShellModificator> const&, ScViewFunc&) at engine/sc/source/ui/view/viewfunc.cxx:478:19
>  #11 in ScViewFunc::EnterData(short, int, short, rtl::OUString const&, EditTextObject const*, bool) at engine/sc/source/ui/view/viewfunc.cxx:817:9
>  #12 in ScViewFunc::EnterDataToCurrentCell(rtl::OUString const&, EditTextObject const*, bool) at engine/sc/source/ui/view/viewfunc.cxx:665:5
>  #13 in ScCellShell::Execute(SfxRequest&) at engine/sc/source/ui/view/cellsh3.cxx:290:40
>  #14 in SfxStubScCellShellExecute(SfxShell*, SfxRequest&) at engine/workdir/SdiTarget/sc/sdi/scslots.hxx:7965:27
>  #15 in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) at engine/sfx2/source/control/dispatch.cxx:256:9
>  #16 in SfxDispatcher::Execute_(SfxShell&, SfxSlot const&, SfxRequest&, SfxCallMode) at engine/sfx2/source/control/dispatch.cxx:755:9
>  #17 in SfxBindings::Execute_Impl(SfxRequest&, SfxSlot const*, SfxShell*) at engine/sfx2/source/control/bindings.cxx:1054:22
>  #18 in SfxBindings::Execute_Impl(unsigned short, SfxPoolItem const**, SfxCallMode) at engine/sfx2/source/control/bindings.cxx:961:5
>  #19 in SfxBindings::Execute(unsigned short, SfxPoolItem const**, SfxCallMode) at engine/sfx2/source/control/bindings.cxx:884:12
>  #20 in ScCellShell::Execute(SfxRequest&) at engine/sc/source/ui/view/cellsh3.cxx:381:39
>  #21 in SfxStubScCellShellExecute(SfxShell*, SfxRequest&) at engine/workdir/SdiTarget/sc/sdi/scslots.hxx:7965:27
>  #22 in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) at engine/sfx2/source/control/dispatch.cxx:256:9
>  #23 in SfxDispatcher::Execute_(SfxShell&, SfxSlot const&, SfxRequest&, SfxCallMode) at engine/sfx2/source/control/dispatch.cxx:755:9
>  #24 in SfxBindings::Execute_Impl(SfxRequest&, SfxSlot const*, SfxShell*) at engine/sfx2/source/control/bindings.cxx:1054:22
>  #25 in SfxBindings::Execute_Impl(unsigned short, SfxPoolItem const**, SfxCallMode) at engine/sfx2/source/control/bindings.cxx:961:5
>  #26 in SfxBindings::Execute(unsigned short, SfxPoolItem const**, SfxCallMode) at engine/sfx2/source/control/bindings.cxx:884:12
>  #27 in ScInputHandler::EnterHandler2(ScEnterMode, bool, rtl::OUString, rtl::OUString const&) at engine/sc/source/ui/app/inputhdl.cxx:3537:23
>  #28 in ScInputHandler::EnterHandler(ScEnterMode, bool) at engine/sc/source/ui/app/inputhdl.cxx:3264:5
>  #29 in ScModule::InputEnterHandler(ScEnterMode, bool) at engine/sc/source/ui/app/scmod.cxx:1473:19
>  #30 in ScTabViewShell::TabKeyInput(KeyEvent const&) at engine/sc/source/ui/view/tabvwsh4.cxx:1469:33
>  #31 in ScGridWindow::KeyInput(KeyEvent const&) at engine/sc/source/ui/view/gridwin.cxx:3945:26
>  #32 in (anonymous namespace)::KitPostAsyncEvent(void*, void*) at engine/sfx2/source/view/kithelper.cxx:1298:35
>  #33 in Link<void*, void>::Call(void*) const at engine/include/tools/link.hxx:105:45
>  #34 in ImplHandleUserEvent(ImplSVEvent*) at engine/vcl/source/window/winproc.cxx:2311:30
>  #35 in ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) at engine/vcl/source/window/winproc.cxx:2868:13
>  #36 in SalFrame::CallCallback(SalEvent, void const*) const at engine/vcl/inc/salframe.hxx:310:29
>  #37 in SvpSalInstance::ProcessEvent(SalUserEventList::SalUserEvent) at engine/vcl/headless/svpinst.cxx:289:22
>  #38 in non-virtual thunk to SvpSalInstance::ProcessEvent(SalUserEventList::SalUserEvent) at engine/vcl/headless/svpinst.cxx
>  #39 in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const at engine/vcl/source/app/salusereventlist.cxx:119:58
>  #40 in SalUserEventList::DispatchUserEvents(bool) at engine/vcl/source/app/salusereventlist.cxx:120:13
>  #41 in SvpSalInstance::ImplYield(bool, bool) at engine/vcl/headless/svpinst.cxx:442:22
>  #42 in SvpSalInstance::DoYield(bool, bool) at engine/vcl/headless/svpinst.cxx:519:21
>  #43 in InnerYield(bool, bool) at engine/vcl/source/app/svapp.cxx:389:48
>  #44 in Scheduler::ProcessEventsToIdle() at engine/vcl/source/app/svapp.cxx:449:12
>  #45 in ScModelTestBase::insertStringToCell(rtl::OUString const&, std::basic_string_view<char16_t, std::char_traits<char16_t>>) at engine/sc/qa/unit/helper/qahelper.cxx:318:5
>  #46 in testSpillMatrixContractionOnEdit::TestBody() at engine/sc/qa/unit/uicalc/uicalc2.cxx:2184:5
>
> 0x7ca7f493fc48 is located 72 bytes inside of 160-byte region [0x7ca7f493fc00,0x7ca7f493fca0)
> freed by thread T0 here:
>  #0 in operator delete(void*, unsigned long) at ~/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:187:3
>  #1 in std::default_delete<ScFormulaCell>::operator()(ScFormulaCell*) const at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/unique_ptr.h:92:2
>  #2 in std::default_delete<ScFormulaCell> std::for_each<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<ScFormulaCell**, std::__cxx1998::vector<ScFormulaCell*, std::allocator<ScFormulaCell*>>>, std::__debug::vector<ScFormulaCell*, std::allocator<ScFormulaCell*>>, std::random_access_iterator_tag>, std::default_delete<ScFormulaCell>>(__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<ScFormulaCell**, std::__cxx1998::vector<ScFormulaCell*, std::allocator<ScFormulaCell*>>>, std::__debug::vector<ScFormulaCell*, std::allocator<ScFormulaCell*>>, std::random_access_iterator_tag>, __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<ScFormulaCell**, std::__cxx1998::vector<ScFormulaCell*, std::allocator<ScFormulaCell*>>>, std::__debug::vector<ScFormulaCell*, std::allocator<ScFormulaCell*>>, std::random_access_iterator_tag>, std::default_delete<ScFormulaCell>) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/stl_algo.h:3775:2
>  #3 in mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell, mdds::mtv::delayed_delete_vector>::overwrite_values(mdds::mtv::base_element_block&, unsigned long, unsigned long) at engine/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/../types.hpp:779:9
>  #4 in void std::__invoke_impl<void, void (*&)(mdds::mtv::base_element_block&, unsigned long, unsigned long), mdds::mtv::base_element_block&, unsigned long, unsigned long>(std::__invoke_other, void (*&)(mdds::mtv::base_element_block&, unsigned long, unsigned long), mdds::mtv::base_element_block&, unsigned long&&, unsigned long&&) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/invoke.h:63:14
>  #5 in std::enable_if<is_invocable_r_v<void, void (*&)(mdds::mtv::base_element_block&, unsigned long, unsigned long), mdds::mtv::base_element_block&, unsigned long, unsigned long>, void>::type std::__invoke_r<void, void (*&)(mdds::mtv::base_element_block&, unsigned long, unsigned long), mdds::mtv::base_element_block&, unsigned long, unsigned long>(void (*&)(mdds::mtv::base_element_block&, unsigned long, unsigned long), mdds::mtv::base_element_block&, unsigned long&&, unsigned long&&) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/invoke.h:113:2
>  #6 in std::_Function_handler<void (mdds::mtv::base_element_block&, unsigned long, unsigned long), void (*)(mdds::mtv::base_element_block&, unsigned long, unsigned long)>::_M_invoke(std::_Any_data const&, mdds::mtv::base_element_block&, unsigned long&&, unsigned long&&) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/std_function.h:295:9
>  #7 in std::function<void (mdds::mtv::base_element_block&, unsigned long, unsigned long)>::operator()(mdds::mtv::base_element_block&, unsigned long, unsigned long) const at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/std_function.h:581:9
>  #8 in mdds::mtv::element_block_funcs<mdds::mtv::default_element_block<10, double, mdds::mtv::delayed_delete_vector>, mdds::mtv::default_element_block<52, svl::SharedString, mdds::mtv::delayed_delete_vector>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject, mdds::mtv::delayed_delete_vector>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell, mdds::mtv::delayed_delete_vector>>::overwrite_values(mdds::mtv::base_element_block&, unsigned long, unsigned long) at engine/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/.././block_funcs.hpp:209:9
>  #9 in mdds::mtv::soa::multi_type_vector<sc::CellStoreTraits>::set_empty_in_single_block(unsigned long, unsigned long, unsigned long, bool) at engine/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:1976:13
>  #10 in mdds::mtv::soa::multi_type_vector<sc::CellStoreTraits>::set_empty_impl(unsigned long, unsigned long, unsigned long, bool) at engine/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:1898:18
>  #11 in mdds::mtv::soa::multi_type_vector<sc::CellStoreTraits>::set_empty(mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<sc::CellStoreTraits>::iterator_trait> const&, unsigned long, unsigned long) at engine/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:1142:12
>  #12 in (anonymous namespace)::EmptyCells::operator()(sc::RowSpan const&) at engine/sc/source/core/data/column3.cxx:1066:34
>  #13 in (anonymous namespace)::EmptyCells std::for_each<std::reverse_iterator<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<sc::RowSpan*, std::__cxx1998::vector<sc::RowSpan, std::allocator<sc::RowSpan>>>, std::__debug::vector<sc::RowSpan, std::allocator<sc::RowSpan>>, std::random_access_iterator_tag>>, (anonymous namespace)::EmptyCells>(std::reverse_iterator<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<sc::RowSpan*, std::__cxx1998::vector<sc::RowSpan, std::allocator<sc::RowSpan>>>, std::__debug::vector<sc::RowSpan, std::allocator<sc::RowSpan>>, std::random_access_iterator_tag>>, std::reverse_iterator<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<sc::RowSpan*, std::__cxx1998::vector<sc::RowSpan, std::allocator<sc::RowSpan>>>, std::__debug::vector<sc::RowSpan, std::allocator<sc::RowSpan>>, std::random_access_iterator_tag>>, (anonymous namespace)::EmptyCells) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/stl_algo.h:3775:2
>  #14 in ScColumn::DeleteCells(sc::ColumnBlockPosition&, int, int, InsertDeleteFlags) at engine/sc/source/core/data/column3.cxx:1096:5
>  #15 in ScColumn::DeleteArea(int, int, InsertDeleteFlags, bool, sc::ColumnSpanSet*) at engine/sc/source/core/data/column3.cxx:1120:19
>  #16 in ScTable::DeleteArea(short, int, short, int, InsertDeleteFlags, bool, sc::ColumnSpanSet*) at engine/sc/source/core/data/table2.cxx:433:25
>  #17 in ScDocument::DeleteAreaTab(short, int, short, int, short, InsertDeleteFlags) at engine/sc/source/core/data/document.cxx:2064:17
>  #18 in ScDocument::ResizeMatrixFormula(ScAddress const&, short, int) at engine/sc/source/core/data/documen4.cxx:517:17
>  #19 in ScDocument::ProcessPendingMatrixResizes() at engine/sc/source/core/data/documen4.cxx:623:9
>  #20 in sc::MatrixResizeGuard::~MatrixResizeGuard() at engine/sc/inc/MatrixResizeGuard.hxx:39:19
>  #21 in ScColumn::EnsureFormulaCellResults(int, int, bool) at engine/sc/source/core/data/column4.cxx:2012:1
>  #22 in ScTable::EnsureFormulaCellResults(short, int, short, int, bool) at engine/sc/source/core/data/table7.cxx:449:32
>  #23 in ScDocument::EnsureFormulaCellResults(ScRange const&, bool) at engine/sc/source/core/data/document10.cxx:1037:27
>  #24 in ScOutputData::FindChanged() at engine/sc/source/ui/view/output.cxx:1950:20
>  #25 in ScGridWindow::UpdateFormulaRange(short, int, short, int) at engine/sc/source/ui/view/gridwin.cxx:5388:17

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I0e32afb07a49f149294e2bf20cb10194ae84fd81
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4135
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 780c73802eb8ace937d7b0d5be8a33ba710d2f55)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206646
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-16 11:04:21 +02:00
Stephan Bergmann 6bc9e31108 external/coinmp: Various UBSan issues
...as seen during CppunitTest_sc_solverobj,

> CglPreProcess.cpp:6432:21: runtime error: null pointer passed as argument 2, which is declared to never be null
> /usr/include/string.h:48:28: note: nonnull attribute specified here
>  #0 in CglPreProcess::addCutGenerator(CglCutGenerator*) at <null> (engine/instdir/program/libCgl.so.1 +0x2e858a)
>  #1 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x1dd308)
>  #2 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #3 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #4 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #5 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #6 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> CbcModel.cpp:11504:39: runtime error: null pointer passed as argument 2, which is declared to never be null
> /usr/include/string.h:48:28: note: nonnull attribute specified here
>  #0 in CbcModel::findIntegers(bool, int) at <null> (engine/instdir/program/libCbc.so.3 +0x2e0857)
>  #1 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x1dd7f3)
>  #2 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #3 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #4 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #5 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #6 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> CglPreProcess.cpp:1721:36: runtime error: 1.79769e+308 is outside the range of representable values of type 'int'
>  #0 in CglPreProcess::preProcessNonDefault(OsiSolverInterface&, int, int, int) at <null> (engine/instdir/program/libCgl.so.1 +0x2f71a6)
>  #1 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x1e4777)
>  #2 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #3 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #4 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #5 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #6 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> CglPreProcess.cpp:1722:36: runtime error: -1.79769e+308 is outside the range of representable values of type 'int'
>  #0 in CglPreProcess::preProcessNonDefault(OsiSolverInterface&, int, int, int) at <null> (engine/instdir/program/libCgl.so.1 +0x2f71d1)
>  #1 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x1e4777)
>  #2 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #3 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #4 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #5 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #6 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> CbcModel.cpp:7134:24: runtime error: null pointer passed as argument 2, which is declared to never be null
> /usr/include/string.h:48:28: note: nonnull attribute specified here
>  #0 in CbcModel::addHeuristic(CbcHeuristic*, char const*, int) at <null> (engine/instdir/program/libCbc.so.3 +0x3e315b)
>  #1 in doHeuristics(CbcModel*, int, CbcOrClpParam*, int, int, int) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x2ac48e)
>  #2 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x1d8334)
>  #3 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #4 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #5 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #6 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #7 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> CbcModel.cpp:7110:24: runtime error: null pointer passed as argument 2, which is declared to never be null
> /usr/include/string.h:48:28: note: nonnull attribute specified here
>  #0 in CbcModel::addCutGenerator(CglCutGenerator*, int, char const*, bool, bool, bool, int, int, int) at <null> (engine/instdir/program/libCbc.so.3 +0x349035)
>  #1 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x1d8efb)
>  #2 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #3 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #4 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #5 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #6 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> CbcModel.cpp:7119:30: runtime error: null pointer passed as argument 2, which is declared to never be null
> /usr/include/string.h:48:28: note: nonnull attribute specified here
>  #0 in CbcModel::addCutGenerator(CglCutGenerator*, int, char const*, bool, bool, bool, int, int, int) at <null> (engine/instdir/program/libCbc.so.3 +0x34921e)
>  #1 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x1d8efb)
>  #2 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #3 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #4 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #5 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #6 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> CglKnapsackCover.cpp:3908:36: runtime error: -1.79769e+308 is outside the range of representable values of type 'int'
>  #0 in CglKnapsackCover::createCliques(OsiSolverInterface&, int, int, bool) at <null> (engine/instdir/program/libCgl.so.1 +0x1af0ab)
>  #1 in CbcCutGenerator::CbcCutGenerator(CbcModel*, CglCutGenerator*, int, char const*, bool, bool, bool, int, int, int, int) at <null> (engine/instdir/program/libCbc.so.3 +0x7fb17)
>  #2 in CbcModel::addCutGenerator(CglCutGenerator*, int, char const*, bool, bool, bool, int, int, int) at <null> (engine/instdir/program/libCbc.so.3 +0x348ace)
>  #3 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x1d9c2d)
>  #4 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #5 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #6 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #7 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #8 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> CbcModel.cpp:9355:93: runtime error: division by zero
>  #0 in CbcModel::solveWithCuts(OsiCuts&, int, CbcNode*) at <null> (engine/instdir/program/libCbc.so.3 +0x371e89)
>  #1 in CbcModel::branchAndBound(int) at <null> (engine/instdir/program/libCbc.so.3 +0x33f172)
>  #2 in CbcHeuristic::smallBranchAndBound(OsiSolverInterface*, int, double*, double&, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) const at <null> (engine/instdir/program/libCbc.so.3 +0x10643e)
>  #3 in CbcHeuristicFPump::solution(double&, double*) at <null> (engine/instdir/program/libCbc.so.3 +0x1a25ed)
>  #4 in CbcModel::doHeuristicsAtRoot(int) at <null> (engine/instdir/program/libCbc.so.3 +0x34fd61)
>  #5 in CbcModel::branchAndBound(int) at <null> (engine/instdir/program/libCbc.so.3 +0x306fec)
>  #6 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x215c37)
>  #7 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #8 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #9 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #10 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #11 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> CbcModel.cpp:9332:49: runtime error: division by zero
>  #0 in CbcModel::solveWithCuts(OsiCuts&, int, CbcNode*) at <null> (engine/instdir/program/libCbc.so.3 +0x3760c7)
>  #1 in CbcModel::branchAndBound(int) at <null> (engine/instdir/program/libCbc.so.3 +0x33f172)
>  #2 in CbcHeuristic::smallBranchAndBound(OsiSolverInterface*, int, double*, double&, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) const at <null> (engine/instdir/program/libCbc.so.3 +0x10643e)
>  #3 in CbcHeuristicFPump::solution(double&, double*) at <null> (engine/instdir/program/libCbc.so.3 +0x1a25ed)
>  #4 in CbcModel::doHeuristicsAtRoot(int) at <null> (engine/instdir/program/libCbc.so.3 +0x34fd61)
>  #5 in CbcModel::branchAndBound(int) at <null> (engine/instdir/program/libCbc.so.3 +0x306fec)
>  #6 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x215c37)
>  #7 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #8 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #9 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #10 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #11 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> ClpSimplex.cpp:2560:34: runtime error: applying non-zero offset 120 to null pointer
>  #0 in ClpSimplex::gutsOfCopy(ClpSimplex const&) at <null> (engine/instdir/program/libClp.so.1 +0x6ab776)
>  #1 in ClpSimplex::ClpSimplex(ClpSimplex const&, int) at <null> (engine/instdir/program/libClp.so.1 +0x6a912b)
>  #2 in ClpPresolve::gutsOfPresolvedModel(ClpSimplex*, double, bool, int, bool, bool, char const*, char const*) at <null> (engine/instdir/program/libClp.so.1 +0x59c16c)
>  #3 in OsiClpSolverInterface::initialSolve() at <null> (engine/instdir/program/libOsiClp.so.1 +0xa53f)
>  #4 in CglPreProcess::postProcess(OsiSolverInterface&, bool) at <null> (engine/instdir/program/libCgl.so.1 +0x3600f1)
>  #5 in CbcHeuristic::smallBranchAndBound(OsiSolverInterface*, int, double*, double&, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) const at <null> (engine/instdir/program/libCbc.so.3 +0x107ac1)
>  #6 in CbcHeuristicFPump::solution(double&, double*) at <null> (engine/instdir/program/libCbc.so.3 +0x1a25ed)
>  #7 in CbcModel::doHeuristicsAtRoot(int) at <null> (engine/instdir/program/libCbc.so.3 +0x34fd61)
>  #8 in CbcModel::branchAndBound(int) at <null> (engine/instdir/program/libCbc.so.3 +0x306fec)
>  #9 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x215c37)
>  #10 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #11 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #12 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #13 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #14 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> ClpSimplex.cpp:2563:34: runtime error: applying non-zero offset 120 to null pointer
>  #0 in ClpSimplex::gutsOfCopy(ClpSimplex const&) at <null> (engine/instdir/program/libClp.so.1 +0x6ab771)
>  #1 in ClpSimplex::ClpSimplex(ClpSimplex const&, int) at <null> (engine/instdir/program/libClp.so.1 +0x6a912b)
>  #2 in ClpPresolve::gutsOfPresolvedModel(ClpSimplex*, double, bool, int, bool, bool, char const*, char const*) at <null> (engine/instdir/program/libClp.so.1 +0x59c16c)
>  #3 in OsiClpSolverInterface::initialSolve() at <null> (engine/instdir/program/libOsiClp.so.1 +0xa53f)
>  #4 in CglPreProcess::postProcess(OsiSolverInterface&, bool) at <null> (engine/instdir/program/libCgl.so.1 +0x3600f1)
>  #5 in CbcHeuristic::smallBranchAndBound(OsiSolverInterface*, int, double*, double&, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) const at <null> (engine/instdir/program/libCbc.so.3 +0x107ac1)
>  #6 in CbcHeuristicFPump::solution(double&, double*) at <null> (engine/instdir/program/libCbc.so.3 +0x1a25ed)
>  #7 in CbcModel::doHeuristicsAtRoot(int) at <null> (engine/instdir/program/libCbc.so.3 +0x34fd61)
>  #8 in CbcModel::branchAndBound(int) at <null> (engine/instdir/program/libCbc.so.3 +0x306fec)
>  #9 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x215c37)
>  #10 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #11 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #12 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #13 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #14 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> ClpSimplex.cpp:2567:37: runtime error: applying non-zero offset 120 to null pointer
>  #0 in ClpSimplex::gutsOfCopy(ClpSimplex const&) at <null> (engine/instdir/program/libClp.so.1 +0x6ab751)
>  #1 in ClpSimplex::ClpSimplex(ClpSimplex const&, int) at <null> (engine/instdir/program/libClp.so.1 +0x6a912b)
>  #2 in ClpPresolve::gutsOfPresolvedModel(ClpSimplex*, double, bool, int, bool, bool, char const*, char const*) at <null> (engine/instdir/program/libClp.so.1 +0x59c16c)
>  #3 in OsiClpSolverInterface::initialSolve() at <null> (engine/instdir/program/libOsiClp.so.1 +0xa53f)
>  #4 in CglPreProcess::postProcess(OsiSolverInterface&, bool) at <null> (engine/instdir/program/libCgl.so.1 +0x3600f1)
>  #5 in CbcHeuristic::smallBranchAndBound(OsiSolverInterface*, int, double*, double&, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) const at <null> (engine/instdir/program/libCbc.so.3 +0x107ac1)
>  #6 in CbcHeuristicFPump::solution(double&, double*) at <null> (engine/instdir/program/libCbc.so.3 +0x1a25ed)
>  #7 in CbcModel::doHeuristicsAtRoot(int) at <null> (engine/instdir/program/libCbc.so.3 +0x34fd61)
>  #8 in CbcModel::branchAndBound(int) at <null> (engine/instdir/program/libCbc.so.3 +0x306fec)
>  #9 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x215c37)
>  #10 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #11 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #12 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #13 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #14 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> CglCliqueHelper.cpp:296:53: runtime error: division by zero
>  #0 in CglClique::createFractionalGraph() at <null> (engine/instdir/program/libCgl.so.1 +0x81b36)
>  #1 in CglClique::generateCuts(OsiSolverInterface const&, OsiCuts&, CglTreeInfo) at <null> (engine/instdir/program/libCgl.so.1 +0x60a26)
>  #2 in CglFakeClique::generateCuts(OsiSolverInterface const&, OsiCuts&, CglTreeInfo) at <null> (engine/instdir/program/libCgl.so.1 +0x72e73)
>  #3 in CbcCutGenerator::generateCuts(OsiCuts&, int, OsiSolverInterface*, CbcNode*) at <null> (engine/instdir/program/libCbc.so.3 +0x8281c)
>  #4 in CbcModel::serialCuts(OsiCuts&, CbcNode*, OsiCuts&, int) at <null> (engine/instdir/program/libCbc.so.3 +0x3f37a6)
>  #5 in CbcModel::solveWithCuts(OsiCuts&, int, CbcNode*) at <null> (engine/instdir/program/libCbc.so.3 +0x35d618)
>  #6 in CbcModel::branchAndBound(int) at <null> (engine/instdir/program/libCbc.so.3 +0x33f172)
>  #7 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x215c37)
>  #8 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #9 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #10 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #11 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #12 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> CglTwomir.cpp:1782:14: runtime error: division by zero
>  #0 in DGG_add2stepToList(DGG_constraint_t*, char*, double*, double*, DGG_list_t*, DGG_data_t*, DGG_constraint_t*) at <null> (engine/instdir/program/libCgl.so.1 +0x5c63ed)
>  #1 in DGG_generateCutsFromBase(DGG_constraint_t*, DGG_list_t*, DGG_data_t*, void const*) at <null> (engine/instdir/program/libCgl.so.1 +0x5c227e)
>  #2 in DGG_generateTabRowCuts(DGG_list_t*, DGG_data_t*, void const*) at <null> (engine/instdir/program/libCgl.so.1 +0x5aa163)
>  #3 in CglTwomir::generateCuts(OsiSolverInterface const&, OsiCuts&, CglTreeInfo) at <null> (engine/instdir/program/libCgl.so.1 +0x59c4bd)
>  #4 in CbcCutGenerator::generateCuts(OsiCuts&, int, OsiSolverInterface*, CbcNode*) at <null> (engine/instdir/program/libCbc.so.3 +0x8281c)
>  #5 in CbcModel::serialCuts(OsiCuts&, CbcNode*, OsiCuts&, int) at <null> (engine/instdir/program/libCbc.so.3 +0x3f3896)
>  #6 in CbcModel::solveWithCuts(OsiCuts&, int, CbcNode*) at <null> (engine/instdir/program/libCbc.so.3 +0x35d61b)
>  #7 in CbcModel::branchAndBound(int) at <null> (engine/instdir/program/libCbc.so.3 +0x33f172)
>  #8 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x215c37)
>  #9 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #10 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #11 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #12 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #13 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> CglGomory.cpp:1317:30: runtime error: 3.84447e+09 is outside the range of representable values of type 'int'
>  #0 in CglGomory::generateCuts(OsiRowCutDebugger const*, OsiCuts&, CoinPackedMatrix const&, CoinPackedMatrix const&, double const*, double const*, double const*, double const*, double const*, char const*, CoinWarmStartBasis const*, CglTreeInfo) at <null> (engine/instdir/program/libCgl.so.1 +0x142933)
>  #1 in CglGomory::generateCuts(OsiSolverInterface const&, OsiCuts&, CglTreeInfo) at <null> (engine/instdir/program/libCgl.so.1 +0x1342e8)
>  #2 in CbcCutGenerator::generateCuts(OsiCuts&, int, OsiSolverInterface*, CbcNode*) at <null> (engine/instdir/program/libCbc.so.3 +0x8281c)
>  #3 in CbcModel::serialCuts(OsiCuts&, CbcNode*, OsiCuts&, int) at <null> (engine/instdir/program/libCbc.so.3 +0x3f3896)
>  #4 in CbcModel::solveWithCuts(OsiCuts&, int, CbcNode*) at <null> (engine/instdir/program/libCbc.so.3 +0x35d61b)
>  #5 in CbcModel::branchAndBound(int) at <null> (engine/instdir/program/libCbc.so.3 +0x33f172)
>  #6 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x215c37)
>  #7 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #8 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #9 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #10 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #11 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I8baaad0d3214da27cc85f76e267d4783dfae81e5
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4150
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit 85b26ba51a219795938c82288e38518d7f9aec5e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206638
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-16 09:13:29 +02:00
Stephan Bergmann b09ba6bfcf Disable the Toolkit XDataTransferProviderAccess unoapi test without DnD
At least for one of my builds, JunitTest_toolkit_unoapi_2's toolkit.Toolkit
fails its XDataTransferProviderAccess check at getDragSource(), which returns
null:

> [toolkit.Toolkit::com::sun::star::awt::XDataTransferProviderAccess::getDragSource()] is testcode: [getDragSource()] - COMPLETED.FAILED

getDragSource has no XDragSource to return without a drag-and-drop capable VCL
backend: when the unoapi soffice runs the svp plugin without --headless,
SalInstance::CreateDragSource skips its GenericDragSource stub (gated on
headless/unittest/uitest) and the svp backend's ImplCreateDragSource returns
null.  (The corresponding getDropTarget only passes because
Window::GetDropTarget always returns a non-null DNDListenerContainer wrapper.)

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I2c76b27e22e99612d8030598f338a78ca7c55ec3
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4187
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit c35ff1648f319723710a9143fbeb9ecf1a7fec70)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206645
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-16 01:20:30 +02:00
Stephan Bergmann 3b7ee6670b Skip zero-area children in the getAccessibleAtPoint test
JunitTest_svtools_unoapi's svtools.AccessibleTabBar failed its
XAccessibleComponent check:

> LOG> Checking child with bounds (0,35),(754,0): 40,():
> LOG> 	StateType containsPoint SHOWING: true
> LOG> finding the point which lies on the component
> LOG> Child found at point (377,35) - OK
> LOG> The children found is not the same
> LOG> Expected:
> LOG> Found:
> LOG> (xAccCh==null: false; expIndex: 3; gotIndex: 0)
> LOG> ... FAILED

The tested object is the first PANEL of a Calc window, which has an empty
SfxInfoBarContainerWindow child: a shown, zero-height accessible at
(0,35),(754,0) overlapping the document panel below it. The test picks each
child's centre and expects getAccessibleAtPoint there to return that child, but
a zero-area child contains no point, so the probe at (377,35) returns the
overlapping document panel (index 0) instead of the container (index 3).

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I3f9b6378c036e26b4ec4c30ee65bc7cd0dba6ac2
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4177
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 9a1c9dc5c46632a858a74930f3432c0f6d76027b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206432
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-14 10:41:40 +02:00
Stephan Bergmann 9cd7ef2e7e external/nss: Fix out-of-bounds read
Ever since 879668c9ba "MOZILLA_CERTIFICATE_FOLDER
needs to be non-empty to disable autodetect..." we have in
engine/solenv/gbuild/gbuild.mk:

> # * Disable searching for certificates by default:
> #
> #  see xmlsecurity/source/xmlsec/nss/nssinitializer.cxx for use
> #
> #  a) If MOZILLA_CERTIFICATE_FOLDER is empty then LibreOffice autodetects
> #  the user's mozilla-descended application profile. To disable that we
> #  use a non-empty string here.
> #
> #  b) Using dbm: appears to nss as equivalent to an empty path so the
> #  initial NSS_InitReadWrite will fail. In response to that failure
> #  LibreOffice will create a temp fallback cert database which is removed
> #  on process exit
> gb_TEST_ENV_VARS += MOZILLA_CERTIFICATE_FOLDER=dbm:

Which leads to a call of NSS_InitReadWrite("dbm:") in nsscrypto_initialize
(engine/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx), which reaches
nss_Init, which recognizes the "dbm:" prefix and strips it, leaving an empty
config directory.  If no root certificate module is loaded yet
(SECMOD_HasRootCerts() is false, which is the case in an environment that has no
NSS root certs) nss_Init then calls nss_FindExternalRoot with that empty path,
causing an out-of-bounds read of path[-1] at

>     if (path[path_len - 1] != FILE_SEP)

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I45d8cbc236b47f6fbf082e5d48bd99abda71e7f0
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4138
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 0cc0fa8ea35441d752aa601921d800c9e479b823)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206355
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-12 12:30:00 +02:00
Stephan Bergmann fc806ad566 UBSan apparently needs ScDrawView RTTI now
...in CppunitTest_sc_sheetview_test

Change-Id: I840d4b76dd67683084bd27bd328b3c264c0ae972
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203047
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit 2ee4aea9ccd34011abd6ee04bf01fe8f140e317b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205646
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-25 10:24:04 +02:00
Stephan Bergmann 5f76dc0194 Avoid premature downcast
With 98cc40cc57 "ubsan: fix downcast",
CppunitTest_sc_vba_macro_test had started to occasionally fail for me with

> svx/source/sidebar/area/AreaPropertyPanelBase.cxx:1091:62: runtime error: downcast of address 0x7b0316a41b20 which does not point to an object of type 'const XFillTransparenceItem'
> 0x7b0316a41b20: note: object is of type '(anonymous namespace)::InvalidItem'
>  00 00 00 00  10 a4 5b 16 03 7b 00 00  00 00 00 00 00 00 00 00  00 00 00 00 09 00 00 00  00 00 00 00
>               ^~~~~~~~~~~~~~~~~~~~~~~
>               vptr for '(anonymous namespace)::InvalidItem'
>  #0 in svx::sidebar::AreaPropertyPanelBase::NotifyItemUpdate(unsigned short, SfxItemState, SfxPoolItem const*) at svx/source/sidebar/area/AreaPropertyPanelBase.cxx:1091:62
>  #1 in sfx2::sidebar::ControllerItem::ReceiverNotifyItemUpdate(unsigned short, SfxItemState, SfxPoolItem const*) at sfx2/source/sidebar/ControllerItem.cxx:65:26
>  #2 in sfx2::sidebar::ControllerItem::StateChangedAtToolBoxControl(unsigned short, SfxItemState, SfxPoolItem const*) at sfx2/source/sidebar/ControllerItem.cxx:73:5
>  #3 in SfxStateCache::SetState_Impl(SfxItemState, SfxPoolItem const*, bool) at sfx2/source/control/statcach.cxx:428:24
>  #4 in SfxStateCache::SetState(SfxItemState, SfxPoolItem const*, bool) at sfx2/source/control/statcach.cxx:335:5
>  #5 in SfxBindings::UpdateControllers_Impl(SfxFoundCache_Impl const&, SfxPoolItem const*, SfxItemState) at sfx2/source/control/bindings.cxx:1188:16
>  #6 in SfxBindings::Update_Impl(SfxStateCache&) at sfx2/source/control/bindings.cxx:278:17
>  #7 in SfxBindings::NextJob_Impl(Timer const*) at sfx2/source/control/bindings.cxx:1264:17
>  #8 in SfxBindings::NextJob(Timer*) at sfx2/source/control/bindings.cxx:1209:5
>  #9 in SfxBindings::LinkStubNextJob(void*, Timer*) at sfx2/source/control/bindings.cxx:1204:25
>  #10 in Link<Timer*, void>::Call(Timer*) const at include/tools/link.hxx:105:45
>  #11 in Timer::Invoke() at vcl/source/app/timer.cxx:75:21
>  #12 in Scheduler::CallbackTaskScheduling() at vcl/source/app/scheduler.cxx:615:20
>  #13 in SalTimer::CallCallback() at vcl/inc/saltimer.hxx:53:13
>  #14 in SvpSalInstance::CheckTimeout(bool) at vcl/headless/svpinst.cxx:171:53
>  #15 in SvpSalInstance::ImplYield(bool, bool) at vcl/headless/svpinst.cxx:447:17
>  #16 in SvpSalInstance::DoYield(bool, bool) at vcl/headless/svpinst.cxx:519:21
>  #17 in InnerYield(bool, bool) at vcl/source/app/svapp.cxx:389:48
>  #18 in Application::Reschedule(bool) at vcl/source/app/svapp.cxx:415:17
>  #19 in SbiRuntime::Step() at basic/source/runtime/runtime.cxx:775:17
>  #20 in (anonymous namespace)::RunInitGuard::run() at basic/source/classes/sbxmod.cxx:1029:27
>  #21 in SbModule::Run(SbMethod*) at basic/source/classes/sbxmod.cxx:1189:31
>  #22 in SbModule::Notify(SfxBroadcaster&, SfxHint const&) at basic/source/classes/sbxmod.cxx:783:17
>  #23 in SfxBroadcaster::Broadcast(SfxHint const&) at svl/source/notify/SfxBroadcaster.cxx:43:24
>  #24 in SbMethod::Broadcast(SfxHintId) at basic/source/classes/sbxmod.cxx:2124:20
>  #25 in SbxValue::SbxValue(SbxValue const&) at basic/source/sbx/sbxvalue.cxx:67:36
>  #26 in SbxVariable::SbxVariable(SbxVariable const&) at basic/source/sbx/sbxvar.cxx:48:7
>  #27 in SbxMethod::SbxMethod(SbxMethod const&) at basic/source/sbx/sbxobj.cxx:841:7
>  #28 in SbiRuntime::FindElement(SbxObject*, unsigned int, unsigned int, ErrCode, bool, bool) at basic/source/runtime/runtime.cxx:3700:37
>  #29 in SbiRuntime::StepFIND_Impl(SbxObject*, unsigned int, unsigned int, ErrCode, bool) at basic/source/runtime/runtime.cxx:4142:14
>  #30 in SbiRuntime::StepFIND(unsigned int, unsigned int) at basic/source/runtime/runtime.cxx:4148:5
>  #31 in SbiRuntime::Step() at basic/source/runtime/runtime.cxx:805:13
>  #32 in (anonymous namespace)::RunInitGuard::run() at basic/source/classes/sbxmod.cxx:1029:27
>  #33 in SbModule::Run(SbMethod*) at basic/source/classes/sbxmod.cxx:1189:31
>  #34 in SbModule::Notify(SfxBroadcaster&, SfxHint const&) at basic/source/classes/sbxmod.cxx:783:17
>  #35 in SfxBroadcaster::Broadcast(SfxHint const&) at svl/source/notify/SfxBroadcaster.cxx:43:24
>  #36 in SbMethod::Broadcast(SfxHintId) at basic/source/classes/sbxmod.cxx:2124:20
>  #37 in SbxValue::SbxValue(SbxValue const&) at basic/source/sbx/sbxvalue.cxx:67:36
>  #38 in SbxVariable::SbxVariable(SbxVariable const&) at basic/source/sbx/sbxvar.cxx:48:7
>  #39 in SbxMethod::SbxMethod(SbxMethod const&) at basic/source/sbx/sbxobj.cxx:841:7
>  #40 in SbiRuntime::FindElement(SbxObject*, unsigned int, unsigned int, ErrCode, bool, bool) at basic/source/runtime/runtime.cxx:3700:37
>  #41 in SbiRuntime::StepFIND_Impl(SbxObject*, unsigned int, unsigned int, ErrCode, bool) at basic/source/runtime/runtime.cxx:4142:14
>  #42 in SbiRuntime::StepFIND(unsigned int, unsigned int) at basic/source/runtime/runtime.cxx:4148:5
>  #43 in SbiRuntime::Step() at basic/source/runtime/runtime.cxx:805:13
>  #44 in (anonymous namespace)::RunInitGuard::run() at basic/source/classes/sbxmod.cxx:1029:27
>  #45 in SbModule::Run(SbMethod*) at basic/source/classes/sbxmod.cxx:1189:31
>  #46 in SbModule::Notify(SfxBroadcaster&, SfxHint const&) at basic/source/classes/sbxmod.cxx:783:17
>  #47 in SfxBroadcaster::Broadcast(SfxHint const&) at svl/source/notify/SfxBroadcaster.cxx:43:24
>  #48 in SbMethod::Broadcast(SfxHintId) at basic/source/classes/sbxmod.cxx:2124:20
>  #49 in SbxValue::Get(SbxValues&) const at basic/source/sbx/sbxvalue.cxx:289:16
>  #50 in SbMethod::Call(SbxValue*, SbxVariable*) at basic/source/classes/sbxmod.cxx:2080:5
>  #51 in basprov::BasicScriptImpl::invoke(com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, com::sun::star::uno::Sequence<short>&, com::sun::star::uno::Sequence<com::sun::star::uno::Any>&) at scripting/source/basprov/basscript.cxx:262:35
>  #52 in non-virtual thunk to basprov::BasicScriptImpl::invoke(com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, com::sun::star::uno::Sequence<short>&, com::sun::star::uno::Sequence<com::sun::star::uno::Any>&) at scripting/source/basprov/basscript.cxx
>  #53 in SfxObjectShell::CallXScript(com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, com::sun::star::uno::Any&, com::sun::star::uno::Sequence<short>&, com::sun::star::uno::Sequence<com::sun::star::uno::Any>&, bool, com::sun::star::uno::Any const*) at sfx2/source/doc/objmisc.cxx:1557:25
>  #54 in UnoApiTest::executeMacro(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) at test/source/unoapi_test.cxx:341:22
>  #55 in testVba::TestBody() at sc/qa/extras/vba-macro-test.cxx:425:25

Change-Id: Ic99db107d01400ceb4783915b361133399ec39d2
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/35
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit fe8240112db49c6713bccc15c4cc6d4f77f19648)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205207
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-05-15 08:32:02 +02:00
Stephan Bergmann 811769f009 Consistently use __EMSCRIPTEN__ instead of EMSCRIPTEN macro
...as emsdk 5.0.3 deprecated the predefined EMSCRIPTEN macro (see
<https://github.com/emscripten-core/emscripten/commit/506052bd8b4e23ded7f2351c62ca3b24d40c8cf3>
"Warn about usage of deprecated EMSCRIPTEN macro. NFC (#26381)"), causing
failures like

> In file included from static/source/unoembindhelpers/PrimaryBindings.cxx:29:
> In file included from include/sfx2/viewsh.hxx:35:
> In file included from include/editeng/outliner.hxx:32:
> In file included from include/tools/color.hxx:26:
> include/osl/endian.h:66:15: error: macro 'EMSCRIPTEN' has been marked as deprecated: use __EMSCRIPTEN__ instead [-Werror,-Wdeprecated-pragma]
>    66 | #elif defined EMSCRIPTEN
>       |               ^
> /home/sberg/emsdk/5.0.4/emsdk/emscripten/main/cache/sysroot/include/emscripten/emscripten.h:35:66: note: macro marked 'deprecated' here
>    35 | #pragma clang deprecated(EMSCRIPTEN, "use __EMSCRIPTEN__ instead")
>       |                                                                  ^

To avoid confusion, also suppress the -D$(OS) in
solenv/gbuild/platform/unxgcc.mk that would unnecessarily keep defining
EMSCRIPTEN.

Change-Id: Ic1f187cf1c6417cd95d4092e9cea01a665bd1b2f
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/34
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 50291c2ed83bdb49bb827a4a12905d94b8c42035)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205167
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-05-14 10:11:38 +02:00
Stephan Bergmann f403d56b9a jsuno: Return script's last expression value (as JSON)
Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I009d60d36a1279b42d12fa4e3b0369aeab4af51e
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2078
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit daf47e0b734a0985fe5051ac1ce62c5fbed82802)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205119
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-05-13 09:05:59 +02:00
Stephan Bergmann 368792e83c jsuno: Throw css.script.provider.ScriptExceptionRaisedException on JS errors
Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: Ia5df077d78b1650e28bf73716a10fdbd024f6e8a
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2077
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit a4feac2f06bf3d1a6ed55a94dd5e05d01fc0f7c4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205118
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-05-13 09:05:48 +02:00
Stephan Bergmann bedeae9485 jsuno: flush std::cout after each console.log line
...to better accommodate to scenarios where the engine's stdout is piped (e.g.,
under online's `make run | tee`)

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I991b206746723f206c84052c3440cd95b42fb9de
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1832
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit 695993c5dfb3f8126d9cc2cd89daa9e921f160a1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205117
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-05-13 09:05:38 +02:00
Stephan Bergmann faeda637f6 Add JS generator support for css.container.XEnumerationAccess
...similar to
<https://github.com/allotropia/zetajs/commit/ea7bfb5ac1ede0aa3ed92bb14e55ddaadcd23d22>
"Add JS generator support for css.container.XEnumerationAccess"

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I793045d534e3b2a62de24c44689797ec24d3d555
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1612
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit ef35e615ea97b0cd6526b0935a7da5d57cd3a535)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205116
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-05-13 09:05:30 +02:00
Stephan Bergmann da6eea908e Fix heap-use-after-free
...as uncovered by 448426998cc561414ec250d0dc7f0a72ea10c757 "lsan:fix leak of
VbaEventsHelperBase instances" in UITest_calc_tests9,

> ==3008693==ERROR: AddressSanitizer: heap-use-after-free on address 0x7c90789fc488 at pc 0x7b70220491ba bp 0x7ffc8e6e67a0 sp 0x7ffc8e6e6798
> READ of size 8 at 0x7c90789fc488 thread T0
>  #0 in osl::Mutex::release() at include/osl/mutex.hxx:77:37
>  #1 in osl::Guard<osl::Mutex>::~Guard() at include/osl/mutex.hxx:146:17
>  #2 in ScVbaEventListener::processWindowResizeEvent(void*) at sc/source/ui/vba/vbaeventshelper.cxx:515:1
>  #3 in ScVbaEventListener::LinkStubprocessWindowResizeEvent(void*, void*) at sc/source/ui/vba/vbaeventshelper.cxx:478:32
>  #4 in Link<void*, void>::Call(void*) const at include/tools/link.hxx:105:45
>  #5 in ImplHandleUserEvent(ImplSVEvent*) at vcl/source/window/winproc.cxx:2311:30
>  #6 in ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) at vcl/source/window/winproc.cxx:2868:13
>  #7 in SalFrame::CallCallback(SalEvent, void const*) const at vcl/inc/salframe.hxx:310:29
>  #8 in SvpSalInstance::ProcessEvent(SalUserEventList::SalUserEvent) at vcl/headless/svpinst.cxx:289:22
>  #9 in non-virtual thunk to SvpSalInstance::ProcessEvent(SalUserEventList::SalUserEvent) at vcl/headless/svpinst.cxx
>  #10 in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const at vcl/source/app/salusereventlist.cxx:119:58
>  #11 in SalUserEventList::DispatchUserEvents(bool) at vcl/source/app/salusereventlist.cxx:120:13
>  #12 in SvpSalInstance::ImplYield(bool, bool) at vcl/headless/svpinst.cxx:442:22
>  #13 in SvpSalInstance::DoYield(bool, bool) at vcl/headless/svpinst.cxx:519:21
>  #14 in InnerYield(bool, bool) at vcl/source/app/svapp.cxx:389:48
>  #15 in Application::Yield() at vcl/source/app/svapp.cxx:502:5
>  #16 in Application::Execute() at vcl/source/app/svapp.cxx:364:13
>  #17 in desktop::Desktop::Main() at desktop/source/app/app.cxx:1681:13
>
> 0x7c90789fc488 is located 72 bytes inside of 264-byte region [0x7c90789fc440,0x7c90789fc548)
> freed by thread T0 here:
>  #0 in free at ~/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:51:3
>  #1 in rtl_freeMemory at sal/rtl/alloc_global.cxx:43:5
>  #2 in cppu::OWeakObject::operator delete(void*) at include/cppuhelper/weak.hxx:88:11
>  #3 in ScVbaEventListener::~ScVbaEventListener() at sc/source/ui/vba/vbaeventshelper.cxx:120:7
>  #4 in cppu::OWeakObject::release() at cppuhelper/source/weak.cxx:230:9
>  #5 in cppu::WeakImplHelper<com::sun::star::awt::XTopWindowListener, com::sun::star::awt::XWindowListener, com::sun::star::frame::XBorderResizeListener, com::sun::star::util::XChangesListener>::release() at include/cppuhelper/implbase.hxx:115:66
>  #6 in ScVbaEventListener::processWindowResizeEvent(void*) at sc/source/ui/vba/vbaeventshelper.cxx:514:5

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I150e2b0da80aa816c3c4b9650ee92d0604e14790
(cherry-picked from commit I150e2b0da80aa816c3c4b9650ee92d0604e14790)
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2310
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205024
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-05-10 15:14:33 +02:00
Stephan Bergmann f072c00d6f Fix numeric_limits::min() used as max initial value
Since 51ea035a6f "tdf#151876 speedup editing large
chart", PerXMinMaxCalculator::getTotalRange and PerXMinMaxCalculator::setValue
used std::numeric_limits<double>::min() to initialize maximum accumulators.  But
which yields the smallest positive normal value (~2.2e-308), not the most
negative value that is apparently asked for here:  When all Y values in a chart
are zero, the accumulated max (0.0) never exceeded that initial sentinel, so the
Y axis maximum stayed at ~2.2e-308.  This near-zero range then caused division
to produce infinity in the coordinate transformation matrix
(FIXED_SIZE_FOR_3D_CHART_VOLUME / 2.2e-308), and the subsequent 0 * inf
multiplication produced NaN.  Which happened to trigger UBSan
float-cast-overflow now in a recently introduced test, where
sc/qa/unit/data/ods/fdo67682-2.ods contains a chart with all-zero Y values on a
date axis (see the comment at
<https://gerrit.libreoffice.org/c/core/+/202711/2#message-c97f2d62213a38df4ed8a5610ae6a699a902af3b>
"XLSX: merge standalone locale prefix with currency bracket" for details).

Change-Id: I3042f589e7aed08fec17588045572fa7abe4b98e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203038
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit db3a1e9323cd8f81d9296835d2d139232bc3c150)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204961
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-09 14:17:48 +02:00
Stephan Bergmann ccc9e61ba4 external/redland: Fix stack-buffer-overflow on key dereference
...as seen once during CppunitTest_sw_odfexport4,

> ==866789==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7b809fb6b840 at pc 0x7f80a848e8fe bp 0x7ffe1b257020 sp 0x7ffe1b2567d0
> READ of size 141 at 0x7b809fb6b840 thread T0
>  #0 in MemcmpInterceptorCommon(void*, int (*)(void const*, void const*, unsigned long), void const*, void const*, unsigned long) at ~/github.com/llvm/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:849:7
>  #1 in memcmp at ~/github.com/llvm/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:881:10
>  #2 in librdf_hash_memory_delete_key_value at engine/workdir/UnpackedTarball/redland/src/rdf_hash_memory.c:913:41
>  #3 in librdf_hash_delete at engine/workdir/UnpackedTarball/redland/src/rdf_hash.c:965:10
>  #4 in librdf_storage_hashes_add_remove_statement at engine/workdir/UnpackedTarball/redland/src/rdf_storage_hashes.c:713:14
>  #5 in librdf_storage_hashes_context_remove_statement at engine/workdir/UnpackedTarball/redland/src/rdf_storage_hashes.c:1537:6
>  #6 in librdf_storage_context_remove_statement at engine/workdir/UnpackedTarball/redland/src/rdf_storage.c:1595:10
>  #7 in librdf_model_storage_context_remove_statement at engine/workdir/UnpackedTarball/redland/src/rdf_model_storage.c:470:10
>  #8 in librdf_model_context_remove_statement at engine/workdir/UnpackedTarball/redland/src/rdf_model.c:1338:10
>  #9 in (anonymous namespace)::librdf_Repository::removeStatementsGraph_NoLock(com::sun::star::uno::Reference<com::sun::star::rdf::XResource> const&, com::sun::star::uno::Reference<com::sun::star::rdf::XURI> const&, com::sun::star::uno::Reference<com::sun::star::rdf::XNode> const&, com::sun::star::uno::Reference<com::sun::star::rdf::XURI> const&) at engine/unoxml/source/rdf/librdf_repository.cxx:1935:13
>  #10 in (anonymous namespace)::librdf_NamedGraph::removeStatements(com::sun::star::uno::Reference<com::sun::star::rdf::XResource> const&, com::sun::star::uno::Reference<com::sun::star::rdf::XURI> const&, com::sun::star::uno::Reference<com::sun::star::rdf::XNode> const&) at engine/unoxml/source/rdf/librdf_repository.cxx:821:11
>  #11 in SwRDFHelper::clearStatements(rtl::Reference<SwXTextDocument> const&, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::rdf::XResource> const&) at engine/sw/source/core/doc/rdfhelper.cxx:164:21
>  #12 in SwTextNode::DestroyAttr(SwTextAttr*) at engine/sw/source/core/txtnode/thints.cxx:1294:17
>  #13 in SwTextNode::EraseText(SwContentIndex const&, int, SwInsertFlags) at engine/sw/source/core/txtnode/ndtxt.cxx:2920:13
>  #14 in SwTextNode::EraseText(SwPosition const&, int, SwInsertFlags) at engine/sw/source/core/txtnode/ndtxt.cxx:2848:5
>  #15 in SwUndoDelete::SaveContent(SwPosition const*, SwPosition const*, SwTextNode*, SwTextNode*) at engine/sw/source/core/undo/undel.cxx:476:21
>  #16 in SwUndoDelete::SwUndoDelete(SwPaM&, SwDeleteFlags, bool, bool) at engine/sw/source/core/undo/undel.cxx:264:22
>  #17 in std::__detail::_MakeUniq<SwUndoDelete>::__single_object std::make_unique<SwUndoDelete, SwPaM&, SwDeleteFlags const&>(SwPaM&, SwDeleteFlags const&) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/unique_ptr.h:1086:34
>  #18 in sw::DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM&, SwDeleteFlags) at engine/sw/source/core/doc/DocumentContentOperationsManager.cxx:4600:54
>  #19 in sw::DocumentContentOperationsManager::DeleteRangeImpl(SwPaM&, SwDeleteFlags) at engine/sw/source/core/doc/DocumentContentOperationsManager.cxx:4526:26
>  #20 in sw::DocumentContentOperationsManager::DeleteAndJoinImpl(SwPaM&, SwDeleteFlags) at engine/sw/source/core/doc/DocumentContentOperationsManager.cxx:4497:26
>  #21 in (anonymous namespace)::lcl_DoWithBreaks(sw::DocumentContentOperationsManager&, SwPaM&, SwDeleteFlags, bool (sw::DocumentContentOperationsManager::*)(SwPaM&, SwDeleteFlags)) at engine/sw/source/core/doc/DocumentContentOperationsManager.cxx:688:20
>  #22 in sw::DocumentContentOperationsManager::DeleteAndJoin(SwPaM&, SwDeleteFlags) at engine/sw/source/core/doc/DocumentContentOperationsManager.cxx:2395:22
>  #23 in SwXMeta::dispose() at engine/sw/source/core/unocore/unorefmk.cxx:868:50
>  #24 in SwXMetaField::dispose() at engine/sw/source/core/unocore/unorefmk.cxx:1241:21
>  #25 in SwXText::removeTextContent(com::sun::star::uno::Reference<com::sun::star::text::XTextContent> const&) at engine/sw/source/core/unocore/unotext.cxx:745:15
>  #26 in (anonymous namespace)::lcl_RemoveParagraphMetadataField(com::sun::star::uno::Reference<com::sun::star::text::XTextField> const&) at engine/sw/source/core/edit/edfcol.cxx:539:28
>  #27 in lcl_ApplyParagraphClassification(SwDoc*, rtl::Reference<SwXTextDocument> const&, rtl::Reference<SwXParagraph> const&, com::sun::star::uno::Reference<com::sun::star::rdf::XResource> const&, std::__debug::vector<svx::ClassificationResult, std::allocator<svx::ClassificationResult>>) at engine/sw/source/core/edit/edfcol.cxx:1182:9
>  #28 in SwEditShell::RestoreMetadataFieldsAndValidateParagraphSignatures() at engine/sw/source/core/edit/edfcol.cxx:2010:13
>  #29 in SwEditShell::SwEditShell(SwDoc&, vcl::Window*, SwViewOption const*) at engine/sw/source/core/edit/edws.cxx:58:5
>  #30 in SwFEShell::SwFEShell(SwDoc&, vcl::Window*, SwViewOption const*) at engine/sw/source/core/frmedt/fews.cxx:688:7
>  #31 in SwWrtShell::SwWrtShell(SwDoc&, vcl::Window*, SwView&, SwViewOption const*) at engine/sw/source/uibase/wrtsh/wrtsh1.cxx:2141:7
>  #32 in SwView::SwView(SfxViewFrame&, SfxViewShell*) at engine/sw/source/uibase/uiview/view.cxx:924:31
>  #33 in SwView::CreateInstance(SfxViewFrame&, SfxViewShell*) at engine/sw/source/uibase/uiview/view0.cxx:82:28
>  #34 in SfxViewFactory::CreateInstance(SfxViewFrame&, SfxViewShell*) at engine/sfx2/source/view/viewfac.cxx:26:12
>  #35 in SfxBaseModel::createViewController(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) at engine/sfx2/source/doc/sfxbasemodel.cxx:4346:46
>  #36 in non-virtual thunk to SfxBaseModel::createViewController(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) at engine/sfx2/source/doc/sfxbasemodel.cxx
>  #37 in (anonymous namespace)::SfxFrameLoader_Impl::impl_createDocumentView(com::sun::star::uno::Reference<com::sun::star::frame::XModel2> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, comphelper::NamedValueCollection const&, rtl::OUString const&) at engine/sfx2/source/view/frmload.cxx:586:60
>  #38 in (anonymous namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) at engine/sfx2/source/view/frmload.cxx:813:13
>  #39 in framework::LoadEnv::impl_loadContent() at engine/framework/source/loadenv/loadenv.cxx:1172:37
>  #40 in framework::LoadEnv::start() at engine/framework/source/loadenv/loadenv.cxx:408:20
>  #41 in framework::LoadEnv::startLoading(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, rtl::OUString const&, int, LoadEnvFeatures) at engine/framework/source/loadenv/loadenv.cxx:304:5
>  #42 in framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at engine/framework/source/loadenv/loadenv.cxx:168:14
>  #43 in framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at engine/framework/source/services/desktop.cxx:594:16
>  #44 in non-virtual thunk to framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at engine/framework/source/services/desktop.cxx
>  #45 in unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at engine/unotest/source/cpp/macros_test.cxx:74:62
>  #46 in UnoApiTest::loadWithParams(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at engine/test/source/unoapi_test.cxx:323:19
>  #47 in UnoApiTest::loadFromURL(rtl::OUString const&, char const*) at engine/test/source/unoapi_test.cxx:305:5
>  #48 in SwModelTestBase::loadURL(rtl::OUString const&, char const*) at engine/sw/qa/unit/swmodeltestbase.cxx:382:5
>  #49 in SwModelTestBase::saveAndReload(TestFilter, char const*) at engine/sw/qa/unit/swmodeltestbase.cxx:393:5
>  #50 in SwModelTestBase::executeLoadVerifyReloadVerify(char const*, TestFilter) at engine/sw/qa/unit/swmodeltestbase.cxx:69:5
>  #51 in (anonymous namespace)::testTdf160877::Load_Verify_Reload_Verify() at engine/sw/qa/extras/odfexport/odfexport4.cxx:1199:1
>
> Address 0x7b809fb6b840 is located in stack of thread T0 at offset 64 in frame
>  #0 in librdf_storage_hashes_add_remove_statement at engine/workdir/UnpackedTarball/redland/src/rdf_storage_hashes.c:632
>
>   This frame has 2 object(s):
>     [32, 64) 'hd_key' (line 648)
>     [96, 128) 'hd_value' (line 648) <== Memory access at offset 64 partially underflows this variable

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I5ad3b66055440fdfdef93c33b766435b87da53ca
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1896
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit b0c56121dbc8c31ded8ae8bdd8a288a69b5c2f26)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204797
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-05 14:21:05 +02:00
Stephan Bergmann 6b31c63ec7 QuickJS-based JS UNO support
Somewhat loosely based on <https://github.com/allotropia/zetajs>.

Main part that is still missing from this WIP commit is implementing UNO objects
in JS.  (And there are a number of TODOs throughout, mostly regarding error
handling.)

===
Comments from Neil Roberts:

This patch was cherry-picked from
1cd8ad398b38763cb3578f1305a28e7774163714 in Collabora’s repo. The
following changes were made in order to get it to pass the CI:

* The unit test has been modified to continue using embindtest instead
  of testuno.
* The name of the external library is quickjs instead of qjs because a
  different patch is used to add the external QuickJS package.
* The asserts on argc that were captured in the lambda function have been
  moved outside of the lambda function in order to avoid having an unused
  capture on release builds. The argc parameter has then been marked as
  [[maybe_unused]].
* The constructors for JSClassDef have been changed to consistently use
  { } brace initialisers because otherwise it fails to build on macOS.
===

Change-Id: I8810e43fe5f3e4b1a53a654070fe87e95f51231a
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/190
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203963
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-04-30 10:38:54 +02:00
Stephan Bergmann 06722ab080 -Werror,-Wundef (Emscripten)
Change-Id: I214ab5ad19173372849bf43a11a66f3c0b052238
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202930
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-03-29 12:55:28 +02:00
Stephan Bergmann abb0783c0a ScTokenArray needs to be a complete type here
...after 865521aee1b989afd2c994bbbdc6a5e319940d92 "tdf#166791 sc: handle
copy/paste when selection overlaps array formulas",

> In file included from sc/source/ui/docshell/arealink.cxx:20:
> In file included from include/sfx2/fcontnr.hxx:25:
> In file included from include/rtl/ustring.hxx:45:
> In file included from include/rtl/string.hxx:51:
> In file included from include/rtl/stringconcat.hxx:22:
> In file included from /usr/lib/gcc/x86_64-redhat-linux/16/../../../../include/c++/16/memory:80:
> /usr/lib/gcc/x86_64-redhat-linux/16/../../../../include/c++/16/bits/unique_ptr.h:90:16: error: invalid application of 'sizeof' to an incomplete type 'ScTokenArray'
>    90 |         static_assert(sizeof(_Tp)>0,
>       |                       ^~~~~~~~~~~
> /usr/lib/gcc/x86_64-redhat-linux/16/../../../../include/c++/16/bits/unique_ptr.h:398:4: note: in instantiation of member function 'std::default_delete<ScTokenArray>::operator()' requested here
>   398 |           get_deleter()(std::move(__ptr));
>       |           ^
> sc/source/ui/inc/undoblk.hxx:759:84: note: in instantiation of member function 'std::unique_ptr<ScTokenArray>::~unique_ptr' requested here
>   759 |                                        std::unique_ptr<ScTokenArray> pTokenArray = nullptr );
>       |                                                                                    ^
> sc/inc/rangenam.hxx:33:7: note: forward declaration of 'ScTokenArray'
>    33 | class ScTokenArray;
>       |       ^

Change-Id: I40f7b71c913f3cd3bd17cf943e57e2401c29fb23
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202690
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-03-27 08:00:26 +01:00
Stephan Bergmann 843122769d XMLPropertyState must be a complete type here
...contrary to what 0a42ddbdf1 "tdf#146619 Use
more forward declarations in include/xmloff" apparently assumed,

> [CXX] linguistic/source/convdic.cxx
> C:\PROGRA~1\MICROS~3\2022\COMMUN~1\VC\Tools\MSVC\1444~1.352\Include\span(75): error C2036: 'const XMLPropertyState *': unknown size
> C:\PROGRA~1\MICROS~3\2022\COMMUN~1\VC\Tools\MSVC\1444~1.352\Include\span(75): note: the template instantiation context (the oldest one first) is
> include\xmloff/txtparae.hxx(404): note: see reference to class template instantiation 'std::span<const XMLPropertyState,18446744073709551615>' being compiled
> C:\PROGRA~1\MICROS~3\2022\COMMUN~1\VC\Tools\MSVC\1444~1.352\Include\xutility(2184): note: while evaluating concept 'input_iterator<std::_Span_iterator<XMLPropertyState const > >'
> C:\PROGRA~1\MICROS~3\2022\COMMUN~1\VC\Tools\MSVC\1444~1.352\Include\xutility(984): note: while evaluating concept 'input_or_output_iterator<std::_Span_iterator<XMLPropertyState const > >'
> C:\PROGRA~1\MICROS~3\2022\COMMUN~1\VC\Tools\MSVC\1444~1.352\Include\__msvc_iter_core.hpp(403): note: see reference to class template instantiation 'std::_Span_iterator<_Ty>' being compiled
> with
> [
> _Ty=const XMLPropertyState
> ]
> C:\PROGRA~1\MICROS~3\2022\COMMUN~1\VC\Tools\MSVC\1444~1.352\Include\span(70): note: while compiling class template member function 'std::_Span_iterator<_Ty> &std::_Span_iterator<_Ty>::operator --(void) noexcept'
> with
> [
> _Ty=const XMLPropertyState
> ]
> C:\PROGRA~1\MICROS~3\2022\COMMUN~1\VC\Tools\MSVC\1444~1.352\Include\xutility(1839): note: see the first reference to 'std::_Span_iterator<_Ty>::operator --' in 'std::iter_move'
> with
> [
> _Ty=const XMLPropertyState
> ]
> C:\PROGRA~1\MICROS~3\2022\COMMUN~1\VC\Tools\MSVC\1444~1.352\Include\xutility(857): note: see the first reference to 'std::iter_move' in 'std::ranges::_Iter_move::_Cpo::operator ()'
> C:\PROGRA~1\MICROS~3\2022\COMMUN~1\VC\Tools\MSVC\1444~1.352\Include\xutility(881): note: see the first reference to 'std::ranges::_Iter_move::_Cpo::operator ()' in 'std::_Indirectly_readable_impl<std::reverse_iterator<std::_Span_iterator<_Ty>>>'
> with
> [
> _Ty=const XMLPropertyState
> ]

Change-Id: Ifd2f07f1dadf26516a8732dde1fed757af5e8e96
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201475
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2026-03-11 22:21:17 +01:00
Stephan Bergmann c6302b4eda Support Clang -shared-libsan
...instead of using the default -static-libsan, where dynamic libraries must be
built without -z defs and where all executables must link against the static
libsan.  Dropping the latter requirement means that we no longer need the static
sal hack in Library_jpipe.

But instead, at runtime, when a process loads any library that links against the
dynamic libsan, then that dynamic libsan must be loaded first into the process.
For executables that are themselves linked against the dynamic libsan, that is
already the case.  For scenarios where we invoke a Java executable, we now use
LD_PRELOAD to fulfil that requirement.  (And for invocation of Python
executables, this commit assumes a --enable-python=fully-internal configuration,
so that executable will be itself linked against the dynamic libsan.)

Dropping the requirement to build without -z defs revealed that using
-fsanitize=vptr often requires RTTI symbols from libraries that are not usually
linked against.  Such cases are now handled by conditionally including those
libraries in gb_*_use_libraries calls.  (This could be restricted even further
to only be done under -shared-libsan, but it arguably doesn't hurt to also do it
under the default -static-libsan.)

The expectation is that -shared-libsan will explicitly be passed into the
configuration along with any other -fsanitize... arguments via
--with-extra-cc-flags and --with-extra-cxx-flags.  This commit does not yet
remove the code that is only needed for the (default) -static-libsan caes, but
that code could eventually be cleaned up, once all (Clang) builds using
sanitizers use -shared-libsan.  (GCC already defaults to a shared model.
Instead of a combined -shared-libsan, it has individual -shared-libasan etc.,
though.  This commit does not intend to make any changes to any potential GCC
sanitizer builds; my assumption is that we do not have any such, and that they
wouldn't work out of the box, neither before nor after this change.)

Change-Id: I932e4b75c299c158211e122adf33d7988892a87e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200935
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-03-04 12:37:18 +01:00
Stephan Bergmann b475873cd0 Stop using gb_CppunitTest_use_library_objects in CppunitTest_oox_tokenmap
...by simply making the two used functions OOX_DLLPUBLIC.

This solves an issue for mergelibs builds, where
09605513f4 "SmartArt: Progress in standard
FileFormat RoundTrip" had started to make this test fail with

> cppunittester: oox/source/drawingml/diagram/diagramhelper_oox.cxx:542: oox::drawingml::DiagramHelperFactory_oox::DiagramHelperFactory_oox(): Assertion `nullptr == pSingleGlobalDiagramHelperFactory_svx && "DiagramHelperFactory initialized multiple times (!)"' failed.

as that

> static DiagramHelperFactory_oox aSingleGlobalDiagramHelperFactory_oox;

in oox/source/drawingml/diagram/diagramhelper_oox.cxx was present twice now in
the process, in workdir/LinkTarget/CppunitTest/libtest_oox_tokenmap.so and in
instdir/program/libmergedlo.so.

Change-Id: I9c7ea35339a188c427a50e18d7eb7978e63e52fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200931
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-03-04 12:36:00 +01:00
Stephan Bergmann 921f41924f external/libnumbertext: Silence -Werror,-Wdeprecated-declarations
...when building against emsdk 5.0.2,

> In file included from Numbertext.cxx:6:
> In file included from ~/emsdk/5.0.2/emsdk/emscripten/main/cache/sysroot/include/c++/v1/locale:203:
> ~/emsdk/5.0.2/emsdk/emscripten/main/cache/sysroot/include/c++/v1/__locale_dir/wstring_convert.h:179:1: error: 'wstring_convert<std::codecvt_utf8<wchar_t>>' is deprecated [-Werror,-Wdeprecated-declarations]
>   179 | wstring_convert<_Codecvt, _Elem, _WideAlloc, _ByteAlloc>::to_bytes(const _Elem* __frm, const _Elem* __frm_end) {
>       | ^
> ~/emsdk/5.0.2/emsdk/emscripten/main/cache/sysroot/include/c++/v1/__locale_dir/wstring_convert.h:83:12: note: in instantiation of member function 'std::wstring_convert<std::codecvt_utf8<wchar_t>>::to_bytes' requested here
>    83 |     return to_bytes(__wstr.data(), __wstr.data() + __wstr.size());
>       |            ^
> Numbertext.cxx:160:22: note: in instantiation of member function 'std::wstring_convert<std::codecvt_utf8<wchar_t>>::to_bytes' requested here
>   160 |     return converter.to_bytes( s );
>       |                      ^
> ~/emsdk/5.0.2/emsdk/emscripten/main/cache/sysroot/include/c++/v1/__locale_dir/wstring_convert.h:34:7: note: 'wstring_convert<std::codecvt_utf8<wchar_t>>' has been explicitly marked deprecated here
>    34 | class _LIBCPP_DEPRECATED_IN_CXX17 wstring_convert {
>       |       ^
> ~/emsdk/5.0.2/emsdk/emscripten/main/cache/sysroot/include/c++/v1/__config:740:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
>   740 | #    define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
>       |                                         ^
> ~/emsdk/5.0.2/emsdk/emscripten/main/cache/sysroot/include/c++/v1/__config:713:49: note: expanded from macro '_LIBCPP_DEPRECATED'
>   713 | #      define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
>       |                                                 ^

So following up on ad6ba4a3a6
"external/libnumbertext: Silence -Werror,-Wdeprecated-declarations", move the
pragma even earlier.

Change-Id: I599c751e703fec4bbffde6b43385236e6f5808d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200731
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-03-02 07:47:21 +01:00
Stephan Bergmann af82f165ca Avoid unspecified behavior when checking for "pointer in range"
...which can easily cause wrong behavior.

(Maybe we can eventually replace the use of Boost here with Standard C++, if
something like
<https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3234r1.html> "Utility
to check if a pointer is in a given range" ever gets in.)

Change-Id: I9122efdd3272613b27c33a0d7dbc04ad2d6e39e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200454
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2026-02-26 19:44:18 +01:00
Stephan Bergmann cdf292b4db Don't direct veraPDF stderr into output file
This redirection was introduced in ba8fe774a1
"test: capture stderr of odfvalidator too", so it probably doesn't make much
sense for veraPDF.  And at least with Java 26, invocations of bin/verapdf.sh
start off with writing

> WARNING: Final field flavour in class org.verapdf.pdfa.validation.profiles.ValidationProfileImpl has been mutated reflectively by class com.sun.xml.bind.v2.runtime.reflect.Accessor$FieldReflection in unnamed module @67117f44 (file:/home/sberg/lo-external-tarballs/verapdf-cli-1.29.0.jar)
> WARNING: Use --enable-final-field-mutation=ALL-UNNAMED to avoid a warning
> WARNING: Mutating final fields will be blocked in a future release unless final field mutation is enabled

to stderr, so that e.g. CppunitTest_vcl_pdfexport failed with various

> Entity: line 1: parser error : Start tag expected, '<' not found
> WARNING: Final field flavour in class org.verapdf.pdfa.validation.profiles.Valid
> ^
> /home/sberg/lo/core/test/source/unoapi_test.cxx:217:(anonymous namespace)::testTdf142806::TestBody
> assertion failed
> - Expression: pXmlDoc

Change-Id: I83970406d7ac8a4d4be98a7fc1e7da530075685c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200359
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-02-26 18:22:21 +01:00
Stephan Bergmann 9b4077998d Add test
...for 0468b71c3f284ad6f7826aee79b8adb1998fc018 "fix asan heap-use-after-free"

Change-Id: I4045a2a3635d628d7f681406bd6a8b9f26fa23d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200351
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2026-02-26 17:45:50 +01:00
Stephan Bergmann b327527847 More verbose test failure output
...to hopefully find out why <https://ci.libreoffice.org/job/lo_ubsan/3822/>
started to fail JunitTest_toolkit_unoapi_1 with

> checking: [toolkit.AccessibleMenuSeparator::com::sun::star::accessibility::XAccessibleContext] is iface: [com.sun.star.accessibility.XAccessibleContext] testcode: [ifc.accessibility._XAccessibleContext]
[...]
> LOG> Execute: getAccessibleIndexInParent()
> LOG> starting required method: getAccessibleParent()
> LOG> Expected: com.sun.star.comp.toolkit.AccessibleMenuSeparator
> LOG> Getting: com.sun.star.comp.toolkit.AccessibleMenuSeparator
> Method getAccessibleIndexInParent() finished with state FAILED
> LOG> getAccessibleIndexInParent(): COMPLETED.FAILED

Change-Id: Ie426b0d9f05859ce159bd733d68ff1db77f34350
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200384
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-02-26 15:38:20 +01:00
Stephan Bergmann 89ae3faf6e Revert "Fix heap-use-after-free"
This reverts commit 15995c4d46, which was
obsoleted by
<https://git.libreoffice.org/core/+/fa002b6244207ff2bb92f7e714d56c4e2b103064%5E%21>
"fix asan heap-use-after-free".

Change-Id: I852a5a3bc6ce0b254b2761c19767d78c9cc94ed0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200286
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-02-25 13:20:07 +01:00
Stephan Bergmann a14686cb54 SfxPoolItem must be a complete type here
...contrary to what a9e9175ba6 "tdf#146619 Use
more forward declarations in include/sfx2" apparently assumed,

> In file included from sfx2/source/commandpopup/CommandPopup.cxx:10:
> In file included from sfx2/inc/commandpopup/CommandPopup.hxx:13:
> In file included from include/vcl/weld/Builder.hxx:13:
> In file included from include/rtl/ustring.hxx:45:
> In file included from include/rtl/string.hxx:51:
> In file included from include/rtl/stringconcat.hxx:22:
> In file included from ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/16.0.1/../../../../include/c++/16.0.1/memory:80:
> ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/16.0.1/../../../../include/c++/16.0.1/bits/unique_ptr.h:90:16: error: invalid application of 'sizeof' to an incomplete type 'SfxPoolItem'
>    90 |         static_assert(sizeof(_Tp)>0,
>       |                       ^~~~~~~~~~~
> ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/16.0.1/../../../../include/c++/16.0.1/bits/unique_ptr.h:398:4: note: in instantiation of member function 'std::default_delete<SfxPoolItem>::operator()' requested here
>   398 |           get_deleter()(std::move(__ptr));
>       |           ^
> include/sfx2/bindings.hxx:154:38: note: in instantiation of member function 'std::unique_ptr<SfxPoolItem>::~unique_ptr' requested here
>   154 |         std::unique_ptr<SfxPoolItem> tmp;
>       |                                      ^
> include/sfx2/bindings.hxx:57:7: note: forward declaration of 'SfxPoolItem'
>    57 | class SfxPoolItem;
>       |       ^

Change-Id: I51e150d75beaabf797f3ed5abc0a5d2b645b933a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200267
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-02-25 08:07:41 +01:00
Stephan Bergmann 4f4a06ed1a Filter more -fsanitize arguments out of COMPILER_PLUGINS_CXX
...so that e.g. -fsanitize-address-globals-dead-stripping doesn't lead to build
failures like

> [CXX] compilerplugins/clang/automem.cxx
> clang++: error: argument unused during compilation: '-fsanitize-address-globals-dead-stripping' [-Werror,-Wunused-command-line-argument]

Change-Id: I97524edd64d7dd764cb5d8a8a3b5d28fff6d3fd9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200140
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-02-24 12:00:16 +01:00
Stephan Bergmann 8a23084213 UBSan apparently needs ScScenariosObj etc. RTTI now
...presumably since 68f3831bed "use more concrete
UNO classes", seeing e.g. CppunitTest_sc_filters_test fail with

> DynamicLibraryManagerException: "Failed to load dynamic library: /home/sberg/lo-asanubsan/core/workdir/LinkTarget/CppunitTest/libtest_sc_filters_test.so
> /home/sberg/lo-asanubsan/core/instdir/program/libscfiltlo.so: undefined symbol: _ZTI14ScScenariosObj"

etc.

Change-Id: Iaaf46935d349a8c5f4734602a964d546ebfa51a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200095
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-02-24 07:34:44 +01:00
Stephan Bergmann 6dfc360158 Missing include (USHRT_MAX)
Change-Id: I088c23f4011919ef3a572872622230c3dc2f870a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200037
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-02-23 15:07:04 +01:00
Stephan Bergmann 5fd256977b SvXMLImportPropertyMapper appears to be required to be a complete type here
...contrary to what 0a42ddbdf1 "tdf#146619 Use
more forward declarations in include/xmloff" apparently assumed, as seen at
least with recent Clang 23 trunk against recent libstdc++ 16 trunk,

> In file included from xmloff/source/chart/SchXMLParagraphContext.cxx:21:
> In file included from xmloff/source/chart/SchXMLParagraphContext.hxx:21:
> In file included from include/xmloff/xmlictxt.hxx:28:
> In file included from workdir/UnoApiHeadersTarget/offapi/normal/com/sun/star/xml/sax/XFastContextHandler.hpp:6:
> In file included from workdir/UnoApiHeadersTarget/offapi/normal/com/sun/star/xml/sax/XFastContextHandler.hdl:6:
> In file included from workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/XInterface.hdl:6:
> In file included from include/com/sun/star/uno/Any.h:30:
> In file included from include/rtl/ustring.hxx:45:
> In file included from include/rtl/string.hxx:51:
> In file included from include/rtl/stringconcat.hxx:22:
> In file included from ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/16.0.1/../../../../include/c++/16.0.1/memory:80:
> ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/16.0.1/../../../../include/c++/16.0.1/bits/unique_ptr.h:90:16: error: invalid application of 'sizeof' to an incomplete type 'SvXMLImportPropertyMapper'
>    90 |         static_assert(sizeof(_Tp)>0,
>       |                       ^~~~~~~~~~~
> ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/16.0.1/../../../../include/c++/16.0.1/bits/unique_ptr.h:398:4: note: in instantiation of member function 'std::default_delete<SvXMLImportPropertyMapper>::operator()' requested here
>   398 |           get_deleter()(std::move(__ptr));
>       |           ^
> include/xmloff/shapeimport.hxx:153:62: note: in instantiation of member function 'std::unique_ptr<SvXMLImportPropertyMapper>::~unique_ptr' requested here
>   153 |         std::unique_ptr<SvXMLImportPropertyMapper> pExtMapper={} );
>       |                                                              ^
> include/xmloff/txtimp.hxx:34:7: note: forward declaration of 'SvXMLImportPropertyMapper'
>    34 | class SvXMLImportPropertyMapper;
>       |       ^

Change-Id: I58fec903631d04dd7a89e599cf745115cdab22bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200036
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2026-02-23 13:39:20 +01:00
Stephan Bergmann 8f6d4fb1a4 external/harfbuzz: Fix emscripten build
...after 7f1335390e "Build harfbuzz-subset",

> wasm-ld: error: --shared-memory is disallowed by hb-subset-input.cc.o because it was not compiled with 'atomics' or 'bulk-memory' features.
> em++: error: '/home/tdf/lode/emsdk/upstream/bin/wasm-ld @/tmp/emscripten__e1rcozh.rsp.utf-8' failed (returned 1)
> make[1]: *** [/home/tdf/jenkins/workspace/lo_gerrit/tb/src_wasm/desktop/Executable_soffice_bin.mk:10: /home/tdf/lode/jenkins/workspace/lo_gerrit/tb/build_master/instdir/program/soffice.js] Error 1

(<https://ci.libreoffice.org/job/lo_daily_tb_linux_wasm/1338/>).  Probably
doesn't hurt to unconditionally add that thread_dep dependency here (which is
also unconditionally used for libharfbuzz, via harfbuzz_deps).

Change-Id: I6dd56a3ce61c855a734db1660d0b3280cbfdaf42
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199996
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-02-22 22:57:52 +01:00
Stephan Bergmann 7bac6ec0a2 Adapt to change in emsdk 5.0.1 version.h
(<https://github.com/emscripten-core/emscripten/commit/4cce5e9a4a245713df7fc5bf4ad1e6d7463cbf4b>
"Use uppercase for version macros (#26180)"Adapt to change in emsdk 5.0.1
version.h

(<https://github.com/emscripten-core/emscripten/commit/4cce5e9a4a245713df7fc5bf4ad1e6d7463cbf4b>
"Use uppercase for version macros (#26180)")

Change-Id: I4cdf2447213ae82763f1cb1a19e84600c6267908
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199995
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-02-22 22:57:31 +01:00
Stephan Bergmann 160aaa3e9c Even more CppunitTests need the ASan hack now
...from e854abe076 "Avoid external processes
picking up instdir/program/libnspr4.so"

Change-Id: Ia4e3f310981b5e0e6a7540bb999ddbd3892201f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199973
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2026-02-22 20:42:32 +01:00
Stephan Bergmann 15995c4d46 Fix heap-use-after-free
...as seen during CppunitTest_sd_tiledrendering2,

> ==1656617==ERROR: AddressSanitizer: heap-use-after-free on address 0x531000155fe7 at pc 0x55e2bd9ad71d bp 0x7ffde61a2210 sp 0x7ffde61a19d0
> READ of size 177 at 0x531000155fe7 thread T0
>     #0 0x55e2bd9ad71c in __asan_memcpy /home/tdf/lode/packages/llvm-llvmorg-18.1.8.src/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cpp:63:3
>     #1 0x7f9c90d91bb2 in SvMemoryStream::PutData(void const*, unsigned long) /tools/source/stream/stream.cxx:1578:5
>     #2 0x7f9c90d6e77f in SvStream::WriteBytes(void const*, unsigned long) /tools/source/stream/stream.cxx:1195:26
>     #3 0x7f9c83b80030 in vcl::filter::PDFDocument::WriteCatalogObject(int, vcl::filter::PDFReferenceElement*&) /vcl/source/filter/ipdf/pdfdocument.cxx:577:27
>
> 0x531000155fe7 is located 6119 bytes inside of 65180-byte region [0x531000154800,0x53100016469c)
> freed by thread T0 here:
>     #0 0x55e2bd9faf30 in operator delete[](void*) /home/tdf/lode/packages/llvm-llvmorg-18.1.8.src/compiler-rt/lib/asan/asan_new_delete.cpp:146:3
>     #1 0x7f9c90d8f873 in SvMemoryStream::FreeMemory() /tools/source/stream/stream.cxx:1694:9
>     #2 0x7f9c90d92f0f in SvMemoryStream::ReAllocateMemory(long) /tools/source/stream/stream.cxx:1671:9
>     #3 0x7f9c90d91703 in SvMemoryStream::PutData(void const*, unsigned long) /tools/source/stream/stream.cxx:1569:22
>     #4 0x7f9c90d6e77f in SvStream::WriteBytes(void const*, unsigned long) /tools/source/stream/stream.cxx:1195:26
>     #5 0x7f9c83b80030 in vcl::filter::PDFDocument::WriteCatalogObject(int, vcl::filter::PDFReferenceElement*&) /vcl/source/filter/ipdf/pdfdocument.cxx:577:27

(<https://ci.libreoffice.org//job/lo_ubsan/3829/>)

Change-Id: I38abb9870ffcce3aaf198543e130898817d8fe3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199944
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-02-21 17:10:55 +01:00
Stephan Bergmann 76836e39ca Avoid heap-buffer-overflow internally in md4c
...as seen during CppunitTest_sw_filter_md,

> ==1418747==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7b9a07967527 at pc 0x560f1d4a7b22 bp 0x7ffdd9a75f10 sp 0x7ffdd9a756d0
> READ of size 24 at 0x7b9a07967527 thread T0
>  #0 in strcspn at ~/github.com/llvm/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:806:5
>  #1 in md_analyze_line at workdir/UnpackedTarball/md4c/src/md4c.c:6230:26
>  #2 in md_process_doc at workdir/UnpackedTarball/md4c/src/md4c.c:6404:18
>  #3 in md_parse at workdir/UnpackedTarball/md4c/src/md4c.c:6483:11
>  #4 in SwMarkdownParser::CallParser() at sw/source/filter/md/swmd.cxx:955:18
>  #5 in MarkdownReader::Read(SwDoc&, rtl::OUString const&, SwPaM&, rtl::OUString const&) at sw/source/filter/md/swmd.cxx:838:19
>  #6 in SwReader::Read(Reader const&) at sw/source/filter/basflt/shellio.cxx:209:26
>  #7 in SwDocShell::ConvertFrom(SfxMedium&) at sw/source/uibase/app/docsh.cxx:230:29
>  #8 in SfxObjectShell::DoLoad(SfxMedium*) at sfx2/source/doc/objstor.cxx:786:27
>  #9 in SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/sfxbasemodel.cxx:1982:36
>  #10 in (anonymous namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) at sfx2/source/view/frmload.cxx:774:28
>  #11 in framework::LoadEnv::impl_loadContent() at framework/source/loadenv/loadenv.cxx:1180:37
>  #12 in framework::LoadEnv::start() at framework/source/loadenv/loadenv.cxx:416:20
>  #13 in framework::LoadEnv::startLoading(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, rtl::OUString const&, int, LoadEnvFeatures) at framework/source/loadenv/loadenv.cxx:312:5
>  #14 in framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/loadenv/loadenv.cxx:168:14
>  #15 in framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/services/desktop.cxx:594:16
>  #16 in non-virtual thunk to framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/services/desktop.cxx
>  #17 in unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at unotest/source/cpp/macros_test.cxx:75:62
>  #18 in UnoApiTest::loadFromURL(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, char const*) at test/source/unoapi_test.cxx:271:19
>  #19 in SwModelTestBase::loadURL(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, char const*) at sw/qa/unit/swmodeltestbase.cxx:382:5
>  #20 in SwModelTestBase::createSwDoc(char const*, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, char const*) at sw/qa/unit/swmodeltestbase.cxx:423:9
>  #21 in testBlockQuoteMdImport::TestBody() at sw/qa/filter/md/md.cxx:418:5
>
> 0x7b9a07967527 is located 0 bytes after 23-byte region [0x7b9a07967510,0x7b9a07967527)
> allocated by thread T0 here:
>  #0 in operator new[](unsigned long) at ~/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:111:37
>  #1 in SwMarkdownParser::CallParser() at sw/source/filter/md/swmd.cxx:924:26
>  #2 in MarkdownReader::Read(SwDoc&, rtl::OUString const&, SwPaM&, rtl::OUString const&) at sw/source/filter/md/swmd.cxx:838:19
>  #3 in SwReader::Read(Reader const&) at sw/source/filter/basflt/shellio.cxx:209:26
>  #4 in SwDocShell::ConvertFrom(SfxMedium&) at sw/source/uibase/app/docsh.cxx:230:29
>  #5 in SfxObjectShell::DoLoad(SfxMedium*) at sfx2/source/doc/objstor.cxx:786:27
>  #6 in SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/sfxbasemodel.cxx:1982:36
>  #7 in (anonymous namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) at sfx2/source/view/frmload.cxx:774:28
>  #8 in framework::LoadEnv::impl_loadContent() at framework/source/loadenv/loadenv.cxx:1180:37
>  #9 in framework::LoadEnv::start() at framework/source/loadenv/loadenv.cxx:416:20
>  #10 in framework::LoadEnv::startLoading(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, rtl::OUString const&, int, LoadEnvFeatures) at framework/source/loadenv/loadenv.cxx:312:5
>  #11 in framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/loadenv/loadenv.cxx:168:14
>  #12 in framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/services/desktop.cxx:594:16
>  #13 in non-virtual thunk to framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/services/desktop.cxx
>  #14 in unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at unotest/source/cpp/macros_test.cxx:75:62
>  #15 in UnoApiTest::loadFromURL(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, char const*) at test/source/unoapi_test.cxx:271:19
>  #16 in SwModelTestBase::loadURL(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, char const*) at sw/qa/unit/swmodeltestbase.cxx:382:5
>  #17 in SwModelTestBase::createSwDoc(char const*, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, char const*) at sw/qa/unit/swmodeltestbase.cxx:423:9
>  #18 in testBlockQuoteMdImport::TestBody() at sw/qa/filter/md/md.cxx:418:5

Change-Id: I16c38a59a5c27d83906ec765c5382b2d2bf375e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199515
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2026-02-17 09:37:20 +01:00
Stephan Bergmann b6767f9aed Make external/firebird/sanitizer-rtti.patch apply again
Change-Id: Iea2240ebf02949f1d8ed0c50bca51d8cfdd25ea0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199133
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-02-11 13:05:30 +01:00
Stephan Bergmann 2d9f4c0ba6 UBSan apparently needs ScFilterDescriptorBase RTTI now
...presumably since 298058908d "tdf#48140 Remove
uno calls in autofilterbuffer.cxx", seeing e.g. CppunitTest_sc_functionlistobj
fail with

> [_RUN_____] sc_apitest::ScFunctionListObj::testGetElementType
> warn:sal.osl:792064:792064:sal/osl/unx/module.cxx:103: dlopen(/home/sberg/lo/core/instdir/program/libscfiltlo.so, 1): /home/sberg/lo/core/instdir/program/libscfiltlo.so: undefined symbol: _ZTI22ScFilterDescriptorBase

Change-Id: Ia5473e5997e0ec0aae993a3bf334c64b45707316
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198924
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-02-09 07:40:15 +01:00
Stephan Bergmann 19aac4ff39 missing includes
Change-Id: I5bc8b92caf4c55939dcdc4591f2c0e7b372ddad0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198814
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2026-02-06 14:46:46 +01:00
Stephan Bergmann d5bdccccfd Even more CppunitTests need the ASan hack now
...from e854abe076 "Avoid external processes
picking up instdir/program/libnspr4.so"

Change-Id: I95528572b11b04b358a83c8e8fbf66995fefdecb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198791
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-02-06 08:50:28 +01:00
Stephan Bergmann 9a110a047a Fix UBSan invalid-bool-load
...after 513bfbd476 "Writer: Adapt
'SvxAutoFormat'" started to break CppunitTest_sw_uiwriter4,

> /sw/source/core/doc/tblafmt.cxx:272:22: runtime error: load of value 190, which is not a valid value for type 'bool'
>     #0 0x7fd6f3603500 in SwTableAutoFormat::operator=(SwTableAutoFormat const&) /sw/source/core/doc/tblafmt.cxx:272:22
>     #1 0x7fd6f660e7ca in SwUndoTableStyleMake::RedoImpl(sw::UndoRedoContext&) /sw/source/core/undo/untbl.cxx:3187:22
>     #2 0x7fd6f6439c80 in SwUndo::RedoWithContext(SfxUndoContext&) /sw/source/core/undo/undobj.cxx:234:5
>     #3 0x7fd72e6cd14f in SfxUndoManager::ImplRedo(SfxUndoContext*) /svl/source/undo/undo.cxx:853:22
>     #4 0x7fd72e6ce418 in SfxUndoManager::RedoWithContext(SfxUndoContext&) /svl/source/undo/undo.cxx:819:12
>     #5 0x7fd6f633c7a3 in sw::UndoManager::impl_DoUndoRedo(sw::UndoManager::UndoOrRedoType, unsigned long) /sw/source/core/undo/docundo.cxx:726:32
>     #6 0x7fd6f633dbae in sw::UndoManager::Redo() /sw/source/core/undo/docundo.cxx:772:16
>     #7 0x7fd71db9a4ff in testTableStyleUndo::TestBody() /sw/qa/extras/uiwriter/uiwriter4.cxx:1197:18

(<https://ci.libreoffice.org/job/lo_ubsan/3812/>)

Change-Id: I6d59f3c3cf3df22af0d89e21e0a1139c949931be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198759
Reviewed-by: Karthik Godha <karthik.godha@collabora.com>
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-02-05 17:00:31 +01:00
Stephan Bergmann 15ba366202 SvxAutoFormatDataField apparently needs a virtual dtor now
...given that with 513bfbd476 "Writer: Adapt
'SvxAutoFormat'" an instance of derived class SwBoxAutoFormat can be deleted
through a base pointer to SvxAutoFormatDataField via the dtor of TableStyle,
witness CppunitTest_chart2_geometry failing now with

> ==3389764==ERROR: AddressSanitizer: new-delete-type-mismatch on 0x512001532ec0 in thread T0:
>   object passed to delete has wrong type:
>   size of the allocated type:   288 bytes;
>   size of the deallocated type: 264 bytes.
>     #0 0x55be493fb2c8 in operator delete(void*, unsigned long) /home/tdf/lode/packages/llvm-llvmorg-18.1.8.src/compiler-rt/lib/asan/asan_new_delete.cpp:155:3
>     #1 0x7fae0ed86fba in std::default_delete<SvxAutoFormatDataField>::operator()(SvxAutoFormatDataField*) const /opt/rh/gcc-toolset-13/root/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/unique_ptr.h:99:2
>     #2 0x7fae0ed78c5e in std::unique_ptr<SvxAutoFormatDataField, std::default_delete<SvxAutoFormatDataField>>::~unique_ptr() /opt/rh/gcc-toolset-13/root/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/unique_ptr.h:404:4
>     #3 0x7fae0ed729ec in TableStyle::~TableStyle() /include/svx/TableStylesParser.hxx:34:8
>     #4 0x7fae0ed85e3c in std::pair<rtl::OUString const, TableStyle>::~pair() /opt/rh/gcc-toolset-13/root/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/stl_iterator.h:2992:12
>     #5 0x7fae0ed85de0 in void std::destroy_at<std::pair<rtl::OUString const, TableStyle>>(std::pair<rtl::OUString const, TableStyle>*) /opt/rh/gcc-toolset-13/root/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/stl_construct.h:88:15
>     #6 0x7fae0ed85b59 in void std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<rtl::OUString const, TableStyle>>>>::destroy<std::pair<rtl::OUString const, TableStyle>>(std::allocator<std::_Rb_tree_node<std::pair<rtl::OUString const, TableStyle>>>&, std::pair<rtl::OUString const, TableStyle>*) /opt/rh/gcc-toolset-13/root/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/alloc_traits.h:560:4
>     #7 0x7fae0ed85b59 in std::_Rb_tree<rtl::OUString, std::pair<rtl::OUString const, TableStyle>, std::_Select1st<std::pair<rtl::OUString const, TableStyle>>, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, TableStyle>>>::_M_destroy_node(std::_Rb_tree_node<std::pair<rtl::OUString const, TableStyle>>*) /opt/rh/gcc-toolset-13/root/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/stl_tree.h:625:2
>     #8 0x7fae0ed85a70 in std::_Rb_tree<rtl::OUString, std::pair<rtl::OUString const, TableStyle>, std::_Select1st<std::pair<rtl::OUString const, TableStyle>>, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, TableStyle>>>::_M_drop_node(std::_Rb_tree_node<std::pair<rtl::OUString const, TableStyle>>*) /opt/rh/gcc-toolset-13/root/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/stl_tree.h:633:2
>     #9 0x7fae0ed85764 in std::_Rb_tree<rtl::OUString, std::pair<rtl::OUString const, TableStyle>, std::_Select1st<std::pair<rtl::OUString const, TableStyle>>, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, TableStyle>>>::_M_erase(std::_Rb_tree_node<std::pair<rtl::OUString const, TableStyle>>*) /opt/rh/gcc-toolset-13/root/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/stl_tree.h:1938:4
>     #10 0x7fae0ed85711 in std::_Rb_tree<rtl::OUString, std::pair<rtl::OUString const, TableStyle>, std::_Select1st<std::pair<rtl::OUString const, TableStyle>>, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, TableStyle>>>::_M_erase(std::_Rb_tree_node<std::pair<rtl::OUString const, TableStyle>>*) /opt/rh/gcc-toolset-13/root/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/stl_tree.h:1936:4
>     #11 0x7fae0ed85711 in std::_Rb_tree<rtl::OUString, std::pair<rtl::OUString const, TableStyle>, std::_Select1st<std::pair<rtl::OUString const, TableStyle>>, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, TableStyle>>>::_M_erase(std::_Rb_tree_node<std::pair<rtl::OUString const, TableStyle>>*) /opt/rh/gcc-toolset-13/root/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/stl_tree.h:1936:4
>     #12 0x7fae0ed85711 in std::_Rb_tree<rtl::OUString, std::pair<rtl::OUString const, TableStyle>, std::_Select1st<std::pair<rtl::OUString const, TableStyle>>, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, TableStyle>>>::_M_erase(std::_Rb_tree_node<std::pair<rtl::OUString const, TableStyle>>*) /opt/rh/gcc-toolset-13/root/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/stl_tree.h:1936:4
>     #13 0x7fae0ed85711 in std::_Rb_tree<rtl::OUString, std::pair<rtl::OUString const, TableStyle>, std::_Select1st<std::pair<rtl::OUString const, TableStyle>>, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, TableStyle>>>::_M_erase(std::_Rb_tree_node<std::pair<rtl::OUString const, TableStyle>>*) /opt/rh/gcc-toolset-13/root/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/stl_tree.h:1936:4
>     #14 0x7fae0ed85711 in std::_Rb_tree<rtl::OUString, std::pair<rtl::OUString const, TableStyle>, std::_Select1st<std::pair<rtl::OUString const, TableStyle>>, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, TableStyle>>>::_M_erase(std::_Rb_tree_node<std::pair<rtl::OUString const, TableStyle>>*) /opt/rh/gcc-toolset-13/root/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/stl_tree.h:1936:4
>     #15 0x7fae0ed85711 in std::_Rb_tree<rtl::OUString, std::pair<rtl::OUString const, TableStyle>, std::_Select1st<std::pair<rtl::OUString const, TableStyle>>, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, TableStyle>>>::_M_erase(std::_Rb_tree_node<std::pair<rtl::OUString const, TableStyle>>*) /opt/rh/gcc-toolset-13/root/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/stl_tree.h:1936:4
>     #16 0x7fae0ed85711 in std::_Rb_tree<rtl::OUString, std::pair<rtl::OUString const, TableStyle>, std::_Select1st<std::pair<rtl::OUString const, TableStyle>>, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, TableStyle>>>::_M_erase(std::_Rb_tree_node<std::pair<rtl::OUString const, TableStyle>>*) /opt/rh/gcc-toolset-13/root/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/stl_tree.h:1936:4
>     #17 0x7fae0ed85711 in std::_Rb_tree<rtl::OUString, std::pair<rtl::OUString const, TableStyle>, std::_Select1st<std::pair<rtl::OUString const, TableStyle>>, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, TableStyle>>>::_M_erase(std::_Rb_tree_node<std::pair<rtl::OUString const, TableStyle>>*) /opt/rh/gcc-toolset-13/root/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/stl_tree.h:1936:4
>     #18 0x7fae0ed85711 in std::_Rb_tree<rtl::OUString, std::pair<rtl::OUString const, TableStyle>, std::_Select1st<std::pair<rtl::OUString const, TableStyle>>, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, TableStyle>>>::_M_erase(std::_Rb_tree_node<std::pair<rtl::OUString const, TableStyle>>*) /opt/rh/gcc-toolset-13/root/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/stl_tree.h:1936:4
>     #19 0x7fae0ed85711 in std::_Rb_tree<rtl::OUString, std::pair<rtl::OUString const, TableStyle>, std::_Select1st<std::pair<rtl::OUString const, TableStyle>>, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, TableStyle>>>::_M_erase(std::_Rb_tree_node<std::pair<rtl::OUString const, TableStyle>>*) /opt/rh/gcc-toolset-13/root/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/stl_tree.h:1936:4
>     #20 0x7fae0ed85711 in std::_Rb_tree<rtl::OUString, std::pair<rtl::OUString const, TableStyle>, std::_Select1st<std::pair<rtl::OUString const, TableStyle>>, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, TableStyle>>>::_M_erase(std::_Rb_tree_node<std::pair<rtl::OUString const, TableStyle>>*) /opt/rh/gcc-toolset-13/root/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/stl_tree.h:1936:4
>     #21 0x7fae0ed85644 in std::_Rb_tree<rtl::OUString, std::pair<rtl::OUString const, TableStyle>, std::_Select1st<std::pair<rtl::OUString const, TableStyle>>, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, TableStyle>>>::~_Rb_tree() /opt/rh/gcc-toolset-13/root/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/stl_tree.h:986:9
>     #22 0x7fae0ed85598 in std::__cxx1998::map<rtl::OUString, TableStyle, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, TableStyle>>>::~map() /opt/rh/gcc-toolset-13/root/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/stl_map.h:314:22
>     #23 0x7fae0ed7212c in std::__debug::map<rtl::OUString, TableStyle, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, TableStyle>>>::~map() /opt/rh/gcc-toolset-13/root/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/debug/map.h:136:22
>     #24 0x7fae0ed4e0f8 in SvxTableStylesImport::~SvxTableStylesImport() /svx/source/table/tablestylesparser.cxx:99:45
>     #25 0x7fae0ed4e158 in SvxTableStylesImport::~SvxTableStylesImport() /svx/source/table/tablestylesparser.cxx:99:45
>     #26 0x7fae922b9c06 in cppu::OWeakObject::release() /cppuhelper/source/weak.cxx:230:9
>     #27 0x7fae0ed7f452 in cppu::WeakImplHelper<com::sun::star::xml::sax::XFastDocumentHandler, com::sun::star::lang::XServiceInfo, com::sun::star::lang::XInitialization, com::sun::star::document::XImporter, com::sun::star::document::XFilter, com::sun::star::xml::sax::XFastParser>::release() /include/cppuhelper/implbase.hxx:115:66
>     #28 0x7fae0ed24883 in rtl::Reference<SvxTableStylesImport>::~Reference() /include/rtl/ref.hxx:126:22
>     #29 0x7fae0ed1e242 in SvxAutoFormat::Load(bool) /svx/source/table/tableautofmt.cxx:467:5
>     #30 0x7fae2ce0fd46 in SwTableAutoFormatTable::SwTableAutoFormatTable() /sw/source/core/doc/tblafmt.cxx:619:5
>     #31 0x7fae2d19f93c in SwDoc::GetTableStyles() /sw/source/core/docnode/ndtbl.cxx:4190:34
>     #32 0x7fae2bd89c48 in SwDoc::GetTableStyles() const /sw/inc/doc.hxx:1278:42
>     #33 0x7fae307bf50c in int StyleFamilyEntry::GetCountOrName<(SfxStyleFamily)64>(SwDoc const&, UIName*, int) /sw/source/core/unocore/unostyle.cxx:355:37
>     #34 0x7fae3089b343 in StyleFamilyEntry::getCountOrName(SwDoc const&, UIName*, int) const /sw/source/core/unocore/unostyle.cxx:198:99
>     #35 0x7fae307c0bd4 in SwXStyleFamily::GetCountOrName(UIName*, int) /sw/source/core/unocore/unostyle.cxx:596:21
>     #36 0x7fae307c2e98 in SwXStyleFamily::getCount() /sw/source/core/unocore/unostyle.cxx:621:12
>     #37 0x7fadfb3c84d4 in SvXMLExport::collectDataStyles(bool) /xmloff/source/core/xmlexp.cxx:1890:35
>     #38 0x7fae317803f5 in SwXMLExport::ExportStyles_(bool) /sw/source/filter/xml/xmlfmte.cxx:176:5
>     #39 0x7fadfb3b1dfa in SvXMLExport::ImplExportStyles() /xmloff/source/core/xmlexp.cxx:1108:9
>     #40 0x7fadfb3bb56c in SvXMLExport::exportDoc(xmloff::token::XMLTokenEnum) /xmloff/source/core/xmlexp.cxx:1425:13
>     #41 0x7fae31714b6e in SwXMLExport::exportDoc(xmloff::token::XMLTokenEnum) /sw/source/filter/xml/xmlexp.cxx:313:33
>     #42 0x7fadfb3a7fd7 in SvXMLExport::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /xmloff/source/core/xmlexp.cxx:843:9
>     #43 0x7fae316f9836 in SwXMLWriter::WriteThroughComponent(com::sun::star::uno::Reference<com::sun::star::io::XOutputStream> const&, com::sun::star::uno::Reference<com::sun::star::lang::XComponent> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, char const*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sw/source/filter/xml/wrtxml.cxx:584:28
>     #44 0x7fae316f68c4 in SwXMLWriter::WriteThroughComponent(com::sun::star::uno::Reference<com::sun::star::lang::XComponent> const&, char const*, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, char const*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sw/source/filter/xml/wrtxml.cxx:527:16
>     #45 0x7fae316f1d99 in SwXMLWriter::Write_(SfxItemSet const*) /sw/source/filter/xml/wrtxml.cxx:375:10
>     #46 0x7fae316f6e17 in SwXMLWriter::WriteMedium(SfxMedium&) /sw/source/filter/xml/wrtxml.cxx:471:12
>     #47 0x7fae316152e7 in StgWriter::Write(SwPaM&, com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&, rtl::OUString const*, SfxMedium*) /sw/source/filter/writer/writer.cxx:507:33
>     #48 0x7fae316f731b in SwXMLWriter::Write(SwPaM&, SfxMedium&, rtl::OUString const*) /sw/source/filter/xml/wrtxml.cxx:478:47
>     #49 0x7fae30cd9952 in SwWriter::Write(tools::SvRef<Writer> const&, rtl::OUString const*) /sw/source/filter/basflt/shellio.cxx:870:28
>     #50 0x7fae31a5d121 in SwDocShell::SaveAs(SfxMedium&) /sw/source/uibase/app/docsh.cxx:544:21
>     #51 0x7fae176b7e1f in SfxObjectShell::SaveAsOwnFormat(SfxMedium&) /sfx2/source/doc/objstor.cxx:3587:16
>     #52 0x7fae17677b2b in SfxObjectShell::SaveTo_Impl(SfxMedium&, SfxItemSet const*) /sfx2/source/doc/objstor.cxx:1827:23
>     #53 0x7fae176b379f in SfxObjectShell::PreDoSaveAs_Impl(rtl::OUString const&, rtl::OUString const&, SfxItemSet const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sfx2/source/doc/objstor.cxx:3337:39
>     #54 0x7fae176ab60b in SfxObjectShell::CommonSaveAs_Impl(INetURLObject const&, rtl::OUString const&, SfxItemSet&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sfx2/source/doc/objstor.cxx:3125:20
>     #55 0x7fae175f1171 in SfxObjectShell::APISaveAs_Impl(std::basic_string_view<char16_t, std::char_traits<char16_t>>, SfxItemSet&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sfx2/source/doc/objserv.cxx:324:19
>     #56 0x7fae17896d73 in SfxBaseModel::impl_store(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, bool) /sfx2/source/doc/sfxbasemodel.cxx:3233:42
>     #57 0x7fae1789d804 in SfxBaseModel::storeToURL(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sfx2/source/doc/sfxbasemodel.cxx:1816:13
>     #58 0x7fae12eb6dee in UnoApiTest::save(TestFilter, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, char const*) /test/source/unoapi_test.cxx:364:16
>     #59 0x7fae6010ab6f in Chart2GeometryTest::testTdf135366LabelExport() /chart2/qa/extras/chart2geometry.cxx:443:5
>
> 0x512001532ec0 is located 0 bytes inside of 288-byte region [0x512001532ec0,0x512001532fe0)
> allocated by thread T0 here:
>     #0 0x55be493fa3c8 in operator new(unsigned long) /home/tdf/lode/packages/llvm-llvmorg-18.1.8.src/compiler-rt/lib/asan/asan_new_delete.cpp:86:3
>     #1 0x7fae2ce2e959 in SwTableAutoFormatTable::GetDefaultField() /sw/inc/tblafmt.hxx:190:58
>     #2 0x7fae0ed55953 in SvxCellStyleContext::SvxCellStyleContext(SvXMLImport&, SvxTableStylesContext&, SvxTableStylesImport&) /svx/source/table/tablestylesparser.cxx:254:38
>     #3 0x7fae0ed4face in SvxTableStylesContext::CreateStyleStyleChildContext(XmlStyleFamily, int, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) /svx/source/table/tablestylesparser.cxx:157:30
>     #4 0x7fadfc323bf9 in SvXMLStylesContext::CreateStyleChildContext(int, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) /xmloff/source/style/xmlstyle.cxx:407:19
>     #5 0x7fae0ed4f7fd in SvxTableStylesContext::CreateStyleChildContext(int, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) /svx/source/table/tablestylesparser.cxx:148:32
>     #6 0x7fadfc32c9d4 in SvXMLStylesContext::createFastChildContext(int, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) /xmloff/source/style/xmlstyle.cxx:760:33
>     #7 0x7fadfb4b0646 in SvXMLImport::startFastElement(int, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) /xmloff/source/core/xmlimp.cxx:1000:30
>     #8 0x7fae721217cb in (anonymous namespace)::Entity::startElement((anonymous namespace)::Event const*) /sax/source/fastparser/fastparser.cxx:473:27
>     #9 0x7fae7210b1d3 in sax_fastparser::FastSaxParserImpl::consume((anonymous namespace)::EventList&) /sax/source/fastparser/fastparser.cxx:1021:25
>     #10 0x7fae72108798 in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:863:22
>     #11 0x7fae72128c00 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:1492:13
>     #12 0x7fadfb4a27a4 in SvXMLImport::parseStream(com::sun::star::xml::sax::InputSource const&) /xmloff/source/core/xmlimp.cxx:723:15
>     #13 0x7fae0ed1e203 in SvxAutoFormat::Load(bool) /svx/source/table/tableautofmt.cxx:465:18
>     #14 0x7fae2ce0fd46 in SwTableAutoFormatTable::SwTableAutoFormatTable() /sw/source/core/doc/tblafmt.cxx:619:5
>     #15 0x7fae2d19f93c in SwDoc::GetTableStyles() /sw/source/core/docnode/ndtbl.cxx:4190:34
>     #16 0x7fae2bd89c48 in SwDoc::GetTableStyles() const /sw/inc/doc.hxx:1278:42
>     #17 0x7fae307bf50c in int StyleFamilyEntry::GetCountOrName<(SfxStyleFamily)64>(SwDoc const&, UIName*, int) /sw/source/core/unocore/unostyle.cxx:355:37
>     #18 0x7fae3089b343 in StyleFamilyEntry::getCountOrName(SwDoc const&, UIName*, int) const /sw/source/core/unocore/unostyle.cxx:198:99
>     #19 0x7fae307c0bd4 in SwXStyleFamily::GetCountOrName(UIName*, int) /sw/source/core/unocore/unostyle.cxx:596:21
>     #20 0x7fae307c2e98 in SwXStyleFamily::getCount() /sw/source/core/unocore/unostyle.cxx:621:12
>     #21 0x7fadfb3c84d4 in SvXMLExport::collectDataStyles(bool) /xmloff/source/core/xmlexp.cxx:1890:35
>     #22 0x7fae317803f5 in SwXMLExport::ExportStyles_(bool) /sw/source/filter/xml/xmlfmte.cxx:176:5
>     #23 0x7fadfb3b1dfa in SvXMLExport::ImplExportStyles() /xmloff/source/core/xmlexp.cxx:1108:9
>     #24 0x7fadfb3bb56c in SvXMLExport::exportDoc(xmloff::token::XMLTokenEnum) /xmloff/source/core/xmlexp.cxx:1425:13
>     #25 0x7fae31714b6e in SwXMLExport::exportDoc(xmloff::token::XMLTokenEnum) /sw/source/filter/xml/xmlexp.cxx:313:33
>     #26 0x7fadfb3a7fd7 in SvXMLExport::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /xmloff/source/core/xmlexp.cxx:843:9
>     #27 0x7fae316f9836 in SwXMLWriter::WriteThroughComponent(com::sun::star::uno::Reference<com::sun::star::io::XOutputStream> const&, com::sun::star::uno::Reference<com::sun::star::lang::XComponent> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, char const*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sw/source/filter/xml/wrtxml.cxx:584:28
>     #28 0x7fae316f68c4 in SwXMLWriter::WriteThroughComponent(com::sun::star::uno::Reference<com::sun::star::lang::XComponent> const&, char const*, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, char const*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sw/source/filter/xml/wrtxml.cxx:527:16
>     #29 0x7fae316f1d99 in SwXMLWriter::Write_(SfxItemSet const*) /sw/source/filter/xml/wrtxml.cxx:375:10

(<https://ci.libreoffice.org/job/lo_ubsan/3811/>)

Change-Id: I3b724d633eaf2cc4a3622d65ab83380a17027f06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198749
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2026-02-05 14:07:40 +01:00
Stephan Bergmann 5832a9db70 external/hsqldb: Adapt to java.applet gone from Java 26
...with a minimally invasive attempt of no longer building any affected
functionality (and which was hopefully completely optional and not used by us)

Change-Id: I087753e9ad0276150c90aa65c550213a9d1ec44b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198679
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-02-04 18:17:16 +01:00
Stephan Bergmann 537057a44d external/beanshell: Adapt to java.applet gone from Java 26
...with a minimally invasive attempt of no longer building any affected
functionality (and which was hopefully completely optional and not used by us)

Change-Id: I32aef78f7257ffb558704a60e69878baee777537
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198678
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-02-04 18:17:01 +01:00
Stephan Bergmann 05ba63c6fc Remove the Java OfficeBean example from the SDK
...now that java.applet (which it built upon) has been removed from Java 26

Change-Id: Idae7d231c2bfd249a1cdfa036e5eeacb71bd3050
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198677
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2026-02-04 16:55:39 +01:00
Stephan Bergmann 52ab468f2e Remove stray leading "h"
...that had been added apparently in error by
fde80f0497 "SmartArt: Adapt DiagramModel"

Change-Id: Ide92998e759662aad27a60c863e9837f7d489f02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198655
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-02-04 16:55:17 +01:00
Stephan Bergmann 96cc64e29c Fix a loplugin:bufferadd false positive
(which would hit some yet-to-be-committed code)

Change-Id: I101ae4f7d00ece9d48c96764114668484b0fdd5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198660
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2026-02-04 16:54:59 +01:00
Stephan Bergmann 394cd5db81 Use some more ""_ustr literals
(in places that were otherwise hit by a libstdc++ 16 trunk issue involving
std::source_location that is discussed at
<https://gcc.gnu.org/pipermail/libstdc++/2026-February/065220.html> "Re: [PATCH
6/9 v4] libstdc++, contracts: Add base P2900R14 contracts support.")

Change-Id: Iaedf3e44a5f2290e194286fa035ceed8fd40da45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198627
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2026-02-04 08:22:35 +01:00
Stephan Bergmann 41bf66d08b Even more CppunitTests need the ASan hack now
...from e854abe076 "Avoid external processes
picking up instdir/program/libnspr4.so"

Change-Id: I27c1a872b35270d013b979911b137eddd588966f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198591
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2026-02-03 14:38:48 +01:00
Stephan Bergmann e8cd1878f6 Lets see if an empty sanitize-ubsan-excludelist is enough these days
...after 50f1498332 "Remove ten year old file that
is unused" removed it completely and thus broke
<https://ci.libreoffice.org/job/lo_ubsan/3808/>.  (And if an empty file turns
out to be enough, we can either remove it completely in a second step, from both
core and lode, or keep it around in case we ever need to add new content into
it.)

Change-Id: Ieedc93de5e98b76e754dcd9393e66ee64fbf42cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198581
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-02-03 10:23:20 +01:00
Stephan Bergmann 0c54c3f77a Point appears to be required to be a complete type here
...contrary to what c511c65434 "tdf#146619 Use
more forward declarations in include/tools" apparently assumed, as seen at least
with recent Clang 23 trunk against recent libstdc++ 16 trunk,

> In file included from tools/source/generic/poly2.cxx:22:
> In file included from tools/inc/poly.h:22:
> In file included from ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/16.0.1/../../../../include/c++/16.0.1/memory:80:
> ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/16.0.1/../../../../include/c++/16.0.1/bits/unique_ptr.h:131:18: error: invalid application of 'sizeof' to an incomplete type 'Point'
>   131 |           static_assert(sizeof(_Tp)>0,
>       |                         ^~~~~~~~~~~
> ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/16.0.1/../../../../include/c++/16.0.1/bits/unique_ptr.h:684:4: note: in instantiation of function template specialization 'std::default_delete<Point[]>::operator()<Point>' requested here
>   684 |           get_deleter()(__ptr);
>       |           ^
> tools/inc/poly.h:33:21: note: in instantiation of member function 'std::unique_ptr<Point[]>::~unique_ptr' requested here
>    33 |                     ImplPolygon() : mnPoints(0) {}
>       |                     ^
> include/tools/poly.hxx:60:7: note: forward declaration of 'Point'
>    60 | class Point;
>       |       ^

Change-Id: I0b96222dcec7e98b974151004248a91ba1854e60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198573
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-02-02 22:31:40 +01:00
Stephan Bergmann ea8780df8c -Werror,-Wunused-variable
...after f9fcd884a3 "tdf#166121 split
HandleDuplicateRecords method"

Change-Id: I9ed36b6afcc729198255becdca4c268d59af032e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198396
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-01-30 11:24:50 +01:00
Stephan Bergmann aee7b9b8e0 Avoid float-cast-overflow
...by completely getting rid of the code exhibiting UB and the helpless
workaround from 2b27652d2d "tdf#167892 fix hang
formatting very small number on windows".

TODO:  It is unclear to me whether using saturated values here is any better
than using whatever random values came out of the original code that exhibited
UB.  The whole algorithm probably needs to be replaced with something that
actually works.

(This was now reported with 4368272648
"tdf#167892: svl_qa_cppunit: Add test" as

> /svl/source/numbers/zformat.cxx:2886:52: runtime error: 1e+19 is outside the range of representable values of type 'long'
>     #0 0x7f3f6da013eb in SvNumberformat::ImpGetFractionElements(double&, unsigned short, double&, long&, long&) const /svl/source/numbers/zformat.cxx:2886:52
>     #1 0x7f3f6d9f84ee in SvNumberformat::ImpGetFractionOutput(double, unsigned short, bool, NativeNumberWrapper const&, rtl::OUStringBuffer&) const /svl/source/numbers/zformat.cxx:2961:5
>     #2 0x7f3f6d9e472a in SvNumberformat::GetOutputString(double, rtl::OUString&, Color const**, NativeNumberWrapper const&, SvNFLanguageData const&, bool) const /svl/source/numbers/zformat.cxx:2676:21
>     #3 0x7f3f6d8c37bc in SvNFEngine::GetPreviewString(SvNFLanguageData&, SvNFFormatData const&, NativeNumberWrapper const&, SvNFEngine::Accessor const&, rtl::OUString const&, double, rtl::OUString&, Color const**, o3tl::strong_int<unsigned short, LanguageTypeTag>, bool) /svl/source/numbers/zforlist.cxx:2147:20
>     #4 0x7f3f6d8c3ddb in SvNumberFormatter::GetPreviewString(rtl::OUString const&, double, rtl::OUString&, Color const**, o3tl::strong_int<unsigned short, LanguageTypeTag>, bool) /svl/source/numbers/zforlist.cxx:2165:12
>     #5 0x7f3f6ef90fd3 in (anonymous namespace)::Test::checkPreviewString(SvNumberFormatter&, rtl::OUString const&, double, o3tl::strong_int<unsigned short, LanguageTypeTag>, rtl::OUString const&) /svl/qa/unit/svl.cxx:462:21
>     #6 0x7f3f6ef67f13 in (anonymous namespace)::Test::testUserDefinedNumberFormats() /svl/qa/unit/svl.cxx:1443:9

<https://ci.libreoffice.org/job/lo_ubsan/3801/>.)

Change-Id: Iff449629ee309f9513af02da9dfdf2505d6fe725
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198278
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-01-28 13:15:46 +01:00
Stephan Bergmann 2c99f58b27 cppu_detail_getUnoType for PropertyValue should arguably be declared here
...contrary to what 31ea498486 "tdf#146619 Use
more forward declarations in include/vcl/[q-w]*" apparently assumed, as the dtor
of NotebookBarAddonsItem is implicitly defined inline here, and otherwise at
least recent Clang 23 trunk against recent libstdc++ 16 trunk would fail with

> In file included from vcl/source/control/combobox.cxx:20:
> In file included from include/vcl/toolkit/combobox.hxx:28:
> In file included from include/vcl/toolkit/edit.hxx:26:
> In file included from include/vcl/ctrl.hxx:26:
> In file included from include/vcl/window.hxx:24:
> In file included from include/vcl/outdev.hxx:28:
> In file included from include/tools/color.hxx:23:
> In file included from include/com/sun/star/uno/Any.hxx:35:
> In file included from include/com/sun/star/uno/Any.h:33:
> include/cppu/unotype.hxx:300:16: error: no matching function for call to 'cppu_detail_getUnoType'
>   300 |         return cppu_detail_getUnoType(static_cast< T1 * >(NULL));
>       |                ^~~~~~~~~~~~~~~~~~~~~~
> include/cppu/unotype.hxx:325:34: note: in instantiation of member function 'cppu::UnoType<com::sun::star::beans::PropertyValue>::get' requested here
>   325 |     return ::cppu::UnoType< T >::get();
>       |                                  ^
> include/com/sun/star/uno/Sequence.hxx:332:22: note: in instantiation of function template specialization 'cppu::getTypeFavourUnsigned<com::sun::star::beans::PropertyValue>' requested here
>   332 |             (::cppu::getTypeFavourUnsigned(
>       |                      ^
> include/com/sun/star/uno/Sequence.hxx:332:22: note: in instantiation of function template specialization 'cppu::getTypeFavourUnsigned<com::sun::star::beans::PropertyValue>' requested here
> include/com/sun/star/uno/Sequence.hxx:122:38: note: in instantiation of function template specialization 'cppu::getTypeFavourUnsigned<com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>>' requested here
>   122 |         const Type & rType = ::cppu::getTypeFavourUnsigned( static_cast<Sequence const *>(NULL) );
>       |                                      ^
> ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/16.0.1/../../../../include/c++/16.0.1/bits/stl_construct.h:88:15: note: in instantiation of member function 'com::sun::star::uno::Sequence<com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>>::~Sequence' requested here
>    88 |         __location->~_Tp();
>       |                      ^

etc. upon seeing the default argument in the declaration of

>     VclBuilder(vcl::Window* pParent, std::u16string_view sUIRootDir, const OUString& sUIFile,
>                OUString sID = {},
>                css::uno::Reference<css::frame::XFrame> xFrame
>                = css::uno::Reference<css::frame::XFrame>(),
>                bool bLegacy = true,
>                std::unique_ptr<NotebookBarAddonsItem> pNotebookBarAddonsItem = nullptr);

in include/vcl/builder.hxx

Change-Id: Id72f7adec9e1e564cdaa14578ddeb1ef052a023b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198184
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-01-27 09:18:49 +01:00
Stephan Bergmann ad040f7a8f NotebookBarAddonsItem appears to be required to be a complete type here
...contrary to what 96cb87ca01 "tdf#146619 Use
more forward declarations in include/vcl/[a-o]" apparently assumed, as seen at
least with recent Clang 23 trunk against recent libstdc++ 16 trunk,

> In file included from vcl/source/window/builder.cxx:14:
> In file included from ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/16.0.1/../../../../include/c++/16.0.1/memory:80:
> ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/16.0.1/../../../../include/c++/16.0.1/bits/unique_ptr.h:90:16: error: invalid application of 'sizeof' to an incomplete type 'NotebookBarAddonsItem'
>    90 |         static_assert(sizeof(_Tp)>0,
>       |                       ^~~~~~~~~~~
> ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/16.0.1/../../../../include/c++/16.0.1/bits/unique_ptr.h:398:4: note: in instantiation of member function 'std::default_delete<NotebookBarAddonsItem>::operator()' requested here
>   398 |           get_deleter()(std::move(__ptr));
>       |           ^
> include/vcl/builder.hxx:59:80: note: in instantiation of member function 'std::unique_ptr<NotebookBarAddonsItem>::~unique_ptr' requested here
>    59 |                std::unique_ptr<NotebookBarAddonsItem> pNotebookBarAddonsItem = nullptr);
>       |                                                                                ^
> include/vcl/builder.hxx:44:8: note: forward declaration of 'NotebookBarAddonsItem'
>    44 | struct NotebookBarAddonsItem;
>       |        ^

Change-Id: I81537c4c7f774bb1f9e7e3bdbf85af9786c9e016
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198131
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-01-26 13:39:46 +01:00
Stephan Bergmann bec1cfb664 Even more CppunitTests need the ASan hack now
...from e854abe076 "Avoid external processes
picking up instdir/program/libnspr4.so"

Change-Id: Ifd549cf39cda038c3c6f3ba694bbb6363bc906d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198119
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-01-26 09:32:48 +01:00
Stephan Bergmann f6dc303ef5 missing include (for USHRT_MAX)
Change-Id: I1f923f34368f06d0d3cfda037b2a607fd364882d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198113
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-01-26 08:14:08 +01:00
Stephan Bergmann 53e932da93 -Werror,-Wunused-variable
...after 0e7de7e614 "tdf#167883 use
appendTextPortion to construct svx text object"

Change-Id: I3882d6a3852b4e4d30e3406ea5f0b2703afa8f8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198112
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2026-01-26 08:13:55 +01:00
Stephan Bergmann 28951381c6 No more need for ReservedId::isInLokIncludeFile special casing
...after 5bc9425900 "Avoid illegal names also for
the LibreOfficeKitGtk structs" removed the remaining offenders

Change-Id: I274486459dfc109c4d2e103d7ec41b0655657e77
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198111
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-01-26 08:13:43 +01:00
Stephan Bergmann 84beb59bb7 Silence spurious -Werror=array-bounds=
seen at least with recent GCC 16 trunk,

> In file included from ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:53,
>                  from ~/gcc/inst/include/c++/16.0.1/memory:82,
>                  from include/unotools/syslocale.hxx:25,
>                  from include/unotools/resmgr.hxx:24,
>                  from xmlsecurity/inc/resourcemanager.hxx:22,
>                  from xmlsecurity/source/component/documentdigitalsignatures.cxx:20:
> In destructor ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::~_Sp_counted_ptr_inplace() [with _Tp = DigitalSignaturesDialog; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’,
>     inlined from ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::~_Sp_counted_ptr_inplace() [with _Tp = DigitalSignaturesDialog; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_destroy() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:143:9,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:424:18,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:392:5,
>     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1129:21,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = CertificateChooser; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1603:7,
>     inlined from ‘std::shared_ptr<CertificateChooser>::~shared_ptr()’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
>     inlined from ‘com::sun::star::uno::Sequence<com::sun::star::uno::Reference<com::sun::star::security::XCertificate> > {anonymous}::DocumentDigitalSignatures::chooseCertificatesImpl.constprop(SfxViewShell*, std::__debug::map<rtl::OUString, rtl::OUString>&, CertificateChooserUserAction, com::sun::star::security::CertificateKind)’ at xmlsecurity/source/component/documentdigitalsignatures.cxx:674:1:
> ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45: error: array subscript ‘std::_Sp_counted_ptr_inplace<DigitalSignaturesDialog, std::allocator<void>, __gnu_cxx::_S_atomic>[0]’ is partly outside array bounds of ‘unsigned char [384]’ [-Werror=array-bounds=]
>   670 |       ~_Sp_counted_ptr_inplace() noexcept { }
>       |                                             ^
> In file included from ~/gcc/inst/include/c++/16.0.1/x86_64-pc-linux-gnu/bits/c++allocator.h:33,
>                  from ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:46,
>                  from ~/gcc/inst/include/c++/16.0.1/memory:67:
> In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_ptr_inplace<CertificateChooser, std::allocator<void>, __gnu_cxx::_S_atomic>]’,
>     inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = std::_Sp_counted_ptr_inplace<CertificateChooser, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:203:40,
>     inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_Up> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_ptr_inplace<CertificateChooser, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:614:28,
>     inlined from ‘std::__allocated_ptr<_Alloc> std::__allocate_guarded(_Alloc&) [with _Alloc = allocator<_Sp_counted_ptr_inplace<CertificateChooser, allocator<void>, __gnu_cxx::_S_atomic> >]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocated_ptr.h:103:69,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = CertificateChooser; _Alloc = std::allocator<void>; _Args = {weld::Window*&, SfxViewShell*&, std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext>, std::allocator<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext> > >, CertificateChooserUserAction&}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1027:9,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {weld::Window*&, SfxViewShell*&, std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext>, std::allocator<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext> > >, CertificateChooserUserAction&}; _Tp = CertificateChooser; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1805:14,
>     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {weld::Window*&, SfxViewShell*&, std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext>, std::allocator<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext> > >, CertificateChooserUserAction&}; _Tp = CertificateChooser]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:463:59,
>     inlined from ‘std::shared_ptr<std::_NonArray<_Tp> > std::make_shared(_Args&& ...) [with _Tp = CertificateChooser; _Args = {weld::Window*&, SfxViewShell*&, __debug::vector<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext>, allocator<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext> > >, CertificateChooserUserAction&}]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:1066:39,
>     inlined from ‘static std::shared_ptr<CertificateChooser> CertificateChooser::getInstance(weld::Window*, SfxViewShell*, std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext> >&&, CertificateChooserUserAction)’ at xmlsecurity/inc/certificatechooser.hxx:111:113,
>     inlined from ‘com::sun::star::uno::Sequence<com::sun::star::uno::Reference<com::sun::star::security::XCertificate> > {anonymous}::DocumentDigitalSignatures::chooseCertificatesImpl.constprop(SfxViewShell*, std::__debug::map<rtl::OUString, rtl::OUString>&, CertificateChooserUserAction, com::sun::star::security::CertificateKind)’ at xmlsecurity/source/component/documentdigitalsignatures.cxx:664:171:
> ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: object of size 384 allocated by ‘operator new’
>   151 |     return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
>       |                                                                     ^
> In destructor ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::~_Sp_counted_ptr_inplace() [with _Tp = DigitalSignaturesDialog; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’,
>     inlined from ‘void std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_destroy() [with _Tp = DigitalSignaturesDialog; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:684:32,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:424:18,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:392:5,
>     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1129:21,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = CertificateChooser; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1603:7,
>     inlined from ‘std::shared_ptr<CertificateChooser>::~shared_ptr()’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
>     inlined from ‘com::sun::star::uno::Sequence<com::sun::star::uno::Reference<com::sun::star::security::XCertificate> > {anonymous}::DocumentDigitalSignatures::chooseCertificatesImpl.constprop(SfxViewShell*, std::__debug::map<rtl::OUString, rtl::OUString>&, CertificateChooserUserAction, com::sun::star::security::CertificateKind)’ at xmlsecurity/source/component/documentdigitalsignatures.cxx:674:1:
> ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45: error: array subscript ‘std::_Sp_counted_ptr_inplace<DigitalSignaturesDialog, std::allocator<void>, __gnu_cxx::_S_atomic>[0]’ is partly outside array bounds of ‘unsigned char [384]’ [-Werror=array-bounds=]
>   670 |       ~_Sp_counted_ptr_inplace() noexcept { }
>       |                                             ^
> In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_ptr_inplace<CertificateChooser, std::allocator<void>, __gnu_cxx::_S_atomic>]’,
>     inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = std::_Sp_counted_ptr_inplace<CertificateChooser, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:203:40,
>     inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_Up> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_ptr_inplace<CertificateChooser, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:614:28,
>     inlined from ‘std::__allocated_ptr<_Alloc> std::__allocate_guarded(_Alloc&) [with _Alloc = allocator<_Sp_counted_ptr_inplace<CertificateChooser, allocator<void>, __gnu_cxx::_S_atomic> >]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocated_ptr.h:103:69,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = CertificateChooser; _Alloc = std::allocator<void>; _Args = {weld::Window*&, SfxViewShell*&, std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext>, std::allocator<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext> > >, CertificateChooserUserAction&}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1027:9,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {weld::Window*&, SfxViewShell*&, std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext>, std::allocator<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext> > >, CertificateChooserUserAction&}; _Tp = CertificateChooser; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1805:14,
>     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {weld::Window*&, SfxViewShell*&, std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext>, std::allocator<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext> > >, CertificateChooserUserAction&}; _Tp = CertificateChooser]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:463:59,
>     inlined from ‘std::shared_ptr<std::_NonArray<_Tp> > std::make_shared(_Args&& ...) [with _Tp = CertificateChooser; _Args = {weld::Window*&, SfxViewShell*&, __debug::vector<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext>, allocator<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext> > >, CertificateChooserUserAction&}]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:1066:39,
>     inlined from ‘static std::shared_ptr<CertificateChooser> CertificateChooser::getInstance(weld::Window*, SfxViewShell*, std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext> >&&, CertificateChooserUserAction)’ at xmlsecurity/inc/certificatechooser.hxx:111:113,
>     inlined from ‘com::sun::star::uno::Sequence<com::sun::star::uno::Reference<com::sun::star::security::XCertificate> > {anonymous}::DocumentDigitalSignatures::chooseCertificatesImpl.constprop(SfxViewShell*, std::__debug::map<rtl::OUString, rtl::OUString>&, CertificateChooserUserAction, com::sun::star::security::CertificateKind)’ at xmlsecurity/source/component/documentdigitalsignatures.cxx:664:171:
> ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: object of size 384 allocated by ‘operator new’
>   151 |     return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
>       |                                                                     ^

Change-Id: I19ffa8f6d2b7a7c87fe3fbece2eb5e6dc147aa04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197838
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-01-23 08:05:10 +01:00
Stephan Bergmann 0bdb342a33 Silence spurious -Werror=array-bounds=
seen at least with recent GCC 16 trunk,

> In file included from ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:53,
>                  from ~/gcc/inst/include/c++/16.0.1/memory:82,
>                  from sc/source/filter/inc/workbookhelper.hxx:22,
>                  from sc/source/filter/inc/PivotTableFormat.hxx:12,
>                  from sc/source/filter/oox/PivotTableFormat.cxx:10:
> In destructor ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::~_Sp_counted_ptr_inplace() [with _Tp = ScPatternAttr; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’,
>     inlined from ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::~_Sp_counted_ptr_inplace() [with _Tp = ScPatternAttr; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_destroy() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:143:9,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:424:18,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:392:5,
>     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1129:21,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = oox::xls::PivotTableReference; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1603:7,
>     inlined from ‘std::shared_ptr<oox::xls::PivotTableReference>::~shared_ptr()’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
>     inlined from ‘oox::xls::PivotTableReference& oox::xls::PivotTableFormat::createReference()’ at sc/source/filter/oox/PivotTableFormat.cxx:128:1:
> ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45: error: array subscript ‘std::_Sp_counted_ptr_inplace<ScPatternAttr, std::allocator<void>, __gnu_cxx::_S_atomic>[0]’ is partly outside array bounds of ‘unsigned char [120]’ [-Werror=array-bounds=]
>   670 |       ~_Sp_counted_ptr_inplace() noexcept { }
>       |                                             ^
> In file included from ~/gcc/inst/include/c++/16.0.1/x86_64-pc-linux-gnu/bits/c++allocator.h:33,
>                  from ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:46,
>                  from ~/gcc/inst/include/c++/16.0.1/memory:67:
> In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_ptr_inplace<oox::xls::PivotTableReference, std::allocator<void>, __gnu_cxx::_S_atomic>]’,
>     inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = std::_Sp_counted_ptr_inplace<oox::xls::PivotTableReference, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:203:40,
>     inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_Up> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_ptr_inplace<oox::xls::PivotTableReference, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:614:28,
>     inlined from ‘std::__allocated_ptr<_Alloc> std::__allocate_guarded(_Alloc&) [with _Alloc = allocator<_Sp_counted_ptr_inplace<oox::xls::PivotTableReference, allocator<void>, __gnu_cxx::_S_atomic> >]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocated_ptr.h:103:69,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = oox::xls::PivotTableReference; _Alloc = std::allocator<void>; _Args = {oox::xls::PivotTableFormat&}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1027:9,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {oox::xls::PivotTableFormat&}; _Tp = oox::xls::PivotTableReference; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1805:14,
>     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {oox::xls::PivotTableFormat&}; _Tp = oox::xls::PivotTableReference]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:463:59,
>     inlined from ‘std::shared_ptr<std::_NonArray<_Tp> > std::make_shared(_Args&& ...) [with _Tp = oox::xls::PivotTableReference; _Args = {oox::xls::PivotTableFormat&}]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:1066:39,
>     inlined from ‘oox::xls::PivotTableReference& oox::xls::PivotTableFormat::createReference()’ at sc/source/filter/oox/PivotTableFormat.cxx:125:66:
> ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: object of size 120 allocated by ‘operator new’
>   151 |     return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
>       |                                                                     ^
> In destructor ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::~_Sp_counted_ptr_inplace() [with _Tp = ScPatternAttr; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’,
>     inlined from ‘void std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_destroy() [with _Tp = ScPatternAttr; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:684:32,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:424:18,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:392:5,
>     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1129:21,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = oox::xls::PivotTableReference; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1603:7,
>     inlined from ‘std::shared_ptr<oox::xls::PivotTableReference>::~shared_ptr()’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
>     inlined from ‘oox::xls::PivotTableReference& oox::xls::PivotTableFormat::createReference()’ at sc/source/filter/oox/PivotTableFormat.cxx:128:1:
> ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45: error: array subscript ‘std::_Sp_counted_ptr_inplace<ScPatternAttr, std::allocator<void>, __gnu_cxx::_S_atomic>[0]’ is partly outside array bounds of ‘unsigned char [120]’ [-Werror=array-bounds=]
>   670 |       ~_Sp_counted_ptr_inplace() noexcept { }
>       |                                             ^
> In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_ptr_inplace<oox::xls::PivotTableReference, std::allocator<void>, __gnu_cxx::_S_atomic>]’,
>     inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = std::_Sp_counted_ptr_inplace<oox::xls::PivotTableReference, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:203:40,
>     inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_Up> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_ptr_inplace<oox::xls::PivotTableReference, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:614:28,
>     inlined from ‘std::__allocated_ptr<_Alloc> std::__allocate_guarded(_Alloc&) [with _Alloc = allocator<_Sp_counted_ptr_inplace<oox::xls::PivotTableReference, allocator<void>, __gnu_cxx::_S_atomic> >]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocated_ptr.h:103:69,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = oox::xls::PivotTableReference; _Alloc = std::allocator<void>; _Args = {oox::xls::PivotTableFormat&}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1027:9,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {oox::xls::PivotTableFormat&}; _Tp = oox::xls::PivotTableReference; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1805:14,
>     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {oox::xls::PivotTableFormat&}; _Tp = oox::xls::PivotTableReference]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:463:59,
>     inlined from ‘std::shared_ptr<std::_NonArray<_Tp> > std::make_shared(_Args&& ...) [with _Tp = oox::xls::PivotTableReference; _Args = {oox::xls::PivotTableFormat&}]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:1066:39,
>     inlined from ‘oox::xls::PivotTableReference& oox::xls::PivotTableFormat::createReference()’ at sc/source/filter/oox/PivotTableFormat.cxx:125:66:
> ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: object of size 120 allocated by ‘operator new’
>   151 |     return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
>       |                                                                     ^

Change-Id: Idfa85dda898dbcd3f5ff86a5b28c0ac3c84c4169
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197836
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-01-23 08:04:58 +01:00
Stephan Bergmann aa228e60a5 Silence spurious -Werror=maybe-uninitialized
seen at least with recent GCC 16 trunk,

> In file included from unoxml/source/dom/document.hxx:29,
>                  from unoxml/source/dom/document.cxx:22:
> In constructor ‘cppu::ImplInheritanceHelper<BaseClass, Ifc>::ImplInheritanceHelper(Arg&& ...) [with Arg = {DOM::CDocument&, osl::Mutex&, const com::sun::star::xml::dom::NodeType&, _xmlNode*}; BaseClass = DOM::CNode; Ifc = {com::sun::star::xml::dom::XDocument, com::sun::star::xml::dom::events::XDocumentEvent, com::sun::star::io::XActiveDataControl, com::sun::star::io::XActiveDataSource, com::sun::star::xml::sax::XSAXSerializable, com::sun::star::xml::sax::XFastSAXSerializable}]’,
>     inlined from ‘DOM::CDocument::CDocument(xmlDocPtr)’ at unoxml/source/dom/document.cxx:92:58:
> include/cppuhelper/implbase.hxx:152:44: error: ‘<unknown>’ may be used uninitialized [-Werror=maybe-uninitialized]
>   152 |         BaseClass(std::forward<Arg>(arg)...)
>       |                                            ^
> In file included from unoxml/source/dom/document.hxx:50:
> unoxml/inc/node.hxx: In constructor ‘DOM::CDocument::CDocument(xmlDocPtr)’:
> unoxml/inc/node.hxx:110:9: note: by argument 2 of type ‘const DOM::CDocument&’ to ‘DOM::CNode::CNode(const DOM::CDocument&, const osl::Mutex&, const com::sun::star::xml::dom::NodeType&, xmlNode* const&)’ declared here
>   110 |         CNode(CDocument const& rDocument, ::osl::Mutex const& rMutex,
>       |         ^~~~~
> In constructor ‘cppu::ImplInheritanceHelper<BaseClass, Ifc>::ImplInheritanceHelper(Arg&& ...) [with Arg = {DOM::CDocument&, osl::Mutex&, const com::sun::star::xml::dom::NodeType&, _xmlNode*}; BaseClass = DOM::CNode; Ifc = {com::sun::star::xml::dom::XDocument, com::sun::star::xml::dom::events::XDocumentEvent, com::sun::star::io::XActiveDataControl, com::sun::star::io::XActiveDataSource, com::sun::star::xml::sax::XSAXSerializable, com::sun::star::xml::sax::XFastSAXSerializable}]’,
>     inlined from ‘DOM::CDocument::CDocument(xmlDocPtr)’ at unoxml/source/dom/document.cxx:92:58:
> include/cppuhelper/implbase.hxx:152:44: error: ‘<unknown>’ may be used uninitialized [-Werror=maybe-uninitialized]
>   152 |         BaseClass(std::forward<Arg>(arg)...)
>       |                                            ^
> unoxml/inc/node.hxx: In constructor ‘DOM::CDocument::CDocument(xmlDocPtr)’:
> unoxml/inc/node.hxx:110:9: note: by argument 3 of type ‘const osl::Mutex&’ to ‘DOM::CNode::CNode(const DOM::CDocument&, const osl::Mutex&, const com::sun::star::xml::dom::NodeType&, xmlNode* const&)’ declared here
>   110 |         CNode(CDocument const& rDocument, ::osl::Mutex const& rMutex,
>       |         ^~~~~

Change-Id: I9b422727d47b148faf9e7a62ce8220116e32479c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197843
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2026-01-23 08:04:47 +01:00
Stephan Bergmann 980612bf2d Silence spurious -Werror=array-bounds=
seen at least with recent GCC 16 trunk,

> In file included from ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:53,
>                  from ~/gcc/inst/include/c++/16.0.1/memory:82,
>                  from include/rtl/stringconcat.hxx:22,
>                  from include/rtl/string.hxx:51,
>                  from include/rtl/ustring.hxx:45,
>                  from include/com/sun/star/uno/Any.h:30,
>                  from workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/XInterface.hdl:6,
>                  from workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/beans/XPropertySet.hdl:9,
>                  from workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/beans/XPropertySet.hpp:6,
>                  from sw/source/uibase/wrtsh/wrtsh1.cxx:20:
> In destructor ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::~_Sp_counted_ptr_inplace() [with _Tp = SwContentControl; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’,
>     inlined from ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::~_Sp_counted_ptr_inplace() [with _Tp = SwContentControl; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_destroy() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:143:9,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:424:18,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:392:5,
>     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1129:21,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = weld::MessageDialogController; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1603:7,
>     inlined from ‘std::shared_ptr<weld::MessageDialogController>::~shared_ptr()’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
>     inlined from ‘virtual void SwWrtShell::InfoReadOnlyDialog(bool) const’ at sw/source/uibase/wrtsh/wrtsh1.cxx:2834:5:
> ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45: error: array subscript ‘std::_Sp_counted_ptr_inplace<SwContentControl, std::allocator<void>, __gnu_cxx::_S_atomic>[0]’ is partly outside array bounds of ‘unsigned char [80]’ [-Werror=array-bounds=]
>   670 |       ~_Sp_counted_ptr_inplace() noexcept { }
>       |                                             ^
> In file included from ~/gcc/inst/include/c++/16.0.1/x86_64-pc-linux-gnu/bits/c++allocator.h:33,
>                  from ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:46,
>                  from ~/gcc/inst/include/c++/16.0.1/string:46,
>                  from ~/gcc/inst/include/c++/16.0.1/bits/locale_classes.h:43,
>                  from ~/gcc/inst/include/c++/16.0.1/bits/ios_base.h:43,
>                  from ~/gcc/inst/include/c++/16.0.1/ios:46,
>                  from ~/gcc/inst/include/c++/16.0.1/bits/ostream.h:43,
>                  from ~/gcc/inst/include/c++/16.0.1/ostream:42,
>                  from include/rtl/ustring.hxx:34:
> In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_ptr_inplace<weld::MessageDialogController, std::allocator<void>, __gnu_cxx::_S_atomic>]’,
>     inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = std::_Sp_counted_ptr_inplace<weld::MessageDialogController, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:203:40,
>     inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_ptr_inplace<weld::MessageDialogController, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:614:28,
>     inlined from ‘std::__allocated_ptr<_Alloc> std::__allocate_guarded(_Alloc&) [with _Alloc = allocator<_Sp_counted_ptr_inplace<weld::MessageDialogController, allocator<void>, __gnu_cxx::_S_atomic> >]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocated_ptr.h:103:69,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = weld::MessageDialogController; _Alloc = std::allocator<void>; _Args = {weld::Window*, const char (&)[41], const char (&)[19]}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1027:9,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {weld::Window*, const char (&)[41], const char (&)[19]}; _Tp = weld::MessageDialogController; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1805:14,
>     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {weld::Window*, const char (&)[41], const char (&)[19]}; _Tp = weld::MessageDialogController]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:463:59,
>     inlined from ‘std::shared_ptr<std::_NonArray<_Tp> > std::make_shared(_Args&& ...) [with _Tp = weld::MessageDialogController; _Args = {weld::Window*, const char (&)[41], const char (&)[19]}]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:1066:39,
>     inlined from ‘virtual void SwWrtShell::InfoReadOnlyDialog(bool) const’ at sw/source/uibase/wrtsh/wrtsh1.cxx:2826:111:
> ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: object of size 80 allocated by ‘operator new’
>   151 |     return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
>       |                                                                     ^
> In destructor ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::~_Sp_counted_ptr_inplace() [with _Tp = SwContentControl; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’,
>     inlined from ‘void std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_destroy() [with _Tp = SwContentControl; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:684:32,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:424:18,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:392:5,
>     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1129:21,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = weld::MessageDialogController; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1603:7,
>     inlined from ‘std::shared_ptr<weld::MessageDialogController>::~shared_ptr()’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
>     inlined from ‘virtual void SwWrtShell::InfoReadOnlyDialog(bool) const’ at sw/source/uibase/wrtsh/wrtsh1.cxx:2834:5:
> ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45: error: array subscript ‘std::_Sp_counted_ptr_inplace<SwContentControl, std::allocator<void>, __gnu_cxx::_S_atomic>[0]’ is partly outside array bounds of ‘unsigned char [80]’ [-Werror=array-bounds=]
>   670 |       ~_Sp_counted_ptr_inplace() noexcept { }
>       |                                             ^
> In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_ptr_inplace<weld::MessageDialogController, std::allocator<void>, __gnu_cxx::_S_atomic>]’,
>     inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = std::_Sp_counted_ptr_inplace<weld::MessageDialogController, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:203:40,
>     inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_ptr_inplace<weld::MessageDialogController, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:614:28,
>     inlined from ‘std::__allocated_ptr<_Alloc> std::__allocate_guarded(_Alloc&) [with _Alloc = allocator<_Sp_counted_ptr_inplace<weld::MessageDialogController, allocator<void>, __gnu_cxx::_S_atomic> >]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocated_ptr.h:103:69,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = weld::MessageDialogController; _Alloc = std::allocator<void>; _Args = {weld::Window*, const char (&)[41], const char (&)[19]}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1027:9,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {weld::Window*, const char (&)[41], const char (&)[19]}; _Tp = weld::MessageDialogController; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1805:14,
>     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {weld::Window*, const char (&)[41], const char (&)[19]}; _Tp = weld::MessageDialogController]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:463:59,
>     inlined from ‘std::shared_ptr<std::_NonArray<_Tp> > std::make_shared(_Args&& ...) [with _Tp = weld::MessageDialogController; _Args = {weld::Window*, const char (&)[41], const char (&)[19]}]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:1066:39,
>     inlined from ‘virtual void SwWrtShell::InfoReadOnlyDialog(bool) const’ at sw/source/uibase/wrtsh/wrtsh1.cxx:2826:111:
> ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: object of size 80 allocated by ‘operator new’
>   151 |     return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
>       |                                                                     ^

Change-Id: I54717f79621f31061a424fb27204e574b5c7dde1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197841
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2026-01-23 08:04:36 +01:00
Stephan Bergmann e3ea377f2d Make a virtual function non-inline
...which helps avoid some supposedly spurious -Werror=free-nonheap-object seen
at least with recent GCC 16 trunk,

> In destructor ‘virtual SvLockBytes::~SvLockBytes()’,
>     inlined from ‘void SvRefBase::ReleaseRef()’ at include/tools/ref.hxx:160:36,
>     inlined from ‘tools::SvRef<T>::~SvRef() [with T = writerfilter::rtftok::RTFTokenizer]’ at include/tools/ref.hxx:56:46,
>     inlined from ‘writerfilter::rtftok::RTFLookahead::~RTFLookahead()’ at sw/source/writerfilter/rtftok/rtflookahead.cxx:37:1:
> include/tools/stream.hxx:115:48: error: ‘void operator delete(void*, std::size_t)’ called on pointer ‘((tools::SvRef<writerfilter::rtftok::RTFTokenizer>*)this)[1].tools::SvRef<writerfilter::rtftok::RTFTokenizer>::pObj’ with nonzero offset 56 [-Werror=free-nonheap-object]
>   115 |     virtual ~SvLockBytes() override { close(); }
>       |                                                ^

etc.

Change-Id: I26a599f0e3258e6bf6a4d6e63e559b41029862db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197842
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-01-23 08:04:24 +01:00
Stephan Bergmann ae36c06e56 Silence spurious -Werror=array-bounds=
seen at least with recent GCC 16 trunk,

> In file included from ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:53,
>                  from ~/gcc/inst/include/c++/16.0.1/memory:82,
>                  from include/rtl/stringconcat.hxx:22,
>                  from include/rtl/string.hxx:51,
>                  from include/rtl/ustring.hxx:45,
>                  from workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/Exception.hdl:9,
>                  from workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/RuntimeException.hdl:6,
>                  from workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/RuntimeException.hpp:6,
>                  from include/com/sun/star/uno/Reference.hxx:32,
>                  from slideshow/source/inc/shape.hxx:23,
>                  from slideshow/source/inc/box2dtools.hxx:12,
>                  from slideshow/source/engine/box2dtools.cxx:10:
> In destructor ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = b2Body; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1603:7,
>     inlined from ‘std::shared_ptr<b2Body>::~shared_ptr()’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
>     inlined from ‘box2d::utils::box2DBody::~box2DBody()’ at slideshow/source/inc/box2dtools.hxx:333:7,
>     inlined from ‘constexpr void std::destroy_at(_Tp*) [with _Tp = box2d::utils::box2DBody]’ at ~/gcc/inst/include/c++/16.0.1/bits/stl_construct.h:88:18,
>     inlined from ‘constexpr void std::_Destroy(_Tp*) [with _Tp = box2d::utils::box2DBody]’ at ~/gcc/inst/include/c++/16.0.1/bits/stl_construct.h:164:22,
>     inlined from ‘static constexpr void std::allocator_traits<std::allocator<void> >::destroy(allocator_type&, _Up*) [with _Up = box2d::utils::box2DBody]’ at ~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:819:17,
>     inlined from ‘void std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_dispose() [with _Tp = box2d::utils::box2DBody; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:675:35,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:423:18,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:392:5,
>     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1129:21,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = b2Body; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1603:7,
>     inlined from ‘std::shared_ptr<b2Body>::~shared_ptr()’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
>     inlined from ‘box2d::utils::Box2DBodySharedPtr box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)’ at slideshow/source/engine/box2dtools.cxx:731:1:
> ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1128:13: error: array subscript 3 is outside array bounds of ‘std::_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, __gnu_cxx::_S_atomic> [1]’ [-Werror=array-bounds=]
>  1128 |         if (_M_pi != nullptr)
>       |             ^~~~~
> In file included from ~/gcc/inst/include/c++/16.0.1/x86_64-pc-linux-gnu/bits/c++allocator.h:33,
>                  from ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:46,
>                  from ~/gcc/inst/include/c++/16.0.1/string:46,
>                  from ~/gcc/inst/include/c++/16.0.1/bits/locale_classes.h:43,
>                  from ~/gcc/inst/include/c++/16.0.1/bits/ios_base.h:43,
>                  from ~/gcc/inst/include/c++/16.0.1/ios:46,
>                  from ~/gcc/inst/include/c++/16.0.1/bits/ostream.h:43,
>                  from ~/gcc/inst/include/c++/16.0.1/ostream:42,
>                  from include/com/sun/star/uno/Reference.hxx:29:
> In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, __gnu_cxx::_S_atomic>]’,
>     inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = std::_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:203:40,
>     inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:614:28,
>     inlined from ‘std::__allocated_ptr<_Alloc> std::__allocate_guarded(_Alloc&) [with _Alloc = allocator<_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, allocator<void>, __gnu_cxx::_S_atomic> >]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocated_ptr.h:103:69,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Ptr, _Deleter, _Alloc) [with _Ptr = b2Body*; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; _Alloc = std::allocator<void>; <template-parameter-2-4> = void; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1007:13,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Ptr, _Deleter) [with _Ptr = b2Body*; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; <template-parameter-2-3> = void; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:996:57,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(_Yp*, _Deleter) [with _Yp = b2Body; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; <template-parameter-2-3> = void; _Tp = b2Body; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1557:17,
>     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(_Yp*, _Deleter) [with _Yp = b2Body; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; <template-parameter-2-3> = void; _Tp = b2Body]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:231:48,
>     inlined from ‘box2d::utils::Box2DBodySharedPtr box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)’ at slideshow/source/engine/box2dtools.cxx:669:6:
> ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: at offset 24 into object of size 24 allocated by ‘operator new’
>   151 |     return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
>       |                                                                     ^
> In destructor ‘box2d::utils::box2DBody::~box2DBody()’,
>     inlined from ‘constexpr void std::destroy_at(_Tp*) [with _Tp = box2d::utils::box2DBody]’ at ~/gcc/inst/include/c++/16.0.1/bits/stl_construct.h:88:18,
>     inlined from ‘constexpr void std::_Destroy(_Tp*) [with _Tp = box2d::utils::box2DBody]’ at ~/gcc/inst/include/c++/16.0.1/bits/stl_construct.h:164:22,
>     inlined from ‘static constexpr void std::allocator_traits<std::allocator<void> >::destroy(allocator_type&, _Up*) [with _Up = box2d::utils::box2DBody]’ at ~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:819:17,
>     inlined from ‘void std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_dispose() [with _Tp = box2d::utils::box2DBody; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:675:35,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:423:18,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:392:5,
>     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1129:21,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = b2Body; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1603:7,
>     inlined from ‘std::shared_ptr<b2Body>::~shared_ptr()’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
>     inlined from ‘box2d::utils::Box2DBodySharedPtr box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)’ at slideshow/source/engine/box2dtools.cxx:731:1:
> slideshow/source/inc/box2dtools.hxx:333:7: error: array subscript ‘box2d::utils::box2DBody[0]’ is partly outside array bounds of ‘unsigned char [24]’ [-Werror=array-bounds=]
>   333 | class box2DBody
>       |       ^~~~~~~~~
> In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, __gnu_cxx::_S_atomic>]’,
>     inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = std::_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:203:40,
>     inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:614:28,
>     inlined from ‘std::__allocated_ptr<_Alloc> std::__allocate_guarded(_Alloc&) [with _Alloc = allocator<_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, allocator<void>, __gnu_cxx::_S_atomic> >]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocated_ptr.h:103:69,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Ptr, _Deleter, _Alloc) [with _Ptr = b2Body*; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; _Alloc = std::allocator<void>; <template-parameter-2-4> = void; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1007:13,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Ptr, _Deleter) [with _Ptr = b2Body*; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; <template-parameter-2-3> = void; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:996:57,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(_Yp*, _Deleter) [with _Yp = b2Body; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; <template-parameter-2-3> = void; _Tp = b2Body; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1557:17,
>     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(_Yp*, _Deleter) [with _Yp = b2Body; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; <template-parameter-2-3> = void; _Tp = b2Body]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:231:48,
>     inlined from ‘box2d::utils::Box2DBodySharedPtr box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)’ at slideshow/source/engine/box2dtools.cxx:669:6:
> ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: at offset 16 into object of size 24 allocated by ‘operator new’
>   151 |     return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
>       |                                                                     ^
> In destructor ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::~_Sp_counted_ptr_inplace() [with _Tp = box2d::utils::box2DBody; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’,
>     inlined from ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::~_Sp_counted_ptr_inplace() [with _Tp = box2d::utils::box2DBody; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_destroy() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:143:9,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:424:18,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:392:5,
>     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1129:21,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = b2Body; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1603:7,
>     inlined from ‘std::shared_ptr<b2Body>::~shared_ptr()’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
>     inlined from ‘box2d::utils::Box2DBodySharedPtr box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)’ at slideshow/source/engine/box2dtools.cxx:731:1:
> ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45: error: array subscript ‘std::_Sp_counted_ptr_inplace<box2d::utils::box2DBody, std::allocator<void>, __gnu_cxx::_S_atomic>[0]’ is partly outside array bounds of ‘unsigned char [24]’ [-Werror=array-bounds=]
>   670 |       ~_Sp_counted_ptr_inplace() noexcept { }
>       |                                             ^
> In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, __gnu_cxx::_S_atomic>]’,
>     inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = std::_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:203:40,
>     inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:614:28,
>     inlined from ‘std::__allocated_ptr<_Alloc> std::__allocate_guarded(_Alloc&) [with _Alloc = allocator<_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, allocator<void>, __gnu_cxx::_S_atomic> >]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocated_ptr.h:103:69,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Ptr, _Deleter, _Alloc) [with _Ptr = b2Body*; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; _Alloc = std::allocator<void>; <template-parameter-2-4> = void; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1007:13,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Ptr, _Deleter) [with _Ptr = b2Body*; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; <template-parameter-2-3> = void; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:996:57,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(_Yp*, _Deleter) [with _Yp = b2Body; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; <template-parameter-2-3> = void; _Tp = b2Body; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1557:17,
>     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(_Yp*, _Deleter) [with _Yp = b2Body; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; <template-parameter-2-3> = void; _Tp = b2Body]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:231:48,
>     inlined from ‘box2d::utils::Box2DBodySharedPtr box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)’ at slideshow/source/engine/box2dtools.cxx:669:6:
> ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: object of size 24 allocated by ‘operator new’
>   151 |     return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
>       |                                                                     ^
> In destructor ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::~_Sp_counted_ptr_inplace() [with _Tp = box2d::utils::box2DBody; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’,
>     inlined from ‘void std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_destroy() [with _Tp = box2d::utils::box2DBody; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:684:32,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:424:18,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:392:5,
>     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1129:21,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = b2Body; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1603:7,
>     inlined from ‘std::shared_ptr<b2Body>::~shared_ptr()’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
>     inlined from ‘box2d::utils::Box2DBodySharedPtr box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)’ at slideshow/source/engine/box2dtools.cxx:731:1:
> ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45: error: array subscript ‘std::_Sp_counted_ptr_inplace<box2d::utils::box2DBody, std::allocator<void>, __gnu_cxx::_S_atomic>[0]’ is partly outside array bounds of ‘unsigned char [24]’ [-Werror=array-bounds=]
>   670 |       ~_Sp_counted_ptr_inplace() noexcept { }
>       |                                             ^
> In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, __gnu_cxx::_S_atomic>]’,
>     inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = std::_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:203:40,
>     inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:614:28,
>     inlined from ‘std::__allocated_ptr<_Alloc> std::__allocate_guarded(_Alloc&) [with _Alloc = allocator<_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, allocator<void>, __gnu_cxx::_S_atomic> >]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocated_ptr.h:103:69,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Ptr, _Deleter, _Alloc) [with _Ptr = b2Body*; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; _Alloc = std::allocator<void>; <template-parameter-2-4> = void; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1007:13,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Ptr, _Deleter) [with _Ptr = b2Body*; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; <template-parameter-2-3> = void; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:996:57,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(_Yp*, _Deleter) [with _Yp = b2Body; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; <template-parameter-2-3> = void; _Tp = b2Body; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1557:17,
>     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(_Yp*, _Deleter) [with _Yp = b2Body; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; <template-parameter-2-3> = void; _Tp = b2Body]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:231:48,
>     inlined from ‘box2d::utils::Box2DBodySharedPtr box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)’ at slideshow/source/engine/box2dtools.cxx:669:6:
> ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: object of size 24 allocated by ‘operator new’
>   151 |     return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
>       |                                                                     ^

Change-Id: I437410fb3ca777405f8153c13c3e3cc47bc6e8b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197839
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-01-22 22:49:58 +01:00
Stephan Bergmann 3e9763c0ae -Werror=maybe-uninitialized
> xmloff/source/text/txtimppr.cxx:615:9: error: ‘nVertOrient’ may be used uninitialized [-Werror=maybe-uninitialized]
>   615 |         switch( nVertOrient )
>       |         ^~~~~~

So use the same approach for nVertOrient as was already used for nVertOrientRel
in 7ab4c76e73 "INTEGRATION: CWS warningfixes02
(1.18.10); FILE MERGED", initializing it to 0 aka css.text.VertOrientation.NONE.

Change-Id: Ibf9b259f87fb030e426664bc3bbd63fc1bfb0797
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197832
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-01-22 22:49:46 +01:00
Stephan Bergmann 446f995f86 Silence spurious -Werror=uninitialized and -Werror=maybe-uninitialized
seen at least with recent GCC 16 trunk,

> In file included from sw/inc/swatrset.hxx:22,
>                  from sw/inc/format.hxx:27,
>                  from sw/inc/fchrfmt.hxx:23,
>                  from sw/inc/txatbase.hxx:33,
>                  from sw/inc/txtfld.hxx:22,
>                  from sw/source/core/txtnode/atrfld.cxx:25:
> In member function ‘SfxPoolItemHolder::operator bool() const’,
>     inlined from ‘const SfxPoolItem& SwTextAttr::GetAttr() const’ at sw/inc/txatbase.hxx:175:5,
>     inlined from ‘SfxPoolItem& SwTextAttr::GetAttr()’ at sw/inc/txatbase.hxx:181:65,
>     inlined from ‘SwTextField::SwTextField(const SfxPoolItemHolder&, sal_Int32, bool)’ at sw/source/core/txtnode/atrfld.cxx:603:70:
> include/svl/itemset.hxx:72:56: error: ‘*(const SfxPoolItemHolder*)((char*)<unknown> + 8).SfxPoolItemHolder::m_pItem’ is used uninitialized [-Werror=uninitialized]
>    72 |     explicit operator bool() const { return nullptr != m_pItem; }
>       |                                                        ^~~~~~~
> In member function ‘bool SfxPoolItemHolder::isDeleted() const’,
>     inlined from ‘const SfxPoolItem* SfxPoolItemHolder::getItem() const’ at include/svl/itemset.hxx:69:42,
>     inlined from ‘const SfxPoolItem& SwTextAttr::GetAttr() const’ at sw/inc/txatbase.hxx:176:28,
>     inlined from ‘SfxPoolItem& SwTextAttr::GetAttr()’ at sw/inc/txatbase.hxx:181:65,
>     inlined from ‘SwTextField::SwTextField(const SfxPoolItemHolder&, sal_Int32, bool)’ at sw/source/core/txtnode/atrfld.cxx:603:70:
> include/svl/itemset.hxx:62:37: error: ‘*(const SfxPoolItemHolder*)((char*)<unknown> + 8).SfxPoolItemHolder::m_bDeleted’ may be used uninitialized [-Werror=maybe-uninitialized]
>    62 |     bool isDeleted() const { return m_bDeleted; }
>       |                                     ^~~~~~~~~~

Change-Id: Id02928cf69afa850f97fe3f1eff958055f2a9302
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197840
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2026-01-22 22:49:32 +01:00
Stephan Bergmann 713e048c23 Silence spurious -Werror=array-bounds=
seen at least with recent GCC 16 trunk,

> In file included from ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:53,
>                  from ~/gcc/inst/include/c++/16.0.1/memory:82,
>                  from include/oox/helper/refvector.hxx:25,
>                  from sc/source/filter/inc/tablecolumnsbuffer.hxx:22,
>                  from sc/source/filter/oox/tablecolumnsbuffer.cxx:20:
> In destructor ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::~_Sp_counted_ptr_inplace() [with _Tp = oox::xls::TableColumns; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’,
>     inlined from ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::~_Sp_counted_ptr_inplace() [with _Tp = oox::xls::TableColumns; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_destroy() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:143:9,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:424:18,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:392:5,
>     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1129:21,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = oox::xls::TableColumn; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1603:7,
>     inlined from ‘std::shared_ptr<oox::xls::TableColumn>::~shared_ptr()’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
>     inlined from ‘oox::xls::TableColumn& oox::xls::TableColumns::createTableColumn()’ at sc/source/filter/oox/tablecolumnsbuffer.cxx:110:1:
> ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45: error: array subscript ‘std::_Sp_counted_ptr_inplace<oox::xls::TableColumns, std::allocator<void>, __gnu_cxx::_S_atomic>[0]’ is partly outside array bounds of ‘unsigned char [80]’ [-Werror=array-bounds=]
>   670 |       ~_Sp_counted_ptr_inplace() noexcept { }
>       |                                             ^
> In file included from ~/gcc/inst/include/c++/16.0.1/x86_64-pc-linux-gnu/bits/c++allocator.h:33,
>                  from ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:46,
>                  from ~/gcc/inst/include/c++/16.0.1/string:46,
>                  from ~/gcc/inst/include/c++/16.0.1/bits/stdexcept_throw.h:57,
>                  from ~/gcc/inst/include/c++/16.0.1/bits/hashtable_policy.h:35,
>                  from ~/gcc/inst/include/c++/16.0.1/bits/hashtable.h:37,
>                  from ~/gcc/inst/include/c++/16.0.1/bits/unordered_map.h:33,
>                  from ~/gcc/inst/include/c++/16.0.1/unordered_map:43,
>                  from ~/gcc/inst/include/c++/16.0.1/functional:80,
>                  from include/oox/helper/refvector.hxx:24:
> In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_ptr_inplace<oox::xls::TableColumn, std::allocator<void>, __gnu_cxx::_S_atomic>]’,
>     inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = std::_Sp_counted_ptr_inplace<oox::xls::TableColumn, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:203:40,
>     inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_ptr_inplace<oox::xls::TableColumn, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:614:28,
>     inlined from ‘std::__allocated_ptr<_Alloc> std::__allocate_guarded(_Alloc&) [with _Alloc = allocator<_Sp_counted_ptr_inplace<oox::xls::TableColumn, allocator<void>, __gnu_cxx::_S_atomic> >]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocated_ptr.h:103:69,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = oox::xls::TableColumn; _Alloc = std::allocator<void>; _Args = {oox::xls::TableColumns&}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1027:9,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {oox::xls::TableColumns&}; _Tp = oox::xls::TableColumn; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1805:14,
>     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {oox::xls::TableColumns&}; _Tp = oox::xls::TableColumn]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:463:59,
>     inlined from ‘std::shared_ptr<std::_NonArray<_Tp> > std::make_shared(_Args&& ...) [with _Tp = oox::xls::TableColumn; _Args = {oox::xls::TableColumns&}]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:1066:39,
>     inlined from ‘oox::xls::TableColumn& oox::xls::TableColumns::createTableColumn()’ at sc/source/filter/oox/tablecolumnsbuffer.cxx:107:87:
> ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: object of size 80 allocated by ‘operator new’
>   151 |     return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
>       |                                                                     ^
> In destructor ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::~_Sp_counted_ptr_inplace() [with _Tp = oox::xls::TableColumns; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’,
>     inlined from ‘void std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_destroy() [with _Tp = oox::xls::TableColumns; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:684:32,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:424:18,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:392:5,
>     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1129:21,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = oox::xls::TableColumn; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1603:7,
>     inlined from ‘std::shared_ptr<oox::xls::TableColumn>::~shared_ptr()’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
>     inlined from ‘oox::xls::TableColumn& oox::xls::TableColumns::createTableColumn()’ at sc/source/filter/oox/tablecolumnsbuffer.cxx:110:1:
> ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45: error: array subscript ‘std::_Sp_counted_ptr_inplace<oox::xls::TableColumns, std::allocator<void>, __gnu_cxx::_S_atomic>[0]’ is partly outside array bounds of ‘unsigned char [80]’ [-Werror=array-bounds=]
>   670 |       ~_Sp_counted_ptr_inplace() noexcept { }
>       |                                             ^
> In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_ptr_inplace<oox::xls::TableColumn, std::allocator<void>, __gnu_cxx::_S_atomic>]’,
>     inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = std::_Sp_counted_ptr_inplace<oox::xls::TableColumn, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:203:40,
>     inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_ptr_inplace<oox::xls::TableColumn, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:614:28,
>     inlined from ‘std::__allocated_ptr<_Alloc> std::__allocate_guarded(_Alloc&) [with _Alloc = allocator<_Sp_counted_ptr_inplace<oox::xls::TableColumn, allocator<void>, __gnu_cxx::_S_atomic> >]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocated_ptr.h:103:69,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = oox::xls::TableColumn; _Alloc = std::allocator<void>; _Args = {oox::xls::TableColumns&}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1027:9,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {oox::xls::TableColumns&}; _Tp = oox::xls::TableColumn; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1805:14,
>     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {oox::xls::TableColumns&}; _Tp = oox::xls::TableColumn]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:463:59,
>     inlined from ‘std::shared_ptr<std::_NonArray<_Tp> > std::make_shared(_Args&& ...) [with _Tp = oox::xls::TableColumn; _Args = {oox::xls::TableColumns&}]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:1066:39,
>     inlined from ‘oox::xls::TableColumn& oox::xls::TableColumns::createTableColumn()’ at sc/source/filter/oox/tablecolumnsbuffer.cxx:107:87:
> ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: object of size 80 allocated by ‘operator new’
>   151 |     return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
>       |                                                                     ^

Change-Id: I5f42c82dba453bd656fc16173a08d19d61186bbc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197837
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-01-22 22:49:18 +01:00
Stephan Bergmann 2399414291 -Werror=maybe-uninitialized
Change-Id: I0933c67f66513eb6a16b4d3ecb35eec761f452bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197835
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-01-22 22:49:03 +01:00
Stephan Bergmann 0360f4d2d2 Silence spurious -Werror=array-bounds=
seen at least with recent GCC 16 trunk,

> In file included from ~/gcc/inst/include/c++/16.0.1/bits/char_traits.h:59,
>                  from ~/gcc/inst/include/c++/16.0.1/ios:44,
>                  from ~/gcc/inst/include/c++/16.0.1/bits/ostream.h:43,
>                  from ~/gcc/inst/include/c++/16.0.1/ostream:42,
>                  from include/rtl/ustring.hxx:34,
>                  from include/com/sun/star/uno/Any.h:30,
>                  from include/cppuhelper/implbase_ex.hxx:26,
>                  from include/cppuhelper/implbase5.hxx:26,
>                  from dbaccess/source/core/inc/querycontainer.hxx:22,
>                  from dbaccess/source/core/api/querycontainer.cxx:20:
> In function ‘constexpr void std::destroy_at(_Tp*) [with _Tp = dbaccess::ODefinitionContainer_Impl]’,
>     inlined from ‘constexpr void std::_Destroy(_Tp*) [with _Tp = dbaccess::ODefinitionContainer_Impl]’ at ~/gcc/inst/include/c++/16.0.1/bits/stl_construct.h:164:22,
>     inlined from ‘static constexpr void std::allocator_traits<std::allocator<void> >::destroy(allocator_type&, _Up*) [with _Up = dbaccess::ODefinitionContainer_Impl]’ at ~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:819:17,
>     inlined from ‘void std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_dispose() [with _Tp = dbaccess::ODefinitionContainer_Impl; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:675:35,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:423:18,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:392:5,
>     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1129:21,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = dbaccess::IContainerApprove; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1603:7,
>     inlined from ‘std::shared_ptr<dbaccess::IContainerApprove>::~shared_ptr()’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
>     inlined from ‘void dbaccess::OQueryContainer::init()’ at dbaccess/source/core/api/querycontainer.cxx:87:61:
> ~/gcc/inst/include/c++/16.0.1/bits/stl_construct.h:88:25: error: array subscript ‘dbaccess::ODefinitionContainer_Impl[0]’ is partly outside array bounds of ‘unsigned char [40]’ [-Werror=array-bounds=]
>    88 |         __location->~_Tp();
>       |         ~~~~~~~~~~~~~~~~^~
> In file included from ~/gcc/inst/include/c++/16.0.1/x86_64-pc-linux-gnu/bits/c++allocator.h:33,
>                  from ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:46,
>                  from ~/gcc/inst/include/c++/16.0.1/string:46,
>                  from ~/gcc/inst/include/c++/16.0.1/bits/locale_classes.h:43,
>                  from ~/gcc/inst/include/c++/16.0.1/bits/ios_base.h:43,
>                  from ~/gcc/inst/include/c++/16.0.1/ios:46:
> In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_ptr_inplace<dbaccess::ObjectNameApproval, std::allocator<void>, __gnu_cxx::_S_atomic>]’,
>     inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = std::_Sp_counted_ptr_inplace<dbaccess::ObjectNameApproval, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:203:40,
>     inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_ptr_inplace<dbaccess::ObjectNameApproval, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:614:28,
>     inlined from ‘std::__allocated_ptr<_Alloc> std::__allocate_guarded(_Alloc&) [with _Alloc = allocator<_Sp_counted_ptr_inplace<dbaccess::ObjectNameApproval, allocator<void>, __gnu_cxx::_S_atomic> >]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocated_ptr.h:103:69,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = dbaccess::ObjectNameApproval; _Alloc = std::allocator<void>; _Args = {com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, dbaccess::ObjectNameApproval::ObjectType}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1027:9,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, dbaccess::ObjectNameApproval::ObjectType}; _Tp = dbaccess::ObjectNameApproval; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1805:14,
>     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, dbaccess::ObjectNameApproval::ObjectType}; _Tp = dbaccess::ObjectNameApproval]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:463:59,
>     inlined from ‘std::shared_ptr<std::_NonArray<_Tp> > std::make_shared(_Args&& ...) [with _Tp = dbaccess::ObjectNameApproval; _Args = {com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, dbaccess::ObjectNameApproval::ObjectType}]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:1066:39,
>     inlined from ‘void dbaccess::OQueryContainer::init()’ at dbaccess/source/core/api/querycontainer.cxx:87:61:
> ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: at offset 16 into object of size 40 allocated by ‘operator new’
>   151 |     return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
>       |                                                                     ^
> In file included from ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:53,
>                  from ~/gcc/inst/include/c++/16.0.1/memory:82,
>                  from include/rtl/stringconcat.hxx:22,
>                  from include/rtl/string.hxx:51,
>                  from include/rtl/ustring.hxx:45:
> In destructor ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::~_Sp_counted_ptr_inplace() [with _Tp = dbaccess::ODefinitionContainer_Impl; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’,
>     inlined from ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::~_Sp_counted_ptr_inplace() [with _Tp = dbaccess::ODefinitionContainer_Impl; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_destroy() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:143:9,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:424:18,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:392:5,
>     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1129:21,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = dbaccess::IContainerApprove; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1603:7,
>     inlined from ‘std::shared_ptr<dbaccess::IContainerApprove>::~shared_ptr()’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
>     inlined from ‘void dbaccess::OQueryContainer::init()’ at dbaccess/source/core/api/querycontainer.cxx:87:61:
> ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45: error: array subscript ‘std::_Sp_counted_ptr_inplace<dbaccess::ODefinitionContainer_Impl, std::allocator<void>, __gnu_cxx::_S_atomic>[0]’ is partly outside array bounds of ‘unsigned char [40]’ [-Werror=array-bounds=]
>   670 |       ~_Sp_counted_ptr_inplace() noexcept { }
>       |                                             ^
> In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_ptr_inplace<dbaccess::ObjectNameApproval, std::allocator<void>, __gnu_cxx::_S_atomic>]’,
>     inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = std::_Sp_counted_ptr_inplace<dbaccess::ObjectNameApproval, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:203:40,
>     inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_ptr_inplace<dbaccess::ObjectNameApproval, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:614:28,
>     inlined from ‘std::__allocated_ptr<_Alloc> std::__allocate_guarded(_Alloc&) [with _Alloc = allocator<_Sp_counted_ptr_inplace<dbaccess::ObjectNameApproval, allocator<void>, __gnu_cxx::_S_atomic> >]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocated_ptr.h:103:69,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = dbaccess::ObjectNameApproval; _Alloc = std::allocator<void>; _Args = {com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, dbaccess::ObjectNameApproval::ObjectType}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1027:9,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, dbaccess::ObjectNameApproval::ObjectType}; _Tp = dbaccess::ObjectNameApproval; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1805:14,
>     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, dbaccess::ObjectNameApproval::ObjectType}; _Tp = dbaccess::ObjectNameApproval]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:463:59,
>     inlined from ‘std::shared_ptr<std::_NonArray<_Tp> > std::make_shared(_Args&& ...) [with _Tp = dbaccess::ObjectNameApproval; _Args = {com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, dbaccess::ObjectNameApproval::ObjectType}]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:1066:39,
>     inlined from ‘void dbaccess::OQueryContainer::init()’ at dbaccess/source/core/api/querycontainer.cxx:87:61:
> ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: object of size 40 allocated by ‘operator new’
>   151 |     return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
>       |                                                                     ^
> In destructor ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::~_Sp_counted_ptr_inplace() [with _Tp = dbaccess::ODefinitionContainer_Impl; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’,
>     inlined from ‘void std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_destroy() [with _Tp = dbaccess::ODefinitionContainer_Impl; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:684:32,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:424:18,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:392:5,
>     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1129:21,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = dbaccess::IContainerApprove; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1603:7,
>     inlined from ‘std::shared_ptr<dbaccess::IContainerApprove>::~shared_ptr()’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
>     inlined from ‘void dbaccess::OQueryContainer::init()’ at dbaccess/source/core/api/querycontainer.cxx:87:61:
> ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45: error: array subscript ‘std::_Sp_counted_ptr_inplace<dbaccess::ODefinitionContainer_Impl, std::allocator<void>, __gnu_cxx::_S_atomic>[0]’ is partly outside array bounds of ‘unsigned char [40]’ [-Werror=array-bounds=]
>   670 |       ~_Sp_counted_ptr_inplace() noexcept { }
>       |                                             ^
> In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_ptr_inplace<dbaccess::ObjectNameApproval, std::allocator<void>, __gnu_cxx::_S_atomic>]’,
>     inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = std::_Sp_counted_ptr_inplace<dbaccess::ObjectNameApproval, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:203:40,
>     inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_ptr_inplace<dbaccess::ObjectNameApproval, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:614:28,
>     inlined from ‘std::__allocated_ptr<_Alloc> std::__allocate_guarded(_Alloc&) [with _Alloc = allocator<_Sp_counted_ptr_inplace<dbaccess::ObjectNameApproval, allocator<void>, __gnu_cxx::_S_atomic> >]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocated_ptr.h:103:69,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = dbaccess::ObjectNameApproval; _Alloc = std::allocator<void>; _Args = {com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, dbaccess::ObjectNameApproval::ObjectType}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1027:9,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, dbaccess::ObjectNameApproval::ObjectType}; _Tp = dbaccess::ObjectNameApproval; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1805:14,
>     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, dbaccess::ObjectNameApproval::ObjectType}; _Tp = dbaccess::ObjectNameApproval]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:463:59,
>     inlined from ‘std::shared_ptr<std::_NonArray<_Tp> > std::make_shared(_Args&& ...) [with _Tp = dbaccess::ObjectNameApproval; _Args = {com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, dbaccess::ObjectNameApproval::ObjectType}]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:1066:39,
>     inlined from ‘void dbaccess::OQueryContainer::init()’ at dbaccess/source/core/api/querycontainer.cxx:87:61:
> ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: object of size 40 allocated by ‘operator new’
>   151 |     return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
>       |                                                                     ^

Change-Id: I089a58793649d892e88b7e3632c8b61f89b0a60c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197834
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-01-22 22:48:48 +01:00
Stephan Bergmann 56a43e0966 Silence spurious -Werror=array-bounds=
seen at least with recent GCC 16 trunk,

> In member function ‘virtual void SbModule::SetParent(SbxObject*)’,
>     inlined from ‘virtual SbxVariable* SbModule::Find(const rtl::OUString&, SbxClassType)’ at basic/source/classes/sbxmod.cxx:653:36:
> basic/source/classes/sbxmod.cxx:671:13: error: array subscript ‘SbModule[0]’ is partly outside array bounds of ‘unsigned char [152]’ [-Werror=array-bounds=]
>   671 |     pParent = p;
>       |     ~~~~~~~~^~~
> basic/source/classes/sbxmod.cxx: In member function ‘virtual SbxVariable* SbModule::Find(const rtl::OUString&, SbxClassType)’:
> basic/source/classes/sbxmod.cxx:651:55: note: object of size 152 allocated by ‘operator new’
>   651 |                     pRes = new SbxVariable( SbxOBJECT );
>       |                                                       ^

Change-Id: I0823b28063b6e224f9cc28aee55fd21e2f21aa1a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197833
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-01-22 22:48:32 +01:00
Stephan Bergmann 8fb5be18f8 Use OStringBuffer as a pad for the mutable string passed to mkstemp
...by introducing OStringBuffer::getMutableStr and (for consistency)
OUStringBuffer::getMutableStr

Change-Id: I4dfc3b8d8ffb49b8b3742600081d075536b312e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197605
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2026-01-20 07:33:22 +01:00
Stephan Bergmann 25b197e063 missing includes
Change-Id: Iaab5ac2575e5b4b4365148fa3c9c645e7f4836e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197239
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-01-14 10:53:45 +01:00
Stephan Bergmann 47a8c139a4 external/poppler: missing includes (for INT_MAX etc.)
Change-Id: I7189b126b335a70e045adb46676c3271f6a113cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197236
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2026-01-14 09:20:28 +01:00
Stephan Bergmann 64c0efa33f Don't consider semantics for three-segment bootstrap var refs erroneous
I had added that comment back in 4a415c4c5a
"INTEGRATION: CWS sb83 (1.39.26); FILE MERGED", but on second thought, it might
be better to consider a three-segment botostrap variable reference of the form
${file:section:key} (which are hardly used anywhere, if at all, anyway) to do
something special:  It reads the "'osl' profile" <file> and uses the value (if
any) for the given <section> and <key>, without expanding it any further, by
design.

That's in line with what the documentation in OOo's CVS
udk/www/common/man/concept/uno_default_bootstrapping.html said,

>                                 <li>
>                                 Allow indirect expansion of variables through 'osl' profiles:
>                                 <br/>
>                                 KEYVALUE=${sversionrc:versions:StarOffice6.0}
>                                 <br/>
>                                 The first part of the indirection is the file to use for
>                                 expansion, the second part is
>                                 the section and the third part is the key. After expansion the
>                                 variable KEYVALUE has
>                                 the value of the matching key of the sversionrc.
>                                 </li>

and what the original code in OOo's CVS porting/sal/rtl/source/macro.cxx
ArgParserState::expandTerm did,

>                 // do we have a section?
>                 OUString value;
>                 if (section.getLength())
>                 {
>                         // expand from profile
>                         oslProfile hProfile;
[...]
>                 }
>                 else
>                 {
>                         // expand from ini:

And it's also in line with the documentation in include/rtl/bootstrap.h stating

>    An ini-file is only allowed to have one section, which must be named
>    `[Bootstrap]` with the square brackets.
>    The section may be omitted.

Which implies that the <file> in a ${file:section:key} reference is not actually
a bootstrap ini-file (but rather an "'osl' profile"), because those bootstrap
ini-files should not have multiple sections anyway.

Change-Id: Iaf6e97a61fe5a4a330451794a62067b4add20a05
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196674
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-01-07 17:19:19 +01:00
Stephan Bergmann 1ffc2b44e4 Actually use "..."_tstr
...after 6fce450b8a "Introduce "..."_tstr as a
companion to "..."_ostr/u"..."_ustr in template code" had introduced it for
exactly this piece of code

Change-Id: I767a9f39456d6c58c5ac0478110a0c66434b0e54
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196626
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2026-01-07 08:06:21 +01:00