-
-
Notifications
You must be signed in to change notification settings - Fork 649
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug 124443 - AutoInput tooltip positioning is inconsistent when editing formula, covering different parts of UI #24
Conversation
…overing different parts of UI
Before all: thanks for contributing to LibreOffice! This patch seems off; it touches too many files. The LibreOffice project doesn’t use GitHub PRs for its development—as stated above the repo, this is only a mirror. Please send your patch through Gerrit and format your commit message to indicate the bug number like this: tdf#124443. See https://wiki.documentfoundation.org/Gerrit for instructions. Feel free to ask questions through IRC on #libreoffice-dev @ freenode |
…g formula, covering different parts of UI
...before the destruction of the std::unique_ptr<SbxAppData> xSbxAppData; member during the destruction of BasicDLLImpl can set that BasicDLLImpl::xSbxAppData to null. Because the destruction of SbxAppData::m_aGlobErr may call into SbxValue::Put -> SbxBase::GetError -> GetSbxData_Impl, which would recursively access that return *BasicDLLImpl::BASIC_DLL->xSbxAppData; This causes problems with libc++ (i.e., on macOS), where ~std::unique_ptr sets its internal pointer to null before calling the destructor of the pointed-to object. Whereas it happens to not cause problems with e.g. libstdc++, where ~std::unique_ptr calls the destructor of the pointed-to object first before setting the pointer to null. The problem showed up with <https://gerrit.libreoffice.org/c/core/+/85017/14> "VBA Err object raise method TestCases", where CppunitTest_basic_macros kept failing on macOS with > * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0) > frame #0: 0x00000001119f18e7 libsblo.dylib`SbxValue::Put(this=0x000000014c1cff00, rVal=0x00007ffeefbf1218) + 55 at basic/source/sbx/sbxvalue.cxx:414 > 411 bool SbxValue::Put( const SbxValues& rVal ) > 412 { > 413 bool bRes = false; > -> 414 ErrCode eOld = GetError(); > 415 if( eOld != ERRCODE_NONE ) > 416 ResetError(); > 417 if( !CanWrite() ) > Target 0: (cppunittester) stopped. > (lldb) bt > * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0) > * frame #0: 0x00000001119f18e7 libsblo.dylib`SbxValue::Put(this=0x000000014c1cff00, rVal=0x00007ffeefbf1218) + 55 at basic/source/sbx/sbxvalue.cxx:414 > frame #1: 0x00000001119f2399 libsblo.dylib`SbxValue::Clear(this=0x000000014c1cff00) + 553 at basic/source/sbx/sbxvalue.cxx:176 > frame #2: 0x00000001119f20d0 libsblo.dylib`SbxValue::~SbxValue(this=0x000000014c1cff00, vtt=0x0000000111a2af70) + 80 at basic/source/sbx/sbxvalue.cxx:139 > frame #3: 0x00000001119f825d libsblo.dylib`SbxVariable::~SbxVariable(this=0x000000014c1cff00, vtt=0x0000000111a2af68) + 381 at basic/source/sbx/sbxvar.cxx:125 > frame #4: 0x00000001119e619a libsblo.dylib`SbxProperty::~SbxProperty(this=0x000000014c1cff00, vtt=0x0000000111a2af60) + 42 at basic/source/sbx/sbxobj.cxx:861 > frame #5: 0x000000011188ce81 libsblo.dylib`SbUnoProperty::~SbUnoProperty(this=0x000000014c1cff00, vtt=0x0000000111a2af58) + 97 at basic/source/classes/sbunoobj.cxx:2591 > frame #6: 0x000000011188ceb3 libsblo.dylib`SbUnoProperty::~SbUnoProperty(this=0x000000014c1cff00) + 35 at basic/source/classes/sbunoobj.cxx:2591 > frame #7: 0x000000011188cf0c libsblo.dylib`SbUnoProperty::~SbUnoProperty(this=0x000000014c1cff00) + 28 at basic/source/classes/sbunoobj.cxx:2591 > frame #8: 0x000000011180c235 libsblo.dylib`SvRefBase::ReleaseRef(this=0x000000014c1cffa0) + 197 at include/tools/ref.hxx:163 > frame #9: 0x000000011184fda7 libsblo.dylib`tools::SvRef<SbxVariable>::~SvRef(this=0x000000014c1d2490) + 55 at include/tools/ref.hxx:56 > frame #10: 0x000000011184a545 libsblo.dylib`tools::SvRef<SbxVariable>::~SvRef(this=0x000000014c1d2490) + 21 at include/tools/ref.hxx:55 > frame #11: 0x00000001119be5af libsblo.dylib`SbxVarEntry::~SbxVarEntry(this=0x000000014c1d2490) + 47 at basic/source/sbx/sbxarray.cxx:31 > frame #12: 0x00000001119bc3d5 libsblo.dylib`SbxVarEntry::~SbxVarEntry(this=0x000000014c1d2490) + 21 at basic/source/sbx/sbxarray.cxx:31 > frame #13: 0x00000001119bed29 libsblo.dylib`std::__1::allocator<SbxVarEntry>::destroy(this=0x000000014c1940a0, __p=0x000000014c1d2490) + 25 at c++/v1/memory:1931 > frame #14: 0x00000001119becfd libsblo.dylib`void std::__1::allocator_traits<std::__1::allocator<SbxVarEntry> >::__destroy<SbxVarEntry>((null)=std::__1::true_type @ 0x00007ffeefbf1448, __a=0x000000014c1940a0, __p=0x000000014c1d2490) + 29 at c++/v1/memory:1793 > frame #15: 0x00000001119beccd libsblo.dylib`void std::__1::allocator_traits<std::__1::allocator<SbxVarEntry> >::destroy<SbxVarEntry>(__a=0x000000014c1940a0, __p=0x000000014c1d2490) + 29 at c++/v1/memory:1630 > frame #16: 0x00000001119bec7b libsblo.dylib`std::__1::__vector_base<SbxVarEntry, std::__1::allocator<SbxVarEntry> >::__destruct_at_end(this=0x000000014c194090, __new_last=0x000000014c1d2490) + 91 at c++/v1/vector:426 > frame #17: 0x00000001119bebab libsblo.dylib`std::__1::__vector_base<SbxVarEntry, std::__1::allocator<SbxVarEntry> >::clear(this=0x000000014c194090) + 27 at c++/v1/vector:369 > frame #18: 0x00000001119bea47 libsblo.dylib`std::__1::__vector_base<SbxVarEntry, std::__1::allocator<SbxVarEntry> >::~__vector_base(this=0x000000014c194090) + 39 at c++/v1/vector:463 > frame #19: 0x00000001119be958 libsblo.dylib`std::__1::vector<SbxVarEntry, std::__1::allocator<SbxVarEntry> >::~vector(this=0x000000014c194090 size=3) + 40 at c++/v1/vector:555 > frame #20: 0x00000001119bafa5 libsblo.dylib`std::__1::vector<SbxVarEntry, std::__1::allocator<SbxVarEntry> >::~vector(this=0x000000014c194090 size=3) + 21 at c++/v1/vector:550 > frame #21: 0x00000001119bb457 libsblo.dylib`SbxArray::~SbxArray(this=0x000000014c194080, vtt=0x0000000111a385e8) + 71 at basic/source/sbx/sbxarray.cxx:75 > frame #22: 0x00000001119bb4a3 libsblo.dylib`SbxArray::~SbxArray(this=0x000000014c194080) + 35 at basic/source/sbx/sbxarray.cxx:74 > frame #23: 0x00000001119bb4fc libsblo.dylib`SbxArray::~SbxArray(this=0x000000014c194080) + 28 at basic/source/sbx/sbxarray.cxx:74 > frame #24: 0x000000011180c235 libsblo.dylib`SvRefBase::ReleaseRef(this=0x000000014c194080) + 197 at include/tools/ref.hxx:163 > frame #25: 0x000000011184dbd7 libsblo.dylib`tools::SvRef<SbxArray>::~SvRef(this=0x000000014c1cfe58) + 55 at include/tools/ref.hxx:56 > frame #26: 0x000000011184cc25 libsblo.dylib`tools::SvRef<SbxArray>::~SvRef(this=0x000000014c1cfe58) + 21 at include/tools/ref.hxx:55 > frame #27: 0x00000001119e0d10 libsblo.dylib`SbxObject::~SbxObject(this=0x000000014c1cfdd0, vtt=0x0000000111a37d18) + 288 at basic/source/sbx/sbxobj.cxx:111 > frame #28: 0x000000011188b73d libsblo.dylib`SbUnoObject::~SbUnoObject(this=0x000000014c1cfdd0, vtt=0x0000000111a37d10) + 221 at basic/source/classes/sbunoobj.cxx:2387 > frame #29: 0x0000000111990d51 libsblo.dylib`SbxErrObject::~SbxErrObject(this=0x000000014c1cfdd0, vtt=0x0000000111a37d08) + 113 at basic/source/classes/errobject.cxx:184 > frame #30: 0x0000000111990d83 libsblo.dylib`SbxErrObject::~SbxErrObject(this=0x000000014c1cfdd0) + 35 at basic/source/classes/errobject.cxx:183 > frame #31: 0x0000000111990dfc libsblo.dylib`SbxErrObject::~SbxErrObject(this=0x000000014c1cfdd0) + 28 at basic/source/classes/errobject.cxx:183 > frame #32: 0x000000011180c235 libsblo.dylib`SvRefBase::ReleaseRef(this=0x000000014c1cfee8) + 197 at include/tools/ref.hxx:163 > frame #33: 0x00000001119bcac6 libsblo.dylib`tools::SvRef<SbxVariable>::clear(this=0x0000000110e365a8) + 70 at include/tools/ref.hxx:64 > frame #34: 0x00000001119ca764 libsblo.dylib`SbxAppData::~SbxAppData(this=0x0000000110e365a0) + 84 at basic/source/sbx/sbxbase.cxx:49 > frame #35: 0x00000001119ca965 libsblo.dylib`SbxAppData::~SbxAppData(this=0x0000000110e365a0) + 21 at basic/source/sbx/sbxbase.cxx:45 > frame #36: 0x000000011199272b libsblo.dylib`std::__1::default_delete<SbxAppData>::operator(this=0x0000000110e2cfb0, __ptr=0x0000000110e365a0)(SbxAppData*) const + 43 at c++/v1/memory:2363 > frame #37: 0x00000001119926af libsblo.dylib`std::__1::unique_ptr<SbxAppData, std::__1::default_delete<SbxAppData> >::reset(this=0x0000000110e2cfb0, __p=0x0000000000000000) + 95 at c++/v1/memory:2618 > frame #38: 0x0000000111992649 libsblo.dylib`std::__1::unique_ptr<SbxAppData, std::__1::default_delete<SbxAppData> >::~unique_ptr(this=0x0000000110e2cfb0) + 25 at c++/v1/memory:2572 > frame #39: 0x0000000111992625 libsblo.dylib`std::__1::unique_ptr<SbxAppData, std::__1::default_delete<SbxAppData> >::~unique_ptr(this=0x0000000110e2cfb0) + 21 at c++/v1/memory:2572 > frame #40: 0x00000001119925f5 libsblo.dylib`(anonymous namespace)::BasicDLLImpl::~BasicDLLImpl(this=0x0000000110e2cfa0) + 53 at basic/source/runtime/basrdll.cxx:33 > frame #41: 0x0000000111992415 libsblo.dylib`(anonymous namespace)::BasicDLLImpl::~BasicDLLImpl(this=0x0000000110e2cfa0) + 21 at basic/source/runtime/basrdll.cxx:33 > frame #42: 0x000000011199243c libsblo.dylib`(anonymous namespace)::BasicDLLImpl::~BasicDLLImpl(this=0x0000000110e2cfa0) + 28 at basic/source/runtime/basrdll.cxx:33 > frame #43: 0x000000011180c235 libsblo.dylib`SvRefBase::ReleaseRef(this=0x0000000110e2cfa0) + 197 at include/tools/ref.hxx:163 > frame #44: 0x0000000111992039 libsblo.dylib`tools::SvRef<SvRefBase>::clear(this=0x00007ffeefbf1bb0) + 57 at include/tools/ref.hxx:64 > frame #45: 0x0000000111991f0b libsblo.dylib`BasicDLL::~BasicDLL(this=0x00007ffeefbf1bb0) + 123 at basic/source/runtime/basrdll.cxx:69 > frame #46: 0x0000000111992055 libsblo.dylib`BasicDLL::~BasicDLL(this=0x00007ffeefbf1bb0) + 21 at basic/source/runtime/basrdll.cxx:66 > frame #47: 0x0000000110f07a5a libtest_basic_macros.dylib`MacroSnippet::~MacroSnippet(this=0x00007ffeefbf1ba8) + 74 at basic/qa/cppunit/basictest.hxx:23 > frame #48: 0x0000000110f07a05 libtest_basic_macros.dylib`MacroSnippet::~MacroSnippet(this=0x00007ffeefbf1ba8) + 21 at basic/qa/cppunit/basictest.hxx:23 > frame #49: 0x0000000110f269b7 libtest_basic_macros.dylib`(anonymous namespace)::VBATest::testMiscVBAFunctions(this=0x0000000100651890) + 1319 at basic/qa/cppunit/test_vba.cxx:168 [...] Change-Id: I776b7f0686e0915b69119b2e6a513e2a4b40822f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90967 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]>
…roller ...and not just add it to the new controller. It caused > $ SAL_USE_VCLPLUGIN=gen make UITest_chart UITEST_TEST_NAME=chartLegend.chartLegend.test_chart_display_legend_dialog to fail with > ==346284==ERROR: AddressSanitizer: heap-use-after-free on address 0x61a00049cca8 at pc 0x7f8496747751 bp 0x7fff7c483f10 sp 0x7fff7c483f08 > READ of size 8 at 0x61a00049cca8 thread T0 > #0 in chart::sidebar::ChartSidebarSelectionListener::selectionChanged(com::sun::star::lang::EventObject const&) at chart2/source/controller/sidebar/ChartSidebarSelectionListener.cxx:66:15 > #1 in chart::ChartController::impl_notifySelectionChangeListeners() at chart2/source/controller/main/ChartController_Window.cxx:1740:28 > #2 in chart::ChartController::impl_selectObjectAndNotiy() at chart2/source/controller/main/ChartController_Window.cxx:1756:5 > #3 in chart::ChartController::modeChanged(com::sun::star::util::ModeChangeEvent const&) at chart2/source/controller/main/ChartController.cxx:538:31 > #4 in chart::ChartView::impl_notifyModeChangeListener(rtl::OUString const&) at chart2/source/view/main/ChartView.cxx:2653:32 > #5 in chart::ChartView::impl_updateView(bool) at chart2/source/view/main/ChartView.cxx:2561:9 > #6 in chart::ChartView::update() at chart2/source/view/main/ChartView.cxx:2687:5 > #7 in chart::ChartController::execute_Paint(OutputDevice&, tools::Rectangle const&) at chart2/source/controller/main/ChartController_Window.cxx:485:25 > #8 in chart::ChartWindow::Paint(OutputDevice&, tools::Rectangle const&) at chart2/source/controller/main/ChartWindow.cxx:99:30 > #9 in PaintHelper::DoPaint(vcl::Region const*) at vcl/source/window/paint.cxx:309:24 > #10 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:613:17 > #11 in PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:549:30 > #12 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:619:1 > #13 in PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:549:30 > #14 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:619:1 > #15 in PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:549:30 > #16 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:619:1 > #17 in PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:549:30 > #18 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:619:1 > #19 in PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:549:30 > #20 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:619:1 > #21 in PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:549:30 > #22 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:619:1 > #23 in PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:549:30 > #24 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:619:1 > #25 in PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:549:30 > #26 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:619:1 > #27 in vcl::Window::ImplCallOverlapPaint() at vcl/source/window/paint.cxx:637:9 > #28 in vcl::Window::ImplHandlePaintHdl(Timer*) at vcl/source/window/paint.cxx:660:9 > #29 in vcl::Window::LinkStubImplHandlePaintHdl(void*, Timer*) at vcl/source/window/paint.cxx:641:1 > #30 in Link<Timer*, void>::Call(Timer*) const at include/tools/link.hxx:111:45 > #31 in Timer::Invoke() at vcl/source/app/timer.cxx:75:21 > #32 in Scheduler::ProcessTaskScheduling() at vcl/source/app/scheduler.cxx:478:20 > #33 in Scheduler::CallbackTaskScheduling() at vcl/source/app/scheduler.cxx:287:5 > #34 in SalTimer::CallCallback() at vcl/inc/saltimer.hxx:54:13 > #35 in X11SalData::Timeout() at vcl/unx/generic/app/saldata.cxx:551:41 > #36 in SalXLib::CheckTimeout(bool) at vcl/unx/generic/app/saldata.cxx:635:17 > #37 in SalXLib::Yield(bool, bool) at vcl/unx/generic/app/saldata.cxx:716:25 > #38 in X11SalInstance::DoYield(bool, bool) at vcl/unx/generic/app/salinst.cxx:182:20 > #39 in ImplYield(bool, bool) at vcl/source/app/svapp.cxx:454:48 > #40 in Application::Yield() at vcl/source/app/svapp.cxx:518:5 > #41 in Application::Execute() at vcl/source/app/svapp.cxx:433:9 > #42 in desktop::Desktop::Main() at desktop/source/app/app.cxx:1602:17 > #43 in ImplSVMain() at vcl/source/app/svmain.cxx:196:35 > #44 in SVMain() at vcl/source/app/svmain.cxx:228:12 > #45 in soffice_main at desktop/source/app/sofficemain.cxx:107:12 > #46 in sal_main at desktop/source/app/main.c:48:15 > #47 in main at desktop/source/app/main.c:47:1 > 0x61a00049cca8 is located 1064 bytes inside of 1160-byte region [0x61a00049c880,0x61a00049cd08) > freed by thread T0 here: > #0 in operator delete(void*, unsigned long) at compiler-rt/lib/asan/asan_new_delete.cpp:172:3 > #1 in chart::sidebar::ChartLinePanel::~ChartLinePanel() at chart2/source/controller/sidebar/ChartLinePanel.cxx:143:1 > #2 in VclReferenceBase::release() const at include/vcl/vclreferencebase.hxx:40:13 > #3 in rtl::Reference<vcl::Window>::~Reference() at include/rtl/ref.hxx:92:22 > #4 in VclPtr<vcl::Window>::disposeAndClear() at include/vcl/vclptr.hxx:208:5 > #5 in sfx2::sidebar::SidebarPanelBase::disposing() at sfx2/source/sidebar/SidebarPanelBase.cxx:81:15 > #6 in cppu::WeakComponentImplHelperBase::dispose() at cppuhelper/source/implbase.cxx:102:17 > #7 in cppu::PartialWeakComponentImplHelper<com::sun::star::ui::XContextChangeEventListener, com::sun::star::ui::XUIElement, com::sun::star::ui::XToolPanel, com::sun::star::ui::XSidebarPanel, com::sun::star::ui::XUpdateModel>::dispose() at include/cppuhelper/compbase.hxx:90:36 > #8 in sfx2::sidebar::Panel::dispose() at sfx2/source/sidebar/Panel.cxx:106:25 > #9 in VclReferenceBase::disposeOnce() at vcl/source/outdev/vclreferencebase.cxx:38:5 > #10 in VclPtr<sfx2::sidebar::Panel>::disposeAndClear() at include/vcl/vclptr.hxx:206:19 > #11 in sfx2::sidebar::Deck::dispose() at sfx2/source/sidebar/Deck.cxx:92:17 > #12 in VclReferenceBase::disposeOnce() at vcl/source/outdev/vclreferencebase.cxx:38:5 > #13 in VclPtr<sfx2::sidebar::Deck>::disposeAndClear() at include/vcl/vclptr.hxx:206:19 > #14 in sfx2::sidebar::SidebarController::CreateDeck(rtl::OUString const&, sfx2::sidebar::Context const&, bool) at sfx2/source/sidebar/SidebarController.cxx:664:19 > #15 in sfx2::sidebar::SidebarController::SwitchToDeck(sfx2::sidebar::DeckDescriptor const&, sfx2::sidebar::Context const&) at sfx2/source/sidebar/SidebarController.cxx:822:5 > #16 in sfx2::sidebar::SidebarController::UpdateConfigurations() at sfx2/source/sidebar/SidebarController.cxx:569:9 > #17 in sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, SfxViewFrame const*)::$_3::operator()() const at sfx2/source/sidebar/SidebarController.cxx:140:52 > #18 in void std::__invoke_impl<void, sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, SfxViewFrame const*)::$_3&>(std::__invoke_other, sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, SfxViewFrame const*)::$_3&) at include/c++/10.0.1/bits/invoke.h:60:14 > #19 in std::enable_if<is_invocable_r_v<void, sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, SfxViewFrame const*)::$_3&>, void>::type std::__invoke_r<void, sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, SfxViewFrame const*)::$_3&>(sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, SfxViewFrame const*)::$_3&) at include/c++/10.0.1/bits/invoke.h:110:2 > #20 in std::_Function_handler<void (), sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, SfxViewFrame const*)::$_3>::_M_invoke(std::_Any_data const&) at include/c++/10.0.1/bits/std_function.h:291:9 > #21 in std::function<void ()>::operator()() const at include/c++/10.0.1/bits/std_function.h:622:14 > #22 in sfx2::sidebar::AsynchronousCall::HandleUserCall(void*) at sfx2/source/sidebar/AsynchronousCall.cxx:66:9 > #23 in sfx2::sidebar::AsynchronousCall::LinkStubHandleUserCall(void*, void*) at sfx2/source/sidebar/AsynchronousCall.cxx:62:1 > #24 in Link<void*, void>::Call(void*) const at include/tools/link.hxx:111:45 > #25 in ImplHandleUserEvent(ImplSVEvent*) at vcl/source/window/winproc.cxx:2009:30 > #26 in ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) at vcl/source/window/winproc.cxx:2562:13 > #27 in SalFrame::CallCallback(SalEvent, void const*) const at vcl/inc/salframe.hxx:306:29 > #28 in SalGenericDisplay::ProcessEvent(SalUserEventList::SalUserEvent) at vcl/unx/generic/app/gendisp.cxx:66:22 > #29 in SalUserEventList::DispatchUserEvents(bool) at vcl/source/app/salusereventlist.cxx:108:17 > #30 in SalGenericDisplay::DispatchInternalEvent(bool) at vcl/unx/generic/app/gendisp.cxx:51:12 > #31 in SalX11Display::Yield() at vcl/unx/generic/app/saldisp.cxx:1918:9 > #32 in DisplayYield(int, void*) at vcl/unx/generic/app/saldisp.cxx:414:13 > #33 in (anonymous namespace)::YieldEntry::HandleNextEvent() const at vcl/unx/generic/app/saldata.cxx:566:38 > #34 in SalXLib::Yield(bool, bool) at vcl/unx/generic/app/saldata.cxx:662:25 > #35 in X11SalInstance::DoYield(bool, bool) at vcl/unx/generic/app/salinst.cxx:182:20 > #36 in ImplYield(bool, bool) at vcl/source/app/svapp.cxx:454:48 > #37 in Application::Yield() at vcl/source/app/svapp.cxx:518:5 > #38 in Dialog::Execute() at vcl/source/window/dialog.cxx:1032:9 > #39 in SalInstanceDialog::run() at vcl/source/app/salvtables.cxx:1480:23 > #40 in weld::DialogController::run() at include/vcl/weld.hxx:2196:47 > #41 in chart::ChartController::executeDispatch_OpenLegendDialog() at chart2/source/controller/main/ChartController_Insert.cxx:227:18 > #42 in chart::ChartController::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at chart2/source/controller/main/ChartController.cxx:1130:15 > #43 in ChartUIObject::PostCommand(void*) at chart2/source/controller/uitest/uiobject.cxx:76:41 > #44 in ChartUIObject::LinkStubPostCommand(void*, void*) at chart2/source/controller/uitest/uiobject.cxx:72:1 > #45 in Link<void*, void>::Call(void*) const at include/tools/link.hxx:111:45 > #46 in ImplHandleUserEvent(ImplSVEvent*) at vcl/source/window/winproc.cxx:2009:30 > #47 in ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) at vcl/source/window/winproc.cxx:2562:13 > #48 in SalFrame::CallCallback(SalEvent, void const*) const at vcl/inc/salframe.hxx:306:29 > #49 in SalGenericDisplay::ProcessEvent(SalUserEventList::SalUserEvent) at vcl/unx/generic/app/gendisp.cxx:66:22 > #50 in SalUserEventList::DispatchUserEvents(bool) at vcl/source/app/salusereventlist.cxx:108:17 > #51 in SalGenericDisplay::DispatchInternalEvent(bool) at vcl/unx/generic/app/gendisp.cxx:51:12 > #52 in SalX11Display::Yield() at vcl/unx/generic/app/saldisp.cxx:1918:9 > #53 in DisplayYield(int, void*) at vcl/unx/generic/app/saldisp.cxx:414:13 > #54 in (anonymous namespace)::YieldEntry::HandleNextEvent() const at vcl/unx/generic/app/saldata.cxx:566:38 > #55 in SalXLib::Yield(bool, bool) at vcl/unx/generic/app/saldata.cxx:662:25 > #56 in X11SalInstance::DoYield(bool, bool) at vcl/unx/generic/app/salinst.cxx:182:20 > #57 in ImplYield(bool, bool) at vcl/source/app/svapp.cxx:454:48 > #58 in Application::Reschedule(bool) at vcl/source/app/svapp.cxx:467:12 > #59 in (anonymous namespace)::ExecuteWrapper::ExecuteActionHdl(Timer*) at vcl/source/uitest/uno/uiobject_uno.cxx:91:13 > #60 in (anonymous namespace)::ExecuteWrapper::LinkStubExecuteActionHdl(void*, Timer*) at vcl/source/uitest/uno/uiobject_uno.cxx:78:1 > #61 in Link<Timer*, void>::Call(Timer*) const at include/tools/link.hxx:111:45 > #62 in Timer::Invoke() at vcl/source/app/timer.cxx:75:21 > #63 in Scheduler::ProcessTaskScheduling() at vcl/source/app/scheduler.cxx:478:20 > #64 in Scheduler::CallbackTaskScheduling() at vcl/source/app/scheduler.cxx:287:5 > #65 in SalTimer::CallCallback() at vcl/inc/saltimer.hxx:54:13 > #66 in X11SalData::Timeout() at vcl/unx/generic/app/saldata.cxx:551:41 > #67 in SalXLib::CheckTimeout(bool) at vcl/unx/generic/app/saldata.cxx:635:17 > #68 in SalXLib::Yield(bool, bool) at vcl/unx/generic/app/saldata.cxx:716:25 > #69 in X11SalInstance::DoYield(bool, bool) at vcl/unx/generic/app/salinst.cxx:182:20 > #70 in ImplYield(bool, bool) at vcl/source/app/svapp.cxx:454:48 > #71 in Application::Yield() at vcl/source/app/svapp.cxx:518:5 > #72 in Application::Execute() at vcl/source/app/svapp.cxx:433:9 > #73 in desktop::Desktop::Main() at desktop/source/app/app.cxx:1602:17 > #74 in ImplSVMain() at vcl/source/app/svmain.cxx:196:35 > #75 in SVMain() at vcl/source/app/svmain.cxx:228:12 > #76 in soffice_main at desktop/source/app/sofficemain.cxx:107:12 > #77 in sal_main at desktop/source/app/main.c:48:15 > #78 in main at desktop/source/app/main.c:47:1 > previously allocated by thread T0 here: > #0 in operator new(unsigned long) at compiler-rt/lib/asan/asan_new_delete.cpp:99:3 > #1 in VclPtr<chart::sidebar::ChartLinePanel> VclPtr<chart::sidebar::ChartLinePanel>::Create<vcl::Window*&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, chart::ChartController*&>(vcl::Window*&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, chart::ChartController*&) at include/vcl/vclptr.hxx:129:42 > #2 in chart::sidebar::ChartLinePanel::Create(vcl::Window*, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, chart::ChartController*) at chart2/source/controller/sidebar/ChartLinePanel.cxx:117:12 > #3 in chart::sidebar::ChartPanelFactory::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at chart2/source/controller/sidebar/Chart2PanelFactory.cxx:107:22 > #4 in non-virtual thunk to chart::sidebar::ChartPanelFactory::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at chart2/source/controller/sidebar/Chart2PanelFactory.cxx > #5 in (anonymous namespace)::UIElementFactoryManager::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/uifactory/uielementfactorymanager.cxx:437:39 > #6 in non-virtual thunk to (anonymous namespace)::UIElementFactoryManager::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/uifactory/uielementfactorymanager.cxx > #7 in sfx2::sidebar::SidebarController::CreateUIElement(com::sun::star::uno::Reference<com::sun::star::awt::XWindowPeer> const&, rtl::OUString const&, bool, sfx2::sidebar::Context const&) at sfx2/source/sidebar/SidebarController.cxx:967:32 > #8 in sfx2::sidebar::SidebarController::CreatePanel(rtl::OUString const&, vcl::Window*, bool, sfx2::sidebar::Context const&, VclPtr<sfx2::sidebar::Deck> const&) at sfx2/source/sidebar/SidebarController.cxx:908:43 > #9 in sfx2::sidebar::SidebarController::CreatePanels(rtl::OUString const&, sfx2::sidebar::Context const&) at sfx2/source/sidebar/SidebarController.cxx:720:41 > #10 in sfx2::sidebar::SidebarController::CreateDeck(rtl::OUString const&, sfx2::sidebar::Context const&, bool) at sfx2/source/sidebar/SidebarController.cxx:672:5 > #11 in sfx2::sidebar::SidebarController::SwitchToDeck(sfx2::sidebar::DeckDescriptor const&, sfx2::sidebar::Context const&) at sfx2/source/sidebar/SidebarController.cxx:822:5 > #12 in sfx2::sidebar::SidebarController::UpdateConfigurations() at sfx2/source/sidebar/SidebarController.cxx:569:9 > #13 in sfx2::sidebar::SidebarController::notifyContextChangeEvent(com::sun::star::ui::ContextChangeEventObject const&) at sfx2/source/sidebar/SidebarController.cxx:323:9 > #14 in (anonymous namespace)::ContextChangeEventMultiplexer::addContextChangeEventListener(com::sun::star::uno::Reference<com::sun::star::ui::XContextChangeEventListener> const&, com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&) at framework/source/services/ContextChangeEventMultiplexer.cxx:176:29 > #15 in sfx2::sidebar::SidebarController::registerSidebarForFrame(sfx2::sidebar::SidebarController*, com::sun::star::uno::Reference<com::sun::star::frame::XController> const&) at sfx2/source/sidebar/SidebarController.cxx:213:19 > #16 in chart::ChartController::attachFrame(com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) at chart2/source/controller/main/ChartController.cxx:400:9 > #17 in chart::ChartFrameLoader::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) at chart2/source/controller/main/ChartFrameloader.cxx:133:22 > #18 in framework::LoadEnv::impl_loadContent() at framework/source/loadenv/loadenv.cxx:1157:37 > #19 in framework::LoadEnv::start() at framework/source/loadenv/loadenv.cxx:395:20 > #20 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:300:5 > #21 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:169:14 > #22 in (anonymous namespace)::XFrameImpl::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/services/frame.cxx:590:16 > #23 in non-virtual thunk to (anonymous namespace)::XFrameImpl::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/services/frame.cxx > #24 in DocumentHolder::LoadDocToFrame(bool) at embeddedobj/source/general/docholder.cxx:984:31 > #25 in DocumentHolder::ShowInplace(com::sun::star::uno::Reference<com::sun::star::awt::XWindowPeer> const&, com::sun::star::awt::Rectangle const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&) at embeddedobj/source/general/docholder.cxx:477:15 > #26 in OCommonEmbeddedObject::SwitchStateTo_Impl(int) at embeddedobj/source/commonembedding/embedobj.cxx:252:42 > #27 in OCommonEmbeddedObject::changeState(int) at embeddedobj/source/commonembedding/embedobj.cxx:451:17 > #28 in OCommonEmbeddedObject::doVerb(int) at embeddedobj/source/commonembedding/embedobj.cxx:537:9 > #29 in SfxInPlaceClient::DoVerb(long) at sfx2/source/view/ipclient.cxx:950:40 > #30 in ScTabViewShell::ActivateObject(SdrOle2Obj*, long) at sc/source/ui/view/tabvwshb.cxx:205:29 > #31 in ScGridWinUIObject::execute(rtl::OUString const&, std::__debug::map<rtl::OUString const, rtl::OUString, std::less<rtl::OUString const>, std::allocator<std::pair<rtl::OUString const, rtl::OUString> > > const&) at sc/source/ui/uitest/uiobject.cxx:175:29 > #32 in UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0::operator()() const at vcl/source/uitest/uno/uiobject_uno.cxx:124:16 > #33 in void std::__invoke_impl<void, UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&>(std::__invoke_other, UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&) at include/c++/10.0.1/bits/invoke.h:60:14 > #34 in std::enable_if<is_invocable_r_v<void, UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&>, void>::type std::__invoke_r<void, UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&>(UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&) at include/c++/10.0.1/bits/invoke.h:110:2 > #35 in std::_Function_handler<void (), UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0>::_M_invoke(std::_Any_data const&) at include/c++/10.0.1/bits/std_function.h:291:9 > #36 in std::function<void ()>::operator()() const at include/c++/10.0.1/bits/std_function.h:622:14 > #37 in (anonymous namespace)::ExecuteWrapper::ExecuteActionHdl(Timer*) at vcl/source/uitest/uno/uiobject_uno.cxx:83:13 > #38 in (anonymous namespace)::ExecuteWrapper::LinkStubExecuteActionHdl(void*, Timer*) at vcl/source/uitest/uno/uiobject_uno.cxx:78:1 > #39 in Link<Timer*, void>::Call(Timer*) const at include/tools/link.hxx:111:45 > #40 in Timer::Invoke() at vcl/source/app/timer.cxx:75:21 > #41 in Scheduler::ProcessTaskScheduling() at vcl/source/app/scheduler.cxx:478:20 > #42 in Scheduler::CallbackTaskScheduling() at vcl/source/app/scheduler.cxx:287:5 > #43 in SalTimer::CallCallback() at vcl/inc/saltimer.hxx:54:13 > #44 in X11SalData::Timeout() at vcl/unx/generic/app/saldata.cxx:551:41 > #45 in SalXLib::CheckTimeout(bool) at vcl/unx/generic/app/saldata.cxx:635:17 > #46 in SalXLib::Yield(bool, bool) at vcl/unx/generic/app/saldata.cxx:716:25 > #47 in X11SalInstance::DoYield(bool, bool) at vcl/unx/generic/app/salinst.cxx:182:20 > #48 in ImplYield(bool, bool) at vcl/source/app/svapp.cxx:454:48 > #49 in Application::Yield() at vcl/source/app/svapp.cxx:518:5 > #50 in Application::Execute() at vcl/source/app/svapp.cxx:433:9 > #51 in desktop::Desktop::Main() at desktop/source/app/app.cxx:1602:17 > #52 in ImplSVMain() at vcl/source/app/svmain.cxx:196:35 > #53 in SVMain() at vcl/source/app/svmain.cxx:228:12 > #54 in soffice_main at desktop/source/app/sofficemain.cxx:107:12 > #55 in sal_main at desktop/source/app/main.c:48:15 > #56 in main at desktop/source/app/main.c:47:1 The changes that were necessary to fix that scenario are those in ChartAreaPanel.cxx and ChartLinePanel.cxx, but the other updateModel implementations look equally broken. Change-Id: I064fb701dc10e7cb7ef7ea5839f7dd1ae8d0ebba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91467 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]>
...presumably introduced by what looks like typos in e9164b9 "lok: shape scaling rework" > } > // size > if (SfxItemState::SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_WIDTH,true,&pPoolItem)) { > - nSizX=static_cast<const SfxUInt32Item*>(pPoolItem)->GetValue(); > + nSizX=static_cast<const SfxInt32Item*>(pPoolItem)->GetValue(); > bChgSiz=true; > bChgWdh=true; > } > if (SfxItemState::SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_HEIGHT,true,&pPoolItem)) { > - nSizY=static_cast<const SfxUInt32Item*>(pPoolItem)->GetValue(); > + nSizY=static_cast<const SfxInt32Item*>(pPoolItem)->GetValue(); > bChgSiz=true; > bChgHgt=true; > } but only showing up now (presumably due to newly added test code in 2f4ea95 "lok: unit test for metric field or formatted field control") during CppunitTest_desktop_lib: > svx/source/svdraw/svdedtv1.cxx:1602:15: runtime error: downcast of address 0x603001642720 which does not point to an object of type 'const SfxInt32Item' > 0x603001642720: note: object is of type 'SfxUInt32Item' > 7a 04 80 2b 50 bb 0f 7f cb 7f 00 00 01 00 00 00 6a 27 00 be bc e8 02 00 be be be be be be be be > ^~~~~~~~~~~~~~~~~~~~~~~ > vptr for 'SfxUInt32Item' > #0 in SdrEditView::SetGeoAttrToMarked(SfxItemSet const&) at svx/source/svdraw/svdedtv1.cxx:1602:15 > #1 in ScDrawShell::ExecDrawAttr(SfxRequest&) at sc/source/ui/drawfunc/drawsh.cxx:385:32 > #2 in SfxStubScDrawShellExecDrawAttr(SfxShell*, SfxRequest&) at workdir/SdiTarget/sc/sdi/scslots.hxx:2779:1 > #3 in SfxShell::CallExec(void (*)(SfxShell*, SfxRequest&), SfxRequest&) at include/sfx2/shell.hxx:197:35 > #4 in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) at sfx2/source/control/dispatch.cxx:252:16 > #5 in SfxDispatcher::Execute_(SfxShell&, SfxSlot const&, SfxRequest&, SfxCallMode) at sfx2/source/control/dispatch.cxx:752:9 > #6 in SfxDispatcher::ExecuteList(unsigned short, SfxCallMode, std::initializer_list<SfxPoolItem const*>, std::initializer_list<SfxPoolItem const*>) at sfx2/source/control/dispatch.cxx:960:8 > #7 in svx::sidebar::PosSizePropertyPanel::executeSize() at svx/source/sidebar/possize/PosSizePropertyPanel.cxx:848:45 > #8 in svx::sidebar::PosSizePropertyPanel::ChangeWidthHdl(weld::MetricSpinButton&) at svx/source/sidebar/possize/PosSizePropertyPanel.cxx:378:5 > #9 in svx::sidebar::PosSizePropertyPanel::LinkStubChangeWidthHdl(void*, weld::MetricSpinButton&) at svx/source/sidebar/possize/PosSizePropertyPanel.cxx:360:1 > #10 in Link<weld::MetricSpinButton&, void>::Call(weld::MetricSpinButton&) const at include/tools/link.hxx:111:45 > #11 in weld::MetricSpinButton::signal_value_changed() at include/vcl/weld.hxx:1721:54 > #12 in weld::MetricSpinButton::spin_button_value_changed(weld::SpinButton&) at vcl/source/window/builder.cxx:192:9 > #13 in weld::MetricSpinButton::LinkStubspin_button_value_changed(void*, weld::SpinButton&) at vcl/source/window/builder.cxx:190:5 > #14 in Link<weld::SpinButton&, void>::Call(weld::SpinButton&) const at include/tools/link.hxx:111:45 > #15 in weld::SpinButton::signal_value_changed() at include/vcl/weld.hxx:1490:54 > #16 in SalInstanceSpinButton::UpDownHdl(SpinField&) at vcl/source/app/salvtables.cxx:5169:71 > #17 in SalInstanceSpinButton::LinkStubUpDownHdl(void*, SpinField&) at vcl/source/app/salvtables.cxx:5169:1 > #18 in Link<SpinField&, void>::Call(SpinField&) const at include/tools/link.hxx:111:45 > #19 in SpinField::Up()::$_0::operator()() const at vcl/source/control/spinfld.cxx:361:88 > #20 in void std::__invoke_impl<void, SpinField::Up()::$_0&>(std::__invoke_other, SpinField::Up()::$_0&) at include/c++/11.0.0/bits/invoke.h:60:14 > #21 in std::enable_if<is_invocable_r_v<void, SpinField::Up()::$_0&>, void>::type std::__invoke_r<void, SpinField::Up()::$_0&>(SpinField::Up()::$_0&) at include/c++/11.0.0/bits/invoke.h:110:2 > #22 in std::_Function_handler<void (), SpinField::Up()::$_0>::_M_invoke(std::_Any_data const&) at include/c++/11.0.0/bits/std_function.h:291:9 > #23 in std::function<void ()>::operator()() const at include/c++/11.0.0/bits/std_function.h:622:14 > #24 in Control::ImplCallEventListenersAndHandler(VclEventId, std::function<void ()> const&) at vcl/source/control/ctrl.cxx:315:13 > #25 in SpinField::Up() at vcl/source/control/spinfld.cxx:361:5 > #26 in FormattedField::SetValueFromString(rtl::OUString const&) at vcl/source/control/fmtfield.cxx:854:20 > #27 in FormattedFieldUIObject::execute(rtl::OUString const&, std::__debug::map<rtl::OUString const, rtl::OUString, std::less<rtl::OUString const>, std::allocator<std::pair<rtl::OUString const, rtl::OUString> > > const&) at vcl/source/uitest/uiobject.cxx:1361:31 > #28 in DesktopLOKTest::testMetricField() at desktop/qa/desktop_lib/test_desktop_lib.cxx:2858:13 Change-Id: I57988723e23f5a419639e37fe130bad92682a1a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94178 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]>
Thank you for your contribution. We use GitHub as a read-only mirror, so please submit your patch into our own code review system: https://wiki.documentfoundation.org/Development/GetInvolved |
...introduced with 244a447 "Make Pivot table data source dialog async", as seen e.g. during UITest_calc_tests8: > ==1217030==ERROR: AddressSanitizer: stack-use-after-return on address 0x7f06d7133444 at pc 0x7f069f0cb613 bp 0x7ffe24058430 sp 0x7ffe24058428 > WRITE of size 2 at 0x7f06d7133444 thread T0 > #0 in ScAddress::operator=(ScAddress const&) at sc/inc/address.hxx:415:10 > #1 in ScCellShell::ExecuteDataPilotDialog()::$_4::operator()(int) const at sc/source/ui/view/cellsh1.cxx:3014:42 > #2 in void std::__invoke_impl<void, ScCellShell::ExecuteDataPilotDialog()::$_4&, int>(std::__invoke_other, ScCellShell::ExecuteDataPilotDialog()::$_4&, int&&) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/invoke.h:60:14 > #3 in std::enable_if<is_invocable_r_v<void, ScCellShell::ExecuteDataPilotDialog()::$_4&, int>, void>::type std::__invoke_r<void, ScCellShell::ExecuteDataPilotDialog()::$_4&, int>(ScCellShell::ExecuteDataPilotDialog()::$_4&, int&&) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/invoke.h:110:2 > #4 in std::_Function_handler<void (int), ScCellShell::ExecuteDataPilotDialog()::$_4>::_M_invoke(std::_Any_data const&, int&&) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/std_function.h:291:9 > #5 in std::function<void (int)>::operator()(int) const at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/std_function.h:560:9 > #6 in Dialog::EndDialog(long) at vcl/source/window/dialog.cxx:1137:9 > #7 in Dialog::ResponseHdl(Button*) at vcl/source/window/dialog.cxx:1391:5 > #8 in Dialog::LinkStubResponseHdl(void*, Button*) at vcl/source/window/dialog.cxx:1376:1 > #9 in Link<Button*, void>::Call(Button*) const at include/tools/link.hxx:111:45 > #10 in Button::Click()::$_0::operator()() const at vcl/source/control/button.cxx:124:87 > #11 in void std::__invoke_impl<void, Button::Click()::$_0&>(std::__invoke_other, Button::Click()::$_0&) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/invoke.h:60:14 > #12 in std::enable_if<is_invocable_r_v<void, Button::Click()::$_0&>, void>::type std::__invoke_r<void, Button::Click()::$_0&>(Button::Click()::$_0&) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/invoke.h:110:2 > #13 in std::_Function_handler<void (), Button::Click()::$_0>::_M_invoke(std::_Any_data const&) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/std_function.h:291:9 > #14 in std::function<void ()>::operator()() const at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/std_function.h:560:9 > #15 in Control::ImplCallEventListenersAndHandler(VclEventId, std::function<void ()> const&) at vcl/source/control/ctrl.cxx:315:13 > #16 in Button::Click() at vcl/source/control/button.cxx:124:5 > #17 in ButtonUIObject::execute(rtl::OUString const&, std::__debug::map<rtl::OUString const, rtl::OUString, std::less<rtl::OUString const>, std::allocator<std::pair<rtl::OUString const, rtl::OUString> > > const&) at vcl/source/uitest/uiobject.cxx:614:19 > #18 in UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0::operator()() const at vcl/source/uitest/uno/uiobject_uno.cxx:124:16 > #19 in void std::__invoke_impl<void, UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&>(std::__invoke_other, UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/invoke.h:60:14 > #20 in std::enable_if<is_invocable_r_v<void, UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&>, void>::type std::__invoke_r<void, UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&>(UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/invoke.h:110:2 > #21 in std::_Function_handler<void (), UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0>::_M_invoke(std::_Any_data const&) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/std_function.h:291:9 > #22 in std::function<void ()>::operator()() const at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/std_function.h:560:9 > #23 in (anonymous namespace)::ExecuteWrapper::ExecuteActionHdl(Timer*) at vcl/source/uitest/uno/uiobject_uno.cxx:83:13 > #24 in (anonymous namespace)::ExecuteWrapper::LinkStubExecuteActionHdl(void*, Timer*) at vcl/source/uitest/uno/uiobject_uno.cxx:78:1 > #25 in Link<Timer*, void>::Call(Timer*) const at include/tools/link.hxx:111:45 > #26 in Timer::Invoke() at vcl/source/app/timer.cxx:75:21 > #27 in Scheduler::ProcessTaskScheduling() at vcl/source/app/scheduler.cxx:486:20 > #28 in Scheduler::CallbackTaskScheduling() at vcl/source/app/scheduler.cxx:288:5 > #29 in SalTimer::CallCallback() at vcl/inc/saltimer.hxx:54:13 > #30 in SvpSalInstance::CheckTimeout(bool) at vcl/headless/svpinst.cxx:210:53 > #31 in SvpSalInstance::DoYield(bool, bool) at vcl/headless/svpinst.cxx:463:21 > #32 in ImplYield(bool, bool) at vcl/source/app/svapp.cxx:447:48 > #33 in Application::Yield() at vcl/source/app/svapp.cxx:511:5 > #34 in Application::Execute() at vcl/source/app/svapp.cxx:426:9 > #35 in desktop::Desktop::Main() at desktop/source/app/app.cxx:1588:13 > #36 in ImplSVMain() at vcl/source/app/svmain.cxx:196:35 > #37 in SVMain() at vcl/source/app/svmain.cxx:228:12 > #38 in soffice_main at desktop/source/app/sofficemain.cxx:98:12 > #39 in sal_main at desktop/source/app/main.c:49:15 > #40 in main at desktop/source/app/main.c:47:1 Change-Id: I7ff5148f4bf9170fc7add312053de5acc153125b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106919 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]>
Skip attributes with empty string value in 'Qt5AccessibleWidget::attributes'. Besides not being a useful value, I also got a crash using Accerciser to navigate in Calc's "Format Cells" dialog -> "Font Effects" -> "Text Decoration" -> "Overlining" -> "Overlining". 'Qt5AccessibleWidget::attributes' had returned "font-family:;font-size:0pt;font-weight:normal;" and 'AtSpiAdaptor::getAttributes' (from the Qt library) aborts, since it splits the "font-family:" part at the colon, then expects two substrings: one for the attribute name, one for the value - but there was no value set: QString joined = interface->textInterface()->attributes(offset, &startOffset, &endOffset); const QStringList attributes = joined.split (QLatin1Char(';'), Qt::SkipEmptyParts, Qt::CaseSensitive); for (const QString &attr : attributes) { QStringList items; items = attr.split(QLatin1Char(':'), Qt::SkipEmptyParts, Qt::CaseSensitive); -> AtSpiAttribute attribute = atspiTextAttribute(items[0], items[1]); if (!attribute.isNull()) set[attribute.name] = attribute.value; } The IAccessible2 spec for the "background-color" text attribute [1] doesn't specify any default value to be used. Backtrace: Thread 1 received signal SIGABRT, Aborted. __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (rr) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x00007f4dcd0bd537 in __GI_abort () at abort.c:79 #2 0x00007f4dba7fd810 in qt_message_fatal(QtMsgType, QMessageLogContext const&, QString const&) (context=..., message=...) at global/qlogging.cpp:1914 #3 0x00007f4dba7f9d48 in QMessageLogger::fatal(char const*, ...) const (this=0x7ffc30a4a6b0, msg=0x7f4dbab9ebb0 "ASSERT failure in %s: \"%s\", file %s, line %d") at global/qlogging.cpp:893 #4 0x00007f4dba7f1484 in qt_assert_x(char const*, char const*, char const*, int) (where=0x7f4db778eb36 "QList<T>::operator[]", what=0x7f4db778eac8 "index out of range", file=0x7f4db778ea90 "../../../include/QtCore/../../src/corelib/tools/qlist.h", line=579) at global/qglobal.cpp:3366 #5 0x00007f4db7736a65 in QList<QString>::operator[](int) (this=0x7ffc30a4a730, i=1) at ../../../include/QtCore/../../src/corelib/tools/qlist.h:579 #6 0x00007f4db773017e in AtSpiAdaptor::getAttributes(QAccessibleInterface*, int, bool) const (this=0x557748f27800, interface=0x7f4d8c07cc30, offset=9, includeDefaults=true) at atspiadaptor.cpp:2059 #7 0x00007f4db772cd74 in AtSpiAdaptor::textInterface(QAccessibleInterface*, QString const&, QDBusMessage const&, QDBusConnection const&) (this=0x557748f27800, interface=0x7f4d8c07cc30, function=..., message=..., connection=...) at atspiadaptor.cpp:1802 #8 0x00007f4db77274f8 in AtSpiAdaptor::handleMessage(QDBusMessage const&, QDBusConnection const&) (this=0x557748f27800, message=..., connection=...) at atspiadaptor.cpp:1286 #9 0x00007f4db7fe4d04 in QDBusConnectionPrivate::activateObject(QDBusConnectionPrivate::ObjectTreeNode&, QDBusMessage const&, int) (this=0x7f4d8c014b00, node=..., msg=..., pathStartPos=27) at qdbusintegrator.cpp:1458 #10 0x00007f4db7fe58ca in QDBusActivateObjectEvent::placeMetaCall(QObject*) (this=0x557753615310) at qdbusintegrator.cpp:1617 #11 0x00007f4dbaab3c66 in QObject::event(QEvent*) (this=0x557748f27800, e=0x557753615310) at kernel/qobject.cpp:1314 #12 0x00007f4db96be845 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=0x557747e30970, receiver=0x557748f27800, e=0x557753615310) at kernel/qapplication.cpp:3632 #13 0x00007f4db96bbcfb in QApplication::notify(QObject*, QEvent*) (this=0x557747f1d8b0, receiver=0x557748f27800, e=0x557753615310) at kernel/qapplication.cpp:2972 #14 0x00007f4dbaa70aba in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x557748f27800, event=0x557753615310) at kernel/qcoreapplication.cpp:1064 #15 0x00007f4dbaa71452 in QCoreApplication::sendEvent(QObject*, QEvent*) (receiver=0x557748f27800, event=0x557753615310) at kernel/qcoreapplication.cpp:1462 #16 0x00007f4dbaa7213a in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x557747eff460) at kernel/qcoreapplication.cpp:1821 #17 0x00007f4dbaa71acc in QCoreApplication::sendPostedEvents(QObject*, int) (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1680 #18 0x00007f4dbaaff079 in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x557748056a30) at kernel/qeventdispatcher_glib.cpp:277 #19 0x00007f4dbfe4ce6b in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #20 0x00007f4dbfe4d118 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #21 0x00007f4dbfe4d1cf in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #22 0x00007f4dbaaff7a2 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x557748062a70, flags=...) at kernel/qeventdispatcher_glib.cpp:423 #23 0x00007f4db76af8fc in QXcbGlibEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x557748062a70, flags=...) at qxcbeventdispatcher.cpp:143 #24 0x00007f4db9255353 in Qt5Instance::DoYield(bool, bool) (this=0x557747f22580, bWait=4, bHandleAllCurrentEvents=2) at .../libreoffice/vcl/qt5/Qt5Instance.cxx:400 #25 0x00007f4db9255465 in Qt5Instance::AnyInput(VclInputFlags) (this=0xd87f0c9bbde3ed00, nType=(VclInputFlags::PAINT | VclInputFlags::TIMER | VclInputFlags::OTHER | VclInputFlags::APPEVENT | unknown: 0x7fc0)) at .../libreoffice/vcl/qt5/Qt5Instance.cxx:422 #26 0x00007f4dc594b64a in ImplYield(bool, bool) (i_bWait=true, i_bAllEvents=false) at .../libreoffice/vcl/source/app/svapp.cxx:465 #27 0x00007f4dc594be0b in Application::Yield() () at .../libreoffice/vcl/source/app/svapp.cxx:532 #28 0x00007f4dc594b357 in Application::Execute() () at .../libreoffice/vcl/source/app/svapp.cxx:444 #29 0x00007f4dcd2c4226 in desktop::Desktop::Main() (this=0x7ffc30a4c540) at .../libreoffice/desktop/source/app/app.cxx:1602 #30 0x00007f4dc5967cc6 in ImplSVMain() () at .../libreoffice/vcl/source/app/svmain.cxx:199 #31 0x00007f4dc5967de7 in SVMain() () at .../libreoffice/vcl/source/app/svmain.cxx:231 #32 0x00007f4dcd324e9f in soffice_main() () at .../libreoffice/desktop/source/app/sofficemain.cxx:98 #33 0x000055774613895d in sal_main () at .../libreoffice/desktop/source/app/main.c:49 #34 0x0000557746138943 in main (argc=2, argv=0x7ffc30a4c8b8) at .../libreoffice/desktop/source/app/main.c:47 [1] https://wiki.linuxfoundation.org/accessibility/iaccessible2/textattributes Change-Id: I5e9d5121e69340ff728a87b4a6cb5c182d9ad11b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119247 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]>
...as seen at least once during UITest_calc_tests9, with thread 1 at > Thread 1 (Thread 0x7f2c48958fc0 (LWP 439791) "soffice.bin"): > #0 0x00007f2caa2b17b0 in __lll_lock_wait () at /lib64/libpthread.so.0 > #1 0x00007f2caa2aa553 in pthread_mutex_lock () at /lib64/libpthread.so.0 > #2 0x00007f2ca399275b in __gthread_mutex_lock(pthread_mutex_t*) (__mutex=0x7f2ca40ce020 <cppu::getTypeEntries(cppu::class_data*)::aMutex>) at /home/sbergman/gcc/trunk/inst/include/c++/12.0.0/x86_64-pc-linux-gnu/bits/gthr-default.h:749 > #3 0x00007f2ca39948cb in std::mutex::lock() (this=0x7f2ca40ce020 <cppu::getTypeEntries(cppu::class_data*)::aMutex>) at /home/sbergman/gcc/trunk/inst/include/c++/12.0.0/bits/std_mutex.h:100 > #4 0x00007f2ca39940eb in std::lock_guard<std::mutex>::lock_guard(std::mutex&) (this=0x7f2c4752d820, __m=...) at /home/sbergman/gcc/trunk/inst/include/c++/12.0.0/bits/std_mutex.h:229 > #5 0x00007f2ca3990fdb in cppu::getTypeEntries(cppu::class_data*) (cd=0x7f2c3eda4640 <cppu::detail::ImplClassData<cppu::WeakImplHelper<com::sun::star::i18n::XCollator, com::sun::star::lang::XServiceInfo>, com::sun::star::i18n::XCollator, com::sun::star::lang::XServiceInfo>::operator()()::s_cd>) at /home/sbergman/lo/core/cppuhelper/source/implbase_ex.cxx:71 > #6 0x00007f2ca398c616 in cppu::queryDeepNoXInterface(_typelib_TypeDescriptionReference const*, cppu::class_data*, void*) (pDemandedTDR=0x60f00020ec60, cd=0x7f2c3eda4640 <cppu::detail::ImplClassData<cppu::WeakImplHelper<com::sun::star::i18n::XCollator, com::sun::star::lang::XServiceInfo>, com::sun::star::i18n::XCollator, com::sun::star::lang::XServiceInfo>::operator()()::s_cd>, that=0x60e0002a2960) at /home/sbergman/lo/core/cppuhelper/source/implbase_ex.cxx:155 > #7 0x00007f2ca398ea93 in cppu::WeakImplHelper_query(com::sun::star::uno::Type const&, cppu::class_data*, void*, cppu::OWeakObject*) (rType=invalid uno::Type, cd=0x7f2c3eda4640 <cppu::detail::ImplClassData<cppu::WeakImplHelper<com::sun::star::i18n::XCollator, com::sun::star::lang::XServiceInfo>, com::sun::star::i18n::XCollator, com::sun::star::lang::XServiceInfo>::operator()()::s_cd>, that=0x60e0002a2960, pBase=0x60e0002a2960) at /home/sbergman/lo/core/cppuhelper/source/implbase_ex.cxx:283 > #8 0x00007f2c3ea61105 in cppu::WeakImplHelper<com::sun::star::i18n::XCollator, com::sun::star::lang::XServiceInfo>::queryInterface(com::sun::star::uno::Type const&) (this=0x60e0002a2960, aType=invalid uno::Type) at /home/sbergman/lo/core/include/cppuhelper/implbase.hxx:111 > #9 0x00007f2c7c491500 in com::sun::star::uno::BaseReference::iquery(com::sun::star::uno::XInterface*, com::sun::star::uno::Type const&) (pInterface=0x60e0002a2960, rType=invalid uno::Type) at /home/sbergman/lo/core/include/com/sun/star/uno/Reference.hxx:59 > #10 0x00007f2c7c8a1165 in com::sun::star::uno::Reference<com::sun::star::i18n::XCollator>::iquery(com::sun::star::uno::XInterface*) (pInterface=0x60e0002a2960) at /home/sbergman/lo/core/include/com/sun/star/uno/Reference.hxx:74 > #11 0x00007f2c7c8a015e in com::sun::star::uno::Reference<com::sun::star::i18n::XCollator>::Reference(com::sun::star::uno::BaseReference const&, com::sun::star::uno::UnoReference_Query) (this=0x7f2c47447020, rRef=...) at /home/sbergman/lo/core/include/com/sun/star/uno/Reference.hxx:176 > #12 0x00007f2c7c89ebaa in com::sun::star::i18n::Collator::create(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (the_context=uno::Reference to (class cppu::(anonymous namespace)::ComponentContext *) 0x611000005e50) at /home/sbergman/lo/core/workdir/UnoApiHeadersTarget/offapi/normal/com/sun/star/i18n/Collator.hpp:38 > #13 0x00007f2c7c89c324 in CollatorWrapper::CollatorWrapper(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (this=0x60200097c0f0, rxContext=uno::Reference to (class cppu::(anonymous namespace)::ComponentContext *) 0x611000005e50) at /home/sbergman/lo/core/unotools/source/i18n/collatorwrapper.cxx:30 > #14 0x00007f2c14889098 in ScGlobal::GetCaseCollator()::$_6::operator()() const (this=0x7f2c470e74a0) at /home/sbergman/lo/core/sc/source/core/data/global.cxx:1044 > #15 0x00007f2c14886efc in comphelper::doubleCheckedInit<CollatorWrapper, ScGlobal::GetCaseCollator()::$_6, osl::Guard<osl::Mutex>, osl::GetGlobalMutex>(std::atomic<CollatorWrapper*>&, ScGlobal::GetCaseCollator()::$_6, osl::GetGlobalMutex) (pointer=..., function=..., guardCtor=...) at /home/sbergman/lo/core/include/comphelper/doublecheckedinit.hxx:53 > #16 0x00007f2c14886d1c in ScGlobal::GetCaseCollator() () at /home/sbergman/lo/core/sc/source/core/data/global.cxx:1041 > #17 0x00007f2c1627adde in ScTypedStrData::LessCaseSensitive::operator()(ScTypedStrData const&, ScTypedStrData const&) const (this=0x7f2c471eab20, left=..., right=...) at /home/sbergman/lo/core/sc/source/core/tool/typedstrdata.cxx:26 > #18 0x00007f2c13ad7750 in std::sort<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<ScTypedStrData*, std::__cxx1998::vector<ScTypedStrData, std::allocator<ScTypedStrData> > >, std::__debug::vector<ScTypedStrData, std::allocator<ScTypedStrData> >, std::random_access_iterator_tag>, ScTypedStrData::LessCaseSensitive>(__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<ScTypedStrData*, std::__cxx1998::vector<ScTypedStrData, std::allocator<ScTypedStrData> > >, std::__debug::vector<ScTypedStrData, std::allocator<ScTypedStrData> >, std::random_access_iterator_tag>, __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<ScTypedStrData*, std::__cxx1998::vector<ScTypedStrData, std::allocator<ScTypedStrData> > >, std::__debug::vector<ScTypedStrData, std::allocator<ScTypedStrData> >, std::random_access_iterator_tag>, ScTypedStrData::LessCaseSensitive) at /home/sbergman/gcc/trunk/inst/include/c++/12.0.0/bits/stl_algo.h:4873 > #19 0x00007f2c13ab544d in (anonymous namespace)::sortAndRemoveDuplicates(std::__debug::vector<ScTypedStrData, std::allocator<ScTypedStrData> >&, bool) (rStrings=std::__debug::vector of length 1, capacity 1 = {...}, bCaseSens=true) at /home/sbergman/lo/core/sc/source/core/data/documen3.cxx:86 > #20 0x00007f2c13ab6bc9 in ScDocument::GetDataEntries(short, int, short, std::__debug::vector<ScTypedStrData, std::allocator<ScTypedStrData> >&, bool) (this=0x61e0000505c0, nCol=0, nRow=1, nTab=0, rStrings=std::__debug::vector of length 1, capacity 1 = {...}, bValidation=false) at /home/sbergman/lo/core/sc/source/core/data/documen3.cxx:1650 > #21 0x00007f2c1708a56e in ScInputHandler::GetColData() (this=0x614000068840) at /home/sbergman/lo/core/sc/source/ui/app/inputhdl.cxx:1943 > #22 0x00007f2c1709e132 in ScInputHandler::StartTable(char16_t, bool, bool, ScEditEngineDefaulter*) (this=0x614000068840, cTyped=66 u'B', bFromCommand=false, bInputActivated=false, pTopEngine=0x0) at /home/sbergman/lo/core/sc/source/ui/app/inputhdl.cxx:2501 > #23 0x00007f2c17057bc0 in ScInputHandler::DataChanging(char16_t, bool) (this=0x614000068840, cTyped=66 u'B', bFromCommand=false) at /home/sbergman/lo/core/sc/source/ui/app/inputhdl.cxx:2605 > #24 0x00007f2c170ad948 in ScInputHandler::KeyInput(KeyEvent const&, bool) (this=0x614000068840, rKEvt=..., bStartEdit=true) at /home/sbergman/lo/core/sc/source/ui/app/inputhdl.cxx:3714 > #25 0x00007f2c1723ac2b in ScModule::InputKeyEvent(KeyEvent const&, bool) (this=0x616000223880, rKEvt=..., bStartEdit=true) at /home/sbergman/lo/core/sc/source/ui/app/scmod.cxx:1356 > #26 0x00007f2c19ce48c9 in ScTabViewShell::TabKeyInput(KeyEvent const&) (this=0x61e000051080, rKEvt=...) at /home/sbergman/lo/core/sc/source/ui/view/tabvwsh4.cxx:1278 > #27 0x00007f2c196183ce in ScGridWindow::KeyInput(KeyEvent const&) (this=0x618000ee6880, rKEvt=...) at /home/sbergman/lo/core/sc/source/ui/view/gridwin.cxx:3414 > #28 0x00007f2c775e963f in WindowUIObject::execute(rtl::OUString const&, std::__debug::map<rtl::OUString, rtl::OUString, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, rtl::OUString> > > const&) at /home/sbergman/lo/core/vcl/source/uitest/uiobject.cxx:357 > #29 0x00007f2c186a5929 in ScGridWinUIObject::execute(rtl::OUString const&, std::__debug::map<rtl::OUString, rtl::OUString, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, rtl::OUString> > > const&) at /home/sbergman/lo/core/sc/source/ui/uitest/uiobject.cxx:317 > #30 0x00007f2c7766d9ba in UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0::operator()() const (this=0x603000f61240) at /home/sbergman/lo/core/vcl/source/uitest/uno/uiobject_uno.cxx:137 > #31 0x00007f2c7766d0dd in std::__invoke_impl<void, UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&>(std::__invoke_other, UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&) (__f=...) at /home/sbergman/gcc/trunk/inst/include/c++/12.0.0/bits/invoke.h:61 > #32 0x00007f2c7766cf8d in std::__invoke_r<void, UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&>(UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&) (__fn=...) at /home/sbergman/gcc/trunk/inst/include/c++/12.0.0/bits/invoke.h:111 > #33 0x00007f2c7766ca9d in std::_Function_handler<void (), UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0>::_M_invoke(std::_Any_data const&) (__functor=...) at /home/sbergman/gcc/trunk/inst/include/c++/12.0.0/bits/std_function.h:291 > #34 0x00007f2c744b3c22 in std::function<void ()>::operator()() const (this=0x6070001d4d80) at /home/sbergman/gcc/trunk/inst/include/c++/12.0.0/bits/std_function.h:560 > #35 0x00007f2c7766c35c in (anonymous namespace)::ExecuteWrapper::ExecuteActionHdl(Timer*) (this=0x6070001d4d80) at /home/sbergman/lo/core/vcl/source/uitest/uno/uiobject_uno.cxx:100 > #36 0x00007f2c77668e29 in (anonymous namespace)::ExecuteWrapper::LinkStubExecuteActionHdl(void*, Timer*) (instance=0x6070001d4d80, data=0x608000148e20) at /home/sbergman/lo/core/vcl/source/uitest/uno/uiobject_uno.cxx:95 > #37 0x00007f2c76c645de in Link<Timer*, void>::Call(Timer*) const (this=0x608000148e40, data=0x608000148e20) at /home/sbergman/lo/core/include/tools/link.hxx:111 > #38 0x00007f2c76c63b7d in Timer::Invoke() (this=0x608000148e20) at /home/sbergman/lo/core/vcl/source/app/timer.cxx:75 > #39 0x00007f2c76abfd6c in Scheduler::CallbackTaskScheduling() () at /home/sbergman/lo/core/vcl/source/app/scheduler.cxx:471 > #40 0x00007f2c77b9a1a4 in SalTimer::CallCallback() (this=0x6030002f0bc0) at /home/sbergman/lo/core/vcl/inc/saltimer.hxx:54 > #41 0x00007f2c77b8dda1 in SvpSalInstance::CheckTimeout(bool) (this=0x611000001bc0, bExecuteTimers=true) at /home/sbergman/lo/core/vcl/headless/svpinst.cxx:215 > #42 0x00007f2c77b949a0 in SvpSalInstance::DoYield(bool, bool) (this=0x611000001bc0, bWait=true, bHandleAllCurrentEvents=false) at /home/sbergman/lo/core/vcl/headless/svpinst.cxx:460 > #43 0x00007f2c76bb2462 in ImplYield(bool, bool) (i_bWait=true, i_bAllEvents=false) at /home/sbergman/lo/core/vcl/source/app/svapp.cxx:465 > #44 0x00007f2c76bb1588 in Application::Yield() () at /home/sbergman/lo/core/vcl/source/app/svapp.cxx:532 > #45 0x00007f2c76bb11bf in Application::Execute() () at /home/sbergman/lo/core/vcl/source/app/svapp.cxx:444 > #46 0x00007f2caae21016 in desktop::Desktop::Main() (this=0x7f2c472b8080) at /home/sbergman/lo/core/desktop/source/app/app.cxx:1602 having locked the osl global mutex in comphelper::doubleCheckedInit in frame 15 and trying to lock the cppu::getTypeEntries mutex, while thread 4 at > Thread 4 (Thread 0x7f2c275b6640 (LWP 440147) "InitUpdateCheck"): > #0 0x00007f2caa2b17b0 in __lll_lock_wait () at /lib64/libpthread.so.0 > #1 0x00007f2caa2aa5d0 in pthread_mutex_lock () at /lib64/libpthread.so.0 > #2 0x00007f2cabc21967 in osl_acquireMutex(oslMutex) (pMutex=0x604000090d50) at /home/sbergman/lo/core/sal/osl/unx/mutex.cxx:100 > #3 0x00007f2bf58684da in osl::Mutex::acquire() (this=0x7f2cabe45c60 <osl_getGlobalMutex::g_Mutex>) at /home/sbergman/lo/core/include/osl/mutex.hxx:61 > #4 0x00007f2bf586694a in osl::Guard<osl::Mutex>::Guard(osl::Mutex*) (this=0x7f2c262d7420, pT_=0x7f2cabe45c60 <osl_getGlobalMutex::g_Mutex>) at /home/sbergman/lo/core/include/osl/mutex.hxx:135 > #5 0x00007f2bf58762f9 in com::sun::star::lang::cppu_detail_getUnoType(com::sun::star::lang::XServiceInfo const*) () at /home/sbergman/lo/core/workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/lang/XServiceInfo.hpp:73 > #6 0x00007f2bf5875f09 in cppu::UnoType<com::sun::star::lang::XServiceInfo>::get() () at /home/sbergman/lo/core/include/cppu/unotype.hxx:300 > #7 0x00007f2bf5875ce9 in com::sun::star::lang::XServiceInfo::static_type(void*) () at /home/sbergman/lo/core/workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/lang/XServiceInfo.hpp:145 > #8 0x00007f2ca39913be in cppu::getTypeEntries(cppu::class_data*) (cd=0x7f2bf58c73a8 <cppu::detail::ImplClassData<cppu::WeakImplHelper<com::sun::star::deployment::XUpdateInformationProvider, com::sun::star::ucb::XWebDAVCommandEnvironment, com::sun::star::lang::XServiceInfo>, com::sun::star::deployment::XUpdateInformationProvider, com::sun::star::ucb::XWebDAVCommandEnvironment, com::sun::star::lang::XServiceInfo>::operator()()::s_cd>) at /home/sbergman/lo/core/cppuhelper/source/implbase_ex.cxx:78 > #9 0x00007f2ca398c616 in cppu::queryDeepNoXInterface(_typelib_TypeDescriptionReference const*, cppu::class_data*, void*) (pDemandedTDR=0x60f0001cf420, cd=0x7f2bf58c73a8 <cppu::detail::ImplClassData<cppu::WeakImplHelper<com::sun::star::deployment::XUpdateInformationProvider, com::sun::star::ucb::XWebDAVCommandEnvironment, com::sun::star::lang::XServiceInfo>, com::sun::star::deployment::XUpdateInformationProvider, com::sun::star::ucb::XWebDAVCommandEnvironment, com::sun::star::lang::XServiceInfo>::operator()()::s_cd>, that=0x60e00022e7c0) at /home/sbergman/lo/core/cppuhelper/source/implbase_ex.cxx:155 > #10 0x00007f2ca398ea93 in cppu::WeakImplHelper_query(com::sun::star::uno::Type const&, cppu::class_data*, void*, cppu::OWeakObject*) (rType=invalid uno::Type, cd=0x7f2bf58c73a8 <cppu::detail::ImplClassData<cppu::WeakImplHelper<com::sun::star::deployment::XUpdateInformationProvider, com::sun::star::ucb::XWebDAVCommandEnvironment, com::sun::star::lang::XServiceInfo>, com::sun::star::deployment::XUpdateInformationProvider, com::sun::star::ucb::XWebDAVCommandEnvironment, com::sun::star::lang::XServiceInfo>::operator()()::s_cd>, that=0x60e00022e7c0, pBase=0x60e00022e7c0) at /home/sbergman/lo/core/cppuhelper/source/implbase_ex.cxx:283 > #11 0x00007f2bf58629e5 in cppu::WeakImplHelper<com::sun::star::deployment::XUpdateInformationProvider, com::sun::star::ucb::XWebDAVCommandEnvironment, com::sun::star::lang::XServiceInfo>::queryInterface(com::sun::star::uno::Type const&) (this=0x60e00022e7c0, aType=invalid uno::Type) at /home/sbergman/lo/core/include/cppuhelper/implbase.hxx:111 > #12 0x00007f2c3015cf60 in com::sun::star::uno::BaseReference::iquery(com::sun::star::uno::XInterface*, com::sun::star::uno::Type const&) (pInterface=0x60e00022e7c0, rType=invalid uno::Type) at /home/sbergman/lo/core/include/com/sun/star/uno/Reference.hxx:59 > #13 0x00007f2c302419c5 in com::sun::star::uno::Reference<com::sun::star::deployment::XUpdateInformationProvider>::iquery(com::sun::star::uno::XInterface*) (pInterface=0x60e00022e7c0) at /home/sbergman/lo/core/include/com/sun/star/uno/Reference.hxx:74 > #14 0x00007f2c3024010e in com::sun::star::uno::Reference<com::sun::star::deployment::XUpdateInformationProvider>::Reference(com::sun::star::uno::BaseReference const&, com::sun::star::uno::UnoReference_Query) (this=0x7f2c262bd420, rRef=...) at /home/sbergman/lo/core/include/com/sun/star/uno/Reference.hxx:176 > #15 0x00007f2c3023e98a in com::sun::star::deployment::UpdateInformationProvider::create(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (the_context=uno::Reference to (class cppu::(anonymous namespace)::ComponentContext *) 0x611000005e50) at /home/sbergman/lo/core/workdir/UnoApiHeadersTarget/offapi/normal/com/sun/star/deployment/UpdateInformationProvider.hpp:38 > #16 0x00007f2c30235e85 in dp_info::(anonymous namespace)::PackageInformationProvider::PackageInformationProvider(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (this=0x607000afd3e0, xContext=uno::Reference to (class cppu::(anonymous namespace)::ComponentContext *) 0x611000005e50) at /home/sbergman/lo/core/desktop/source/deployment/manager/dp_informationprovider.cxx:92 > #17 0x00007f2c30235932 in com_sun_star_comp_deployment_PackageInformationProvider_get_implementation(com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) (context=0x611000005e50) at /home/sbergman/lo/core/desktop/source/deployment/manager/dp_informationprovider.cxx:336 > #18 0x00007f2ca3c92795 in std::__invoke_impl<com::sun::star::uno::XInterface*, com::sun::star::uno::XInterface* (*&)(com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&), com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&>(std::__invoke_other, com::sun::star::uno::XInterface* (*&)(com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&), com::sun::star::uno::XComponentContext*&&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) (__f=@0x612000035088: 0x7f2c302357f0 <com_sun_star_comp_deployment_PackageInformationProvider_get_implementation(com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&)>, __args=@0x7f2c25ecd960: 0x611000005e50, __args=empty uno::Sequence) at /home/sbergman/gcc/trunk/inst/include/c++/12.0.0/bits/invoke.h:61 > #19 0x00007f2ca3c9248d in std::__invoke_r<com::sun::star::uno::XInterface*, com::sun::star::uno::XInterface* (*&)(com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&), com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&>(com::sun::star::uno::XInterface* (*&)(com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&), com::sun::star::uno::XComponentContext*&&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) (__fn=@0x612000035088: 0x7f2c302357f0 <com_sun_star_comp_deployment_PackageInformationProvider_get_implementation(com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&)>, __args=@0x7f2c25ecd960: 0x611000005e50, __args=empty uno::Sequence) at /home/sbergman/gcc/trunk/inst/include/c++/12.0.0/bits/invoke.h:114 > #20 0x00007f2ca3c91ebd in std::_Function_handler<com::sun::star::uno::XInterface* (com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&), com::sun::star::uno::XInterface* (*)(com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&)>::_M_invoke(std::_Any_data const&, com::sun::star::uno::XComponentContext*&&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) (__functor=..., __args=@0x7f2c25ecd960: 0x611000005e50, __args=empty uno::Sequence) at /home/sbergman/gcc/trunk/inst/include/c++/12.0.0/bits/std_function.h:291 > #21 0x00007f2ca3b7d419 in std::function<com::sun::star::uno::XInterface* (com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&)>::operator()(com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) const (this=0x612000035088, __args=0x611000005e50, __args=empty uno::Sequence) at /home/sbergman/gcc/trunk/inst/include/c++/12.0.0/bits/std_function.h:560 > #22 0x00007f2ca3b30861 in cppuhelper::ServiceManager::Data::Implementation::doCreateInstance(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (this=0x612000034fd0, context=uno::Reference to (class cppu::(anonymous namespace)::ComponentContext *) 0x611000005e50) at /home/sbergman/lo/core/cppuhelper/source/servicemanager.cxx:703 > #23 0x00007f2ca3b30394 in cppuhelper::ServiceManager::Data::Implementation::createInstance(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool) (this=0x612000034fd0, context=uno::Reference to (class cppu::(anonymous namespace)::ComponentContext *) 0x611000005e50, singletonRequest=true) at /home/sbergman/lo/core/cppuhelper/source/servicemanager.cxx:672 > #24 0x00007f2ca3b6bb9c in (anonymous namespace)::SingletonFactory::createInstanceWithContext(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (this=0x60700003a4e0, Context=uno::Reference to (class cppu::(anonymous namespace)::ComponentContext *) 0x611000005e50) at /home/sbergman/lo/core/cppuhelper/source/servicemanager.cxx:532 > #25 0x00007f2ca3b6c0af in non-virtual thunk to (anonymous namespace)::SingletonFactory::createInstanceWithContext(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) () at /home/sbergman/lo/core/cppuhelper/source/servicemanager.cxx:541 > #26 0x00007f2ca38c5545 in cppu::(anonymous namespace)::ComponentContext::lookupMap(rtl::OUString const&) (this=0x611000005e00, rName="/singletons/com.sun.star.deployment.PackageInformationProvider") at /home/sbergman/lo/core/cppuhelper/source/component_context.cxx:300 > #27 0x00007f2ca38ae9ab in cppu::(anonymous namespace)::ComponentContext::getValueByName(rtl::OUString const&) (this=0x611000005e00, rName="/singletons/com.sun.star.deployment.PackageInformationProvider") at /home/sbergman/lo/core/cppuhelper/source/component_context.cxx:374 > #28 0x00007f2ca38b279f in non-virtual thunk to cppu::(anonymous namespace)::ComponentContext::getValueByName(rtl::OUString const&) () at /home/sbergman/lo/core/cppuhelper/source/component_context.cxx:266 > #29 0x00007f2c2791c7e0 in checkForPendingUpdates(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (rxContext=uno::Reference to (class cppu::(anonymous namespace)::ComponentContext *) 0x611000005e50) at /home/sbergman/lo/core/extensions/source/update/check/updateprotocol.cxx:289 > #30 0x00007f2c277d3db3 in UpdateCheck::initialize(com::sun::star::uno::Sequence<com::sun::star::beans::NamedValue> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (this=0x6130001c9dc0, rValues=uno::Sequence of length 8 = {...}, xContext=uno::Reference to (class cppu::(anonymous namespace)::ComponentContext *) 0x611000005e50) at /home/sbergman/lo/core/extensions/source/update/check/updatecheck.cxx:776 > #31 0x00007f2c278acd2a in (anonymous namespace)::InitUpdateCheckJobThread::run() (this=0x608000163d20) at /home/sbergman/lo/core/extensions/source/update/check/updatecheckjob.cxx:143 having locked the cppu::getTypeEntries mutex in frame 1 and now trying to lock the osl global mutex. Of the many functions in sc/source/core/data/global.cxx that (implicitly, by default) use the osl global mutex in comphelper::doubleCheckedInit, change at least those two that call a CollatorWrapper (and are thus susceptible to the described deadlock). Change-Id: Ie41a1116518146bffcefab2373f1386afc03e544 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119319 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]>
...as had been the case prior to 12dce07 "loplugin:unusedfields - look for fields that can be const, in comphelper" (which this commit partly reverts; the const'ness of OInterfaceIteratorHelper2::bIsList had already been reverted, but for no apparent reason, in 31b0be0 "improve pahole script and pack a few classes"). That may or may not have been the cause of the apparently-sporadic UITest_sw_table failure at <https://ci.libreoffice.org//job/lo_ubsan/2096/>, > /comphelper/source/container/interfacecontainer2.cxx:54:29: runtime error: member call on address 0x606000ed5d20 which does not point to an object of type 'com::sun::star::uno::XInterface' > 0x606000ed5d20: note: object has invalid vptr > 22 04 00 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 be be be be b0 11 46 00 > ^~~~~~~~~~~~~~~~~~~~~~~ > invalid vptr > #0 0x2ab564a71e15 in comphelper::OInterfaceIteratorHelper2::OInterfaceIteratorHelper2(comphelper::OInterfaceContainerHelper2&) /comphelper/source/container/interfacecontainer2.cxx:54:29 > #1 0x2ab57614588f in void comphelper::OInterfaceContainerHelper2::forEach<com::sun::star::document::XDocumentEventListener, comphelper::OInterfaceContainerHelper2::NotifySingleListener<com::sun::star::document::XDocumentEventListener, com::sun::star::document::DocumentEvent> >(comphelper::OInterfaceContainerHelper2::NotifySingleListener<com::sun::star::document::XDocumentEventListener, com::sun::star::document::DocumentEvent> const&) /include/comphelper/interfacecontainer2.hxx:261:31 > #2 0x2ab576144a95 in void comphelper::OInterfaceContainerHelper2::notifyEach<com::sun::star::document::XDocumentEventListener, com::sun::star::document::DocumentEvent>(void (com::sun::star::document::XDocumentEventListener::*)(com::sun::star::document::DocumentEvent const&), com::sun::star::document::DocumentEvent const&) /include/comphelper/interfacecontainer2.hxx:279:5 > #3 0x2ab57613b277 in (anonymous namespace)::SfxGlobalEvents_Impl::implts_notifyListener(com::sun::star::document::DocumentEvent const&) /sfx2/source/notify/globalevents.cxx:505:26 > #4 0x2ab576131faa in (anonymous namespace)::SfxGlobalEvents_Impl::documentEventOccured(com::sun::star::document::DocumentEvent const&) /sfx2/source/notify/globalevents.cxx:256:5 > #5 0x2ab575f4abfc in (anonymous namespace)::NotifySingleListenerIgnoreRE<com::sun::star::document::XDocumentEventListener, com::sun::star::document::DocumentEvent>::operator()(com::sun::star::uno::Reference<com::sun::star::document::XDocumentEventListener> const&) const /sfx2/source/doc/sfxbasemodel.cxx:3200:13 > #6 0x2ab575f002ec in void cppu::OInterfaceContainerHelper::forEach<com::sun::star::document::XDocumentEventListener, (anonymous namespace)::NotifySingleListenerIgnoreRE<com::sun::star::document::XDocumentEventListener, com::sun::star::document::DocumentEvent> >((anonymous namespace)::NotifySingleListenerIgnoreRE<com::sun::star::document::XDocumentEventListener, com::sun::star::document::DocumentEvent> const&) /include/cppuhelper/interfacecontainer.h:292:17 > #7 0x2ab575efdd37 in SfxBaseModel::postEvent_Impl(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::frame::XController2> const&) /sfx2/source/doc/sfxbasemodel.cxx:3234:14 > #8 0x2ab575efa257 in SfxBaseModel::Notify(SfxBroadcaster&, SfxHint const&) /sfx2/source/doc/sfxbasemodel.cxx:2883:9 > #9 0x2ab57a796d83 in SfxBroadcaster::Broadcast(SfxHint const&) /svl/source/notify/SfxBroadcaster.cxx:39:24 > #10 0x2ab6010f0e1f in SwLayIdle::SwLayIdle(SwRootFrame*, SwViewShellImp*) /sw/source/core/layout/layact.cxx:2375:24 > #11 0x2ab60385d4e2 in SwViewShell::LayoutIdle() /sw/source/core/view/viewsh.cxx:723:19 > #12 0x2ab5ff549ffa in sw::DocumentTimerManager::DoIdleJobs(Timer*) /sw/source/core/doc/DocumentTimerManager.cxx:177:42 > #13 0x2ab5ff54552a in sw::DocumentTimerManager::LinkStubDoIdleJobs(void*, Timer*) /sw/source/core/doc/DocumentTimerManager.cxx:157:1 > #14 0x2ab599cf5f41 in Link<Timer*, void>::Call(Timer*) const /include/tools/link.hxx:111:45 > #15 0x2ab599cf5498 in Timer::Invoke() /vcl/source/app/timer.cxx:75:21 > #16 0x2ab599b388ea in Scheduler::CallbackTaskScheduling() /vcl/source/app/scheduler.cxx:471:20 > #17 0x2ab59ad34490 in SalTimer::CallCallback() /vcl/inc/saltimer.hxx:54:13 > #18 0x2ab59ad2785c in SvpSalInstance::CheckTimeout(bool) /vcl/headless/svpinst.cxx:215:53 > #19 0x2ab59ad2e67c in SvpSalInstance::DoYield(bool, bool) /vcl/headless/svpinst.cxx:460:21 > #20 0x2ab599c35aa9 in ImplYield(bool, bool) /vcl/source/app/svapp.cxx:465:48 > #21 0x2ab599c34c67 in Application::Yield() /vcl/source/app/svapp.cxx:532:5 > #22 0x2ab599c348ae in Application::Execute() /vcl/source/app/svapp.cxx:444:9 > #23 0x2ab55d699b4b in desktop::Desktop::Main() /desktop/source/app/app.cxx:1603:13 > #24 0x2ab599cde4e9 in ImplSVMain() /vcl/source/app/svmain.cxx:199:35 > #25 0x2ab599ce7510 in SVMain() /vcl/source/app/svmain.cxx:231:12 > #26 0x2ab55d890775 in soffice_main /desktop/source/app/sofficemain.cxx:98:12 > #27 0x4efc6c in sal_main /desktop/source/app/main.c:49:15 > #28 0x4efc46 in main /desktop/source/app/main.c:47:1 > #29 0x2ab55f48e554 in __libc_start_main (/lib64/libc.so.6+0x22554) > #30 0x41b5c1 in _start (/instdir/program/soffice.bin+0x41b5c1) Change-Id: Iaa930f1612a3bb6ad0bcad12f3995b7dbb2e5fa7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120205 Reviewed-by: Noel Grandin <[email protected]> Reviewed-by: Stephan Bergmann <[email protected]> Tested-by: Jenkins
#5 0x00007fffee606a72 in ImplDbgTestSolarMutex() () at vcl/source/app/dbggui.cxx:35 #6 0x00007ffff71186f0 in DbgTestSolarMutex() () at tools/source/debug/debug.cxx:54 #7 0x00007ffff3273e39 in SfxBroadcaster::RemoveListener(SfxListener&) (this=0x1a38230, rListener=...) at svl/source/notify/SfxBroadcaster.cxx:105 #8 0x00007ffff3296eb8 in SfxListener::~SfxListener() (this=0x33abce0) at svl/source/notify/lstner.cxx:53 #9 0x00007fffaaa0a0a4 in ScAccessibleContextBase::~ScAccessibleContextBase() (this=0x33abc40) at sc/source/ui/Accessibility/AccessibleContextBase.cxx:59 #10 0x00007fffaaaa6379 in ScAccessibleTableBase::~ScAccessibleTableBase() (this=0x33abc40) at sc/source/ui/Accessibility/AccessibleTableBase.cxx:52 #11 0x00007fffaaa831da in ScAccessibleSpreadsheet::~ScAccessibleSpreadsheet() (this=0x33abc40) at sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx:274 #12 0x00007fffaaa83229 in ScAccessibleSpreadsheet::~ScAccessibleSpreadsheet() (this=0x33abc40) at sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx:270 #13 0x00007ffff5f87fc0 in cppu::OWeakObject::release() (this=0x33abc40) at cppuhelper/source/weak.cxx:230 #14 0x00007ffff5f88690 in cppu::OWeakAggObject::release() (this=0x33abc40) at cppuhelper/source/weak.cxx:296 #15 0x00007ffff5e7e4d5 in cppu::WeakAggComponentImplHelperBase::release() (this=0x33abc40) at cppuhelper/source/implbase.cxx:211 #16 0x00007fffaaa0d875 in cppu::WeakAggComponentImplHelper5<com::sun::star::accessibility::XAccessible, com::sun::star::accessibility::XAccessibleComponent, com::sun::star::accessibility::XAccessibleContext, com::sun::star::accessibility::XAccessibleEventBroadcaster, com::sun::star::lang::XServiceInfo>::release() (this=0x33abc40) at include/cppuhelper/compbase5.hxx:142 #17 0x00007fffaaa0ab15 in ScAccessibleContextBase::release() (this=0x33abc40) at sc/source/ui/Accessibility/AccessibleContextBase.cxx:119 #18 0x00007fffaaaa6b75 in ScAccessibleTableBase::release() (this=0x33abc40) at sc/source/ui/Accessibility/AccessibleTableBase.cxx:86 #19 0x00007fffd8f4f11a in com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible>::clear() (this=<error reading variable: Unhandled DWARF expression opcode 0x0>) at include/com/sun/star/uno/Reference.hxx:231 #20 0x00007fffd8f4c41d in atk_object_wrapper_finalize(_GObject*) (obj=0x7f71930) at vcl/unx/gtk3/a11y/atkwrapper.cxx:662 #21 0x00007ffff3538d32 in g_object_unref (_object=<optimized out>) at ../gobject/gobject.c:3678 #22 g_object_unref (_object=0x7f71930) at ../gobject/gobject.c:3553 #23 0x00007fffd9571fc5 in expiry_func () at /lib64/libatk-bridge-2.0.so.0 #24 0x00007fffea7197b1 in g_timeout_dispatch (source=0x313d360, callback=0x7fffd9571f60 <expiry_func>, user_data=0x7fffbc01bec0) at ../glib/gmain.c:4971 #25 0x00007fffea718faf in g_main_dispatch (context=0x5f8230) at ../glib/gmain.c:3417 Change-Id: If527f1cf1bfc59bb8df586afaf5da62bbcb08eea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142691 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <[email protected]>
...avoiding > /writerfilter/source/dmapper/PropertyMap.cxx:324:71: runtime error: -2539 is outside the range of representable values of type 'unsigned int' > #0 0x7f80e9a3b6c3 in writerfilter::dmapper::PropertyMap::dumpXml() const /writerfilter/source/dmapper/PropertyMap.cxx:324:71 > #1 0x7f80e928eccb in writerfilter::dmapper::DomainMapperTableHandler::endTableGetTableStyle(writerfilter::dmapper::TableInfo&, std::__debug::vector<com::sun::star::beans::PropertyValue, std::allocator<com::sun::star::beans::PropertyValue> >&, bool) /writerfilter/source/dmapper/DomainMapperTableHandler.cxx:434:40 > #2 0x7f80e92b4b8f in writerfilter::dmapper::DomainMapperTableHandler::endTable(unsigned int, bool) /writerfilter/source/dmapper/DomainMapperTableHandler.cxx:1377:30 > #3 0x7f80e9c289de in writerfilter::dmapper::TableManager::resolveCurrentTable() /writerfilter/source/dmapper/TableManager.cxx:409:33 > #4 0x7f80e9c297a1 in writerfilter::dmapper::TableManager::endLevel() /writerfilter/source/dmapper/TableManager.cxx:427:9 > #5 0x7f80e936a997 in writerfilter::dmapper::DomainMapperTableManager::endLevel() /writerfilter/source/dmapper/DomainMapperTableManager.cxx:497:19 > #6 0x7f80e9c256d1 in writerfilter::dmapper::TableManager::endParagraphGroup() /writerfilter/source/dmapper/TableManager.cxx:338:9 > #7 0x7f80e9205974 in writerfilter::dmapper::DomainMapper::lcl_endParagraphGroup() /writerfilter/source/dmapper/DomainMapper.cxx:3511:35 > #8 0x7f80e984598e in writerfilter::LoggedStream::endParagraphGroup() /writerfilter/source/dmapper/LoggedResources.cxx:108:5 > #9 0x7f80e9d9addf in writerfilter::ooxml::OOXMLFastContextHandler::endParagraphGroup() /writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:452:23 > #10 0x7f80ea042658 in writerfilter::ooxml::OOXMLFactory_wml::endAction(writerfilter::ooxml::OOXMLFastContextHandler*) /workdir/CustomTarget/writerfilter/source/ooxml/OOXMLFactory_wml.cxx:7574:19 > #11 0x7f80e9d8822a in writerfilter::ooxml::OOXMLFactory::endAction(writerfilter::ooxml::OOXMLFastContextHandler*) /writerfilter/source/ooxml/OOXMLFactory.cxx:157:19 > #12 0x7f80e9d944eb in writerfilter::ooxml::OOXMLFastContextHandler::lcl_endFastElement(int) /writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:242:5 > #13 0x7f80e9d941da in writerfilter::ooxml::OOXMLFastContextHandler::endFastElement(int) /writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:225:9 > #14 0x7f80f44ffe2a in (anonymous namespace)::Entity::endElement() /sax/source/fastparser/fastparser.cxx:515:27 > #15 0x7f80f44ff818 in sax_fastparser::FastSaxParserImpl::callbackEndElement() /sax/source/fastparser/fastparser.cxx:1343:17 > #16 0x7f80f44ef554 in (anonymous namespace)::call_callbackEndElement(void*, unsigned char const*, unsigned char const*, unsigned char const*) /sax/source/fastparser/fastparser.cxx:339:18 > #17 0x7f8179cde54a in xmlParseEndTag2 /workdir/UnpackedTarball/libxml2/parser.c:9742:2 > #18 0x7f8179c8ced0 in xmlParseTryOrFinish /workdir/UnpackedTarball/libxml2/parser.c:11642:14 > #19 0x7f8179c7acc9 in xmlParseChunk /workdir/UnpackedTarball/libxml2/parser.c:12351:13 > #20 0x7f80f44ea4f1 in sax_fastparser::FastSaxParserImpl::parse() /sax/source/fastparser/fastparser.cxx:1099:21 > #21 0x7f80f44e4146 in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:904:9 > #22 0x7f80f4505300 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:1482:13 > #23 0x7f80e9d46e98 in writerfilter::ooxml::OOXMLDocumentImpl::resolve(writerfilter::Stream&) /writerfilter/source/ooxml/OOXMLDocumentImpl.cxx:508:18 > #24 0x7f80e9cfed05 in (anonymous namespace)::WriterFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /writerfilter/source/filter/WriterFilter.cxx:208:24 > #25 0x7f8149202866 in SfxObjectShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) /sfx2/source/doc/objstor.cxx:2272:34 > #26 0x7f81491c2434 in SfxObjectShell::DoLoad(SfxMedium*) /sfx2/source/doc/objstor.cxx:739:23 > #27 0x7f81493c9870 in SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sfx2/source/doc/sfxbasemodel.cxx:1937:36 > #28 0x7f8149b20d71 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&) /sfx2/source/view/frmload.cxx:720:28 > #29 0x7f810e00256b in framework::LoadEnv::impl_loadContent() /framework/source/loadenv/loadenv.cxx:1167:37 > #30 0x7f810dff896b in framework::LoadEnv::start() /framework/source/loadenv/loadenv.cxx:403:20 > #31 0x7f810dff0dec 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) /framework/source/loadenv/loadenv.cxx:308:5 > #32 0x7f810dfec180 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&) /framework/source/loadenv/loadenv.cxx:168:14 > #33 0x7f810e0b541d in framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/desktop.cxx:604:16 > #34 0x7f810e0b5646 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&) /framework/source/services/desktop.cxx > #35 0x7f812a050c25 in unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /unotest/source/cpp/macros_test.cxx:70:62 > #36 0x7f81444fcad9 in UnoApiTest::load(rtl::OUString const&, char const*) /test/source/unoapi_test.cxx:115:11 > #37 0x7f812a8ae042 in SwModelTestBase::loadURL(rtl::OUString const&, char const*, char const*) /sw/qa/unit/swmodeltestbase.cxx:449:20 > #38 0x7f812a8b9452 in SwModelTestBase::load(char const*, char const*) /sw/qa/inc/swmodeltestbase.hxx:351:16 > #39 0x7f812a8af516 in SwModelTestBase::loadAndSave(char const*) /sw/qa/unit/swmodeltestbase.cxx:502:5 > #40 0x7f814fcfe242 in testTableThemePreservation::TestBody() /sw/qa/extras/ooxmlexport/ooxmlexport3.cxx:888:5 during CppunitTest_sw_ooxmlexport3 (<https://ci.libreoffice.org//job/lo_ubsan/2629/>). (The overload for is_integral parameters is needed now to avoid ambiguity errors when integer types other than sal_uInt32 could also match the newly added float overload.) Change-Id: I6482bccef2442655359c71e13f0c9bfe7e4d9dd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144855 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]>
<https://dev-www.libreoffice.org/src/boost_1_81_0.tar.xz> has been generated (on Fedora 37) with > $ wget https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.tar.bz2 > $ printf '71feeed900fbccca04a3b4f2f84a7c217186f28a940ed8b7ed4725986baf99fa boost_1_81_0.tar.bz2' | sha256sum -c # cf. <https://www.boost.org/users/history/version_1_81_0.html> > boost_1_81_0.tar.bz2: OK > $ external/boost/repack_tarball.sh boost_1_81_0.tar.bz2 > Unpacking boost_1_81_0.tar.bz2 ... > Removing unnecessary files ... > Creating boost_1_81_0.tar.xz ... > Cleaning up ... > 1deb0a5a9e33a6626fcaa1d2efd4c0e74ca2b0eea87c1559e3917f3066b633d6 boost_1_81_0.tar.xz > Done. * external/boost/windows-no-utf8-locales.patch.0, introduced with f046fed "Don't ever attempt to initialise a std::locale with a UTF-8 locale on Windows", was presumably obsoleted by <boostorg/locale@f45adfc> "Use UTF-16 <-> UTF-8 codecvt on Windows". * external/boost/libc++.patch.0 was obsoleted by <boostorg/config@f0af4a9> "The std lib unary/binary_function base classes are deprecated/removed from libcpp15." * external/boost/0001-Change-mpl-integral_c-to-boost-integral_constant-to-.patch.2 was obsoleted by <boostorg/numeric_conversion@50a1eae> "Change mpl::integral_c to boost::integral_constant to avoid Clang 16 errors when constructing out of range enums (refs #24, boostorg/mpl#69)". * external/boost/0001-Avoid-boost-phoenix-placeholders-uarg1.10-ODR-violat.patch.2 is needed to e.g. avoid > ./.libs/libetonyek_internal.a(libetonyek_internal_la-KEY1DivElement.o):(.bss+0x3e): multiple definition of `boost::phoenix::placeholders::uarg1'; ./.libs/libetonyek_internal.a(libetonyek_internal_la-IWORKFormula.o):(.bss+0x3e): first defined here etc. while building ExternalProject_libetonyek, caused by <boostorg/phoenix@8b6a9c2> "std::tuple support (Resolving #103) (#104)". Change-Id: I48773166d0c50f2850d8bb37fa6215d9e5c0d51d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145044 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <[email protected]>
...introduced with 18f1e7a "sc: Use FormulaGrammarSwitch" (which gets partially reverted here), > ==7079==ERROR: AddressSanitizer: heap-use-after-free on address 0x61d0002d6cac at pc 0x7f3635905f9e bp 0x7ffdd2107b60 sp 0x7ffdd2107b58 > WRITE of size 4 at 0x61d0002d6cac thread T0 > #0 0x7f3635905f9d in ScDocument::SetGrammar(formula::FormulaGrammar::Grammar) /sc/source/core/data/documen3.cxx:507:14 > #1 0x7f362ce3da0c in FormulaGrammarSwitch::~FormulaGrammarSwitch() /sc/qa/unit/helper/qahelper.cxx:56:12 > #2 0x7f36529ad332 in ScExportTest2::testRefStringUnspecified() /sc/qa/unit/subsequent_export_test2.cxx:436:1 > > 0x61d0002d6cac is located 2092 bytes inside of 2280-byte region [0x61d0002d6480,0x61d0002d6d68) > freed by thread T0 here: > #0 0x4fe180 in operator delete(void*) /home/tdf/lode/packages/llvm-llvmorg-12.0.1.src/compiler-rt/lib/asan/asan_new_delete.cpp:160 > #1 0x7f36398e1b9e in __gnu_cxx::new_allocator<std::_Sp_counted_ptr_inplace<ScDocument, std::allocator<ScDocument>, (__gnu_cxx::_Lock_policy)2> >::deallocate(std::_Sp_counted_ptr_inplace<ScDocument, std::allocator<ScDocument>, (__gnu_cxx::_Lock_policy)2>*, unsigned long) /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/ext/new_allocator.h:125:2 > #2 0x7f36398e1b4e in std::allocator_traits<std::allocator<std::_Sp_counted_ptr_inplace<ScDocument, std::allocator<ScDocument>, (__gnu_cxx::_Lock_policy)2> > >::deallocate(std::allocator<std::_Sp_counted_ptr_inplace<ScDocument, std::allocator<ScDocument>, (__gnu_cxx::_Lock_policy)2> >&, std::_Sp_counted_ptr_inplace<ScDocument, std::allocator<ScDocument>, (__gnu_cxx::_Lock_policy)2>*, unsigned long) /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/alloc_traits.h:462:13 > #3 0x7f36398e0691 in std::__allocated_ptr<std::allocator<std::_Sp_counted_ptr_inplace<ScDocument, std::allocator<ScDocument>, (__gnu_cxx::_Lock_policy)2> > >::~__allocated_ptr() /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/allocated_ptr.h:73:4 > #4 0x7f36398e12b3 in std::_Sp_counted_ptr_inplace<ScDocument, std::allocator<ScDocument>, (__gnu_cxx::_Lock_policy)2>::_M_destroy() /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/shared_ptr_base.h:545:7 > #5 0x7f3635077f59 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/shared_ptr_base.h:170:10 > #6 0x7f3635077bf9 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/shared_ptr_base.h:684:11 > #7 0x7f36388ea06c in std::__shared_ptr<ScDocument, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/shared_ptr_base.h:1123:31 > #8 0x7f36388e02b8 in std::shared_ptr<ScDocument>::~shared_ptr() /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/shared_ptr.h:93:11 > #9 0x7f36398a45c7 in ScDocShell::~ScDocShell() /sc/source/ui/docshell/docsh.cxx:2941:1 > #10 0x7f36398a475f in ScDocShell::~ScDocShell() /sc/source/ui/docshell/docsh.cxx:2910:1 > #11 0x7f36398a4908 in ScDocShell::~ScDocShell() /sc/source/ui/docshell/docsh.cxx:2910:1 > #12 0x7f3627bd3f11 in SvRefBase::ReleaseRef() /include/tools/ref.hxx:163:29 > #13 0x7f3627bd350c in tools::SvRef<SfxObjectShell>::~SvRef() /include/tools/ref.hxx:56:36 > #14 0x7f3629662ce1 in IMPL_SfxBaseModel_DataContainer::~IMPL_SfxBaseModel_DataContainer() /sfx2/source/doc/sfxbasemodel.cxx:249:5 > #15 0x7f362966598a in void __gnu_cxx::new_allocator<IMPL_SfxBaseModel_DataContainer>::destroy<IMPL_SfxBaseModel_DataContainer>(IMPL_SfxBaseModel_DataContainer*) /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/ext/new_allocator.h:140:28 > #16 0x7f3629665746 in void std::allocator_traits<std::allocator<IMPL_SfxBaseModel_DataContainer> >::destroy<IMPL_SfxBaseModel_DataContainer>(std::allocator<IMPL_SfxBaseModel_DataContainer>&, IMPL_SfxBaseModel_DataContainer*) /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/alloc_traits.h:487:8 > #17 0x7f3629660583 in std::_Sp_counted_ptr_inplace<IMPL_SfxBaseModel_DataContainer, std::allocator<IMPL_SfxBaseModel_DataContainer>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/shared_ptr_base.h:535:2 > #18 0x7f3627b7b1fc in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/shared_ptr_base.h:154:6 > #19 0x7f3627b7b029 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/shared_ptr_base.h:684:11 > #20 0x7f362966a9cc in std::__shared_ptr<IMPL_SfxBaseModel_DataContainer, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/shared_ptr_base.h:1123:31 > #21 0x7f362962f893 in std::__shared_ptr<IMPL_SfxBaseModel_DataContainer, (__gnu_cxx::_Lock_policy)2>::reset() /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/shared_ptr_base.h:1235:9 > #22 0x7f3629572b96 in SfxBaseModel::dispose() /sfx2/source/doc/sfxbasemodel.cxx:765:13 > #23 0x7f3629591550 in SfxBaseModel::close(unsigned char) /sfx2/source/doc/sfxbasemodel.cxx:1496:5 > #24 0x7f36295702fd in SfxBaseModel::dispose() /sfx2/source/doc/sfxbasemodel.cxx:722:13 > #25 0x7f36247062aa in UnoApiTest::load(rtl::OUString const&, char const*) /test/source/unoapi_test.cxx:87:22 > #26 0x7f362470bb09 in UnoApiTest::saveAndReload(rtl::OUString const&, char const*) /test/source/unoapi_test.cxx:207:5 > #27 0x7f36529ad04f in ScExportTest2::testRefStringUnspecified() /sc/qa/unit/subsequent_export_test2.cxx:428:5 (<https://ci.libreoffice.org/job/lo_ubsan/2653/>) Change-Id: I34adf135a4ec79935295a21b34277324c531291b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145706 Reviewed-by: Xisco Fauli <[email protected]> Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]>
An ASan UITest_writer_tests7 UITEST_TEST_NAME=tdf135938.tdf135938.test_tdf135938_cross_reference_update occasionally failed for me with > ==1994973==ERROR: AddressSanitizer: heap-use-after-free on address 0x60f00014d718 at pc 0x7f95f4946ffa bp 0x7f95907fd720 sp 0x7f95907fd718 > READ of size 8 at 0x60f00014d718 thread T33 > #0 in std::__cxx1998::vector<std::unique_ptr<SvLBoxItem, std::default_delete<SvLBoxItem>>, std::allocator<std::unique_ptr<SvLBoxItem, std::default_delete<SvLBoxItem>>>>::size() const at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/stl_vector.h:988:40 > #1 in SvTreeListEntry::ItemCount() const at vcl/source/treelist/treelistentry.cxx:110:20 > #2 in SvTabListBox::GetEntryText(SvTreeListEntry const*, unsigned short) at vcl/source/treelist/svtabbx.cxx:289:37 > #3 in SvTabListBox::GetEntryText(SvTreeListEntry*) const at vcl/source/treelist/svtabbx.cxx:280:12 > #4 in TreeListEntryUIObject::get_state() at vcl/source/treelist/uiobject.cxx:119:32 > #5 in UIObjectUnoObj::getState() at vcl/source/uitest/uno/uiobject_uno.cxx:164:29 > #6 in non-virtual thunk to UIObjectUnoObj::getState() at vcl/source/uitest/uno/uiobject_uno.cxx > #7 in gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*) at bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:77:5 > #8 in cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, _typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*, void*, void**, _uno_Any**) at bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:233:13 > #9 in unoInterfaceProxyDispatch at bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:413:13 > #10 in binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::__debug::vector<binaryurp::BinaryAny, std::allocator<binaryurp::BinaryAny>>*) const at binaryurp/source/incomingrequest.cxx:236:13 > #11 in binaryurp::IncomingRequest::execute() const at binaryurp/source/incomingrequest.cxx:79:26 > #12 in request at binaryurp/source/reader.cxx:86:9 > #13 in cppu_threadpool::JobQueue::enter(void const*, bool) at cppu/source/threadpool/jobqueue.cxx:100:17 > #14 in cppu_threadpool::ORequestThread::run() at cppu/source/threadpool/thread.cxx:165:31 > > 0x60f00014d718 is located 120 bytes inside of 168-byte region [0x60f00014d6a0,0x60f00014d748) > 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:164:3 > #1 in SvTreeListEntry::~SvTreeListEntry() at vcl/source/treelist/treelistentry.cxx:62:1 > #2 in std::default_delete<SvTreeListEntry>::operator()(SvTreeListEntry*) const at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/unique_ptr.h:102:2 > #3 in std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>::~unique_ptr() at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/unique_ptr.h:407:4 > #4 in void std::destroy_at<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>>(std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/stl_construct.h:88:15 > #5 in void std::_Destroy<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>>(std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/stl_construct.h:149:7 > #6 in void std::_Destroy_aux<false>::__destroy<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*>(std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*, std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/stl_construct.h:163:6 > #7 in void std::_Destroy<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*>(std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*, std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/stl_construct.h:195:7 > #8 in void std::_Destroy<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*, std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>>(std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*, std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*, std::allocator<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>>&) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/alloc_traits.h:947:7 > #9 in std::__cxx1998::vector<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>, std::allocator<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>>>::_M_erase_at_end(std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/stl_vector.h:1932:6 > #10 in std::__cxx1998::vector<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>, std::allocator<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>>>::clear() at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/stl_vector.h:1601:9 > #11 in std::__debug::vector<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>, std::allocator<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>>>::clear() at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/debug/vector:729:9 > #12 in SvTreeListEntry::ClearChildren() at vcl/source/treelist/treelistentry.cxx:28:16 > #13 in SvTreeList::Clear() at vcl/source/treelist/treelist.cxx:123:16 > #14 in SvTreeListBox::Clear() at vcl/source/treelist/treelistbox.cxx:422:17 > #15 in SalInstanceTreeView::clear() at vcl/source/app/salvtables.cxx:4240:18 > #16 in SwFieldRefPage::Reset(SfxItemSet const*) at sw/source/ui/fldui/fldref.cxx:175:16 > #17 in SwFieldPage::EditNewField(bool) at sw/source/ui/fldui/fldpage.cxx:111:5 > #18 in SwFieldDlg::ReInitTabPage(std::basic_string_view<char, std::char_traits<char>>, bool) at sw/source/ui/fldui/fldtdlg.cxx:218:16 > #19 in SwFieldDlg::Activate() at sw/source/ui/fldui/fldtdlg.cxx:239:9 > #20 in SwChildWinWrapper::UpdateHdl(Timer*) at sw/source/uibase/fldui/fldwrap.cxx:42:26 > #21 in SwChildWinWrapper::LinkStubUpdateHdl(void*, Timer*) at sw/source/uibase/fldui/fldwrap.cxx:39:1 > #22 in Link<Timer*, void>::Call(Timer*) const at include/tools/link.hxx:111:45 > #23 in Timer::Invoke() at vcl/source/app/timer.cxx:75:21 > #24 in Scheduler::CallbackTaskScheduling() at vcl/source/app/scheduler.cxx:481:20 > #25 in SalTimer::CallCallback() at vcl/inc/saltimer.hxx:54:13 > #26 in SvpSalInstance::CheckTimeout(bool) at vcl/headless/svpinst.cxx:161:53 > #27 in SvpSalInstance::ImplYield(bool, bool) at vcl/headless/svpinst.cxx:399:17 > #28 in SvpSalInstance::DoYield(bool, bool) at vcl/headless/svpinst.cxx:471:21 > #29 in ImplYield(bool, bool) at vcl/source/app/svapp.cxx:475:48 > #30 in Application::Yield() at vcl/source/app/svapp.cxx:559:5 > #31 in Application::Execute() at vcl/source/app/svapp.cxx:453:13 > #32 in desktop::Desktop::Main() at desktop/source/app/app.cxx:1604:13 causing > ERROR: test_tdf135938_cross_reference_update (tdf135938.tdf135938) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "uitest/uitest/test.py", line 125, in execute_dialog_through_command > yield xDialog > File "uitest/uitest/test.py", line 140, in execute_modeless_dialog_through_command > yield xDialog > File "sw/qa/uitest/writer_tests7/tdf135938.py", line 40, in test_tdf135938_cross_reference_update > self.assertEqual("ABC", get_state_as_dict(xSelect.getChild(0))["Text"]) > File "uitest/uitest/uihelper/common.py", line 13, in get_state_as_dict > return convert_property_values_to_dict(ui_object.getState()) > uitest.uihelper.common.com.sun.star.lang.DisposedException: Binary URP bridge disposed during call at binaryurp/source/bridge.cxx:613 The issue apparently is that TreeListEntryUIObject UNO objects, introduced in 71f562f "uitest: support tree lists", reference SvTreeListEntry instances by pointers that can apparently go stale while those UNO objects are still alive. I'm not sure there would be an easy fix for this, short of making those SvTreeListEntry instances ref-counted, or ripping out UITest support for those TreeListEntryUIObjects again. However, that underlying issue would presumably not be of practical concern if the test_tdf135938_cross_reference_update Python code would have waited for processEventsToIdle between its > xInsert.executeAction("CLICK", tuple()) and the following block > self.assertEqual("2", get_state_as_dict(xSelect)["Children"]) > self.assertEqual("ABC", get_state_as_dict(xSelect.getChild(0))["Text"]) > self.assertEqual("DEF", get_state_as_dict(xSelect.getChild(1))["Text"]) That way, there should be no more opportunity for the pointers in the passed-out TreeListEntryUIObjects to become stale while the Python code accesses them. And in Python UITest code, having to follow a call to executeAction by a call to processEventsToIdle appears to be a common and recurring requirement, just look at the most recent af1ca68 "another stab at making this test reliable", d183dae "tdf#153161: (Ab)use a call to XTextRange::getString to flush edits", 3cc6b87 "make an effort to fix the UITest_inputLine intermittent failure", f466854 "tdf#150443 sw: fix crash of rejecting table row deletion". So make executeAction always call ProcessEventsToIdle, to simplify this and hopefully make UITests more robust. (Removing any now-redundant calls to processEventsToIdle, following calls to executeAction, from Python test code is left as follow-up clean up for now.) (I /think/ that the implementation of UIObjectUnoObj::executeAction could be simplified now, as waiting for Scheduler::ProcessEventsToIdle() should already make sure that aIdle has been processed, removing the need for the Notifier. But lets leave that as a follow-up TODO for now.) Change-Id: I41a5d51515dedaae44fb810b0ad3b0264c90abf3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146434 Reviewed-by: Xisco Fauli <[email protected]> Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]>
sporadically reproducible with tsan and ./instdir/program/soffice.bin --headless --convert-to pdf ~/forum-mso-en4-802501.xlsx move getTables().applyAutoFilters(), which wants to query tab 1 while tab 1 is still getting imported, until after the threaded import has completed. This call was moved before in: commit edd51b8 Date: Thu Aug 15 16:23:46 2013 +0100 fix for bnc#834705 missing drop downs for autofilter ================== WARNING: ThreadSanitizer: data race (pid=3791886) Read of size 8 at 0x7b5000040f20 by thread T7 (mutexes: write M0, write M1): #0 __gnu_cxx::__normal_iterator<unsigned long const*, std::vector<unsigned long, std::allocator<unsigned long>>>::__normal_iterator(unsigned long const* const&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_iterator.h:1073:20 (libsclo.so+0x3d31c4) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #1 std::vector<unsigned long, std::allocator<unsigned long>>::cend() const /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_vector.h:960:16 (libsclo.so+0x3d31c4) #2 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::cbegin() const core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3771:34 (libsclo.so+0x3d31c4) #3 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::begin() const core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3753:12 (libsclo.so+0x3d31c4) #4 ScColumn::InitBlockPosition(sc::ColumnBlockConstPosition&) const core/sc/source/core/data/column3.cxx:1135:35 (libsclo.so+0x3d31c4) #5 ScTable::GetDataArea(short&, int&, short&, int&, bool, bool) const core/sc/source/core/data/table1.cxx:908:19 (libsclo.so+0x637b39) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #6 ScDocument::GetDataArea(short, short&, int&, short&, int&, bool, bool) const core/sc/source/core/data/document.cxx:1104:23 (libsclo.so+0x49b696) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #7 ScDBData::ExtendDataArea(ScDocument const&) core/sc/source/core/tool/dbdata.cxx:654:10 (libsclo.so+0x741e77) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #8 ScDocument::GetFilterEntries(short, int, short, ScFilterEntries&) core/sc/source/core/data/documen3.cxx:1577:14 (libsclo.so+0x46e7a6) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #9 (anonymous namespace)::fillQueryParam(ScQueryParam&, ScDocument*, com::sun::star::uno::Sequence<com::sun::star::sheet::TableFilterField3> const&) core/sc/source/ui/unoobj/datauno.cxx:1164:27 (libsclo.so+0xf7dd72) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #10 ScFilterDescriptorBase::setFilterFields3(com::sun::star::uno::Sequence<com::sun::star::sheet::TableFilterField3> const&) core/sc/source/ui/unoobj/datauno.cxx:1380:5 (libsclo.so+0xf7dd72) #11 non-virtual thunk to ScFilterDescriptorBase::setFilterFields3(com::sun::star::uno::Sequence<com::sun::star::sheet::TableFilterField3> const&) core/sc/source/ui/unoobj/datauno.cxx (libsclo.so+0xf7e2c2) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #12 oox::xls::AutoFilter::finalizeImport(com::sun::star::uno::Reference<com::sun::star::sheet::XDatabaseRange> const&, short) core/sc/source/filter/oox/autofilterbuffer.cxx:803:22 (libscfiltlo.so+0x3cca2c) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #13 oox::xls::AutoFilterBuffer::finalizeImport(com::sun::star::uno::Reference<com::sun::star::sheet::XDatabaseRange> const&, short) core/sc/source/filter/oox/autofilterbuffer.cxx:950:22 (libscfiltlo.so+0x3cdc0b) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #14 oox::xls::Table::applyAutoFilters() core/sc/source/filter/oox/tablebuffer.cxx:143:23 (libscfiltlo.so+0x4b9268) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #15 void std::__invoke_impl<void, void (oox::xls::Table::*&)(), oox::xls::Table&>(std::__invoke_memfun_ref, void (oox::xls::Table::*&)(), oox::xls::Table&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/invoke.h:67:14 (libscfiltlo.so+0x4b9d96) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #16 std::__invoke_result<void (oox::xls::Table::*&)(), oox::xls::Table&>::type std::__invoke<void (oox::xls::Table::*&)(), oox::xls::Table&>(void (oox::xls::Table::*&)(), oox::xls::Table&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/invoke.h:96:14 (libscfiltlo.so+0x4b9d96) #17 void std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>::__call<void, oox::xls::Table&, 0ul>(std::tuple<oox::xls::Table&>&&, std::_Index_tuple<0ul>) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/functional:495:11 (libscfiltlo.so+0x4b9d96) #18 void std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>::operator()<oox::xls::Table&, void>(oox::xls::Table&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/functional:580:17 (libscfiltlo.so+0x4b9d96) #19 oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>::operator()(std::pair<int const, std::shared_ptr<oox::xls::Table>> const&) core/include/oox/helper/refmap.hxx:122:89 (libscfiltlo.so+0x4b9d96) #20 oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>> std::for_each<std::_Rb_tree_const_iterator<std::pair<int const, std::shared_ptr<oox::xls::Table>>>, oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>>(std::_Rb_tree_const_iterator<std::pair<int const, std::shared_ptr<oox::xls::Table>>>, std::_Rb_tree_const_iterator<std::pair<int const, std::shared_ptr<oox::xls::Table>>>, oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algo.h:3787:2 (libscfiltlo.so+0x4b9d96) #21 void oox::RefMap<int, oox::xls::Table, std::less<int>>::forEach<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>(std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()> const&) const core/include/oox/helper/refmap.hxx:71:29 (libscfiltlo.so+0x4b9d96) #22 void oox::RefMap<int, oox::xls::Table, std::less<int>>::forEachMem<void (oox::xls::Table::*)()>(void (oox::xls::Table::*)()) const core/include/oox/helper/refmap.hxx:79:29 (libscfiltlo.so+0x4b9d96) #23 oox::xls::TableBuffer::applyAutoFilters() core/sc/source/filter/oox/tablebuffer.cxx:179:16 (libscfiltlo.so+0x4b9d96) #24 oox::xls::WorksheetGlobals::finalizeWorksheetImport() core/sc/source/filter/oox/worksheethelper.cxx:943:17 (libscfiltlo.so+0x4ee58e) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #25 oox::xls::WorksheetHelper::finalizeWorksheetImport() core/sc/source/filter/oox/worksheethelper.cxx:1625:17 (libscfiltlo.so+0x4f2cff) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #26 oox::xls::WorksheetFragment::finalizeImport() core/sc/source/filter/oox/worksheetfragment.cxx:632:5 (libscfiltlo.so+0x4e91cc) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #27 oox::core::FragmentHandler2::endDocument() core/oox/source/core/fragmenthandler2.cxx:53:5 (libooxlo.so+0x1c20d9) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #28 non-virtual thunk to oox::core::FragmentHandler2::endDocument() core/oox/source/core/fragmenthandler2.cxx (libooxlo.so+0x1c20d9) #29 sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:910:36 (libexpwraplo.so+0x2a06a) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4) #30 sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:1482:13 (libexpwraplo.so+0x31738) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4) #31 oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) core/oox/source/core/fastparser.cxx:121:15 (libooxlo.so+0x1ae980) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #32 oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) core/oox/source/core/fastparser.cxx:129:5 (libooxlo.so+0x1aebdf) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #33 oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/oox/source/core/xmlfilterbase.cxx:412:21 (libooxlo.so+0x1d01ac) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #34 oox::xls::WorkbookHelper::importOoxFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/sc/source/filter/oox/workbookhelper.cxx:1024:27 (libscfiltlo.so+0x4dbbd2) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #35 oox::xls::(anonymous namespace)::WorkerThread::doWork() core/sc/source/filter/oox/workbookfragment.cxx:249:27 (libscfiltlo.so+0x4d3347) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #36 comphelper::ThreadTask::exec() core/comphelper/source/misc/threadpool.cxx:319:9 (libcomphelper.so+0x17dbc1) (BuildId: 30a9bf106ea764f860a55d99b75dd87a0f268335) #37 comphelper::ThreadPool::ThreadWorker::execute() core/comphelper/source/misc/threadpool.cxx:85:24 (libcomphelper.so+0x17dbc1) #38 salhelper::Thread::run() core/salhelper/source/thread.cxx:39:5 (libuno_salhelpergcc3.so.3+0x5267) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6) #39 non-virtual thunk to salhelper::Thread::run() core/salhelper/source/thread.cxx (libuno_salhelpergcc3.so.3+0x5267) #40 threadFunc core/include/osl/thread.hxx:189:15 (libuno_salhelpergcc3.so.3+0x551e) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6) #41 osl_thread_start_Impl(void*) core/sal/osl/unx/thread.cxx:265:9 (libuno_sal.so.3+0x6a9d5) (BuildId: 767a6cd7c58bf820064a10cf0ab0f15b30c2f4ac) Previous write of size 8 at 0x7b5000040f20 by thread T6 (mutexes: write M2): #0 std::vector<unsigned long, std::allocator<unsigned long>>::_M_fill_insert(__gnu_cxx::__normal_iterator<unsigned long*, std::vector<unsigned long, std::allocator<unsigned long>>>, unsigned long, unsigned long const&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/vector.tcc:556:29 (libsclo.so+0x2f6766) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #1 std::vector<unsigned long, std::allocator<unsigned long>>::insert(__gnu_cxx::__normal_iterator<unsigned long const*, std::vector<unsigned long, std::allocator<unsigned long>>>, unsigned long, unsigned long const&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_vector.h:1435:2 (libsclo.so+0x2ffd3a) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #2 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::blocks_type::insert(unsigned long, unsigned long) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:99:15 (libsclo.so+0x2ffd3a) #3 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_new_block_to_middle(unsigned long, unsigned long, unsigned long, bool) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:4326:19 (libsclo.so+0x2ffd3a) #4 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_cell_to_middle_of_block<double>(unsigned long, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3999:19 (libsclo.so+0x3259fe) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #5 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_cell_to_empty_block<double>(unsigned long, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3313:12 (libsclo.so+0x3259fe) #6 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_impl<double>(unsigned long, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:1260:16 (libsclo.so+0x32492f) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #7 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set<double>(mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> const&, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:754:20 (libsclo.so+0x4cc138) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #8 ScDocumentImport::setNumericCell(ScAddress const&, double) core/sc/source/core/data/documentimport.cxx:259:35 (libsclo.so+0x4cc138) #9 oox::xls::SheetDataBuffer::setValueCell(oox::xls::CellModel const&, double) core/sc/source/filter/oox/sheetdatabuffer.cxx:107:20 (libscfiltlo.so+0x4833c0) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #10 oox::xls::SheetDataContext::onEndElement() core/sc/source/filter/oox/sheetdatacontext.cxx:185:25 (libscfiltlo.so+0x48fed2) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #11 non-virtual thunk to oox::xls::SheetDataContext::onEndElement() core/sc/source/filter/oox/sheetdatacontext.cxx (libscfiltlo.so+0x48fff9) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #12 oox::core::ContextHandler2Helper::implEndElement(int) core/oox/source/core/contexthandler2.cxx:125:9 (libooxlo.so+0x1ac82b) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #13 oox::core::ContextHandler2::endFastElement(int) core/oox/source/core/contexthandler2.cxx:220:5 (libooxlo.so+0x1ac82b) #14 non-virtual thunk to oox::core::ContextHandler2::endFastElement(int) core/oox/source/core/contexthandler2.cxx (libooxlo.so+0x1ac82b) #15 (anonymous namespace)::Entity::endElement() core/sax/source/fastparser/fastparser.cxx:515:27 (libexpwraplo.so+0x3042f) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4) #16 sax_fastparser::FastSaxParserImpl::consume((anonymous namespace)::EventList&) core/sax/source/fastparser/fastparser.cxx:1029:25 (libexpwraplo.so+0x29d37) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4) #17 sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:869:22 (libexpwraplo.so+0x29d37) #18 sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:1482:13 (libexpwraplo.so+0x31738) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4) #19 oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) core/oox/source/core/fastparser.cxx:121:15 (libooxlo.so+0x1ae980) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #20 oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) core/oox/source/core/fastparser.cxx:129:5 (libooxlo.so+0x1aebdf) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #21 oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/oox/source/core/xmlfilterbase.cxx:412:21 (libooxlo.so+0x1d01ac) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #22 oox::xls::WorkbookHelper::importOoxFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/sc/source/filter/oox/workbookhelper.cxx:1024:27 (libscfiltlo.so+0x4dbbd2) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #23 oox::xls::(anonymous namespace)::WorkerThread::doWork() core/sc/source/filter/oox/workbookfragment.cxx:249:27 (libscfiltlo.so+0x4d3347) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #24 comphelper::ThreadTask::exec() core/comphelper/source/misc/threadpool.cxx:319:9 (libcomphelper.so+0x17dbc1) (BuildId: 30a9bf106ea764f860a55d99b75dd87a0f268335) #25 comphelper::ThreadPool::ThreadWorker::execute() core/comphelper/source/misc/threadpool.cxx:85:24 (libcomphelper.so+0x17dbc1) #26 salhelper::Thread::run() core/salhelper/source/thread.cxx:39:5 (libuno_salhelpergcc3.so.3+0x5267) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6) #27 non-virtual thunk to salhelper::Thread::run() core/salhelper/source/thread.cxx (libuno_salhelpergcc3.so.3+0x5267) #28 threadFunc core/include/osl/thread.hxx:189:15 (libuno_salhelpergcc3.so.3+0x551e) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6) #29 osl_thread_start_Impl(void*) core/sal/osl/unx/thread.cxx:265:9 (libuno_sal.so.3+0x6a9d5) (BuildId: 767a6cd7c58bf820064a10cf0ab0f15b30c2f4ac) Change-Id: I7542432749fded8ab5e35f79cb221ad712f7802d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146430 Tested-by: Jenkins Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]>
An ASan UITest_writer_tests7 UITEST_TEST_NAME=tdf135938.tdf135938.test_tdf135938_cross_reference_update occasionally failed for me with > ==1994973==ERROR: AddressSanitizer: heap-use-after-free on address 0x60f00014d718 at pc 0x7f95f4946ffa bp 0x7f95907fd720 sp 0x7f95907fd718 > READ of size 8 at 0x60f00014d718 thread T33 > #0 in std::__cxx1998::vector<std::unique_ptr<SvLBoxItem, std::default_delete<SvLBoxItem>>, std::allocator<std::unique_ptr<SvLBoxItem, std::default_delete<SvLBoxItem>>>>::size() const at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/stl_vector.h:988:40 > #1 in SvTreeListEntry::ItemCount() const at vcl/source/treelist/treelistentry.cxx:110:20 > #2 in SvTabListBox::GetEntryText(SvTreeListEntry const*, unsigned short) at vcl/source/treelist/svtabbx.cxx:289:37 > #3 in SvTabListBox::GetEntryText(SvTreeListEntry*) const at vcl/source/treelist/svtabbx.cxx:280:12 > #4 in TreeListEntryUIObject::get_state() at vcl/source/treelist/uiobject.cxx:119:32 > #5 in UIObjectUnoObj::getState() at vcl/source/uitest/uno/uiobject_uno.cxx:164:29 > #6 in non-virtual thunk to UIObjectUnoObj::getState() at vcl/source/uitest/uno/uiobject_uno.cxx > #7 in gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*) at bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:77:5 > #8 in cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, _typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*, void*, void**, _uno_Any**) at bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:233:13 > #9 in unoInterfaceProxyDispatch at bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:413:13 > #10 in binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::__debug::vector<binaryurp::BinaryAny, std::allocator<binaryurp::BinaryAny>>*) const at binaryurp/source/incomingrequest.cxx:236:13 > #11 in binaryurp::IncomingRequest::execute() const at binaryurp/source/incomingrequest.cxx:79:26 > #12 in request at binaryurp/source/reader.cxx:86:9 > #13 in cppu_threadpool::JobQueue::enter(void const*, bool) at cppu/source/threadpool/jobqueue.cxx:100:17 > #14 in cppu_threadpool::ORequestThread::run() at cppu/source/threadpool/thread.cxx:165:31 > > 0x60f00014d718 is located 120 bytes inside of 168-byte region [0x60f00014d6a0,0x60f00014d748) > 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:164:3 > #1 in SvTreeListEntry::~SvTreeListEntry() at vcl/source/treelist/treelistentry.cxx:62:1 > #2 in std::default_delete<SvTreeListEntry>::operator()(SvTreeListEntry*) const at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/unique_ptr.h:102:2 > #3 in std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>::~unique_ptr() at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/unique_ptr.h:407:4 > #4 in void std::destroy_at<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>>(std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/stl_construct.h:88:15 > #5 in void std::_Destroy<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>>(std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/stl_construct.h:149:7 > #6 in void std::_Destroy_aux<false>::__destroy<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*>(std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*, std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/stl_construct.h:163:6 > #7 in void std::_Destroy<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*>(std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*, std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/stl_construct.h:195:7 > #8 in void std::_Destroy<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*, std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>>(std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*, std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*, std::allocator<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>>&) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/alloc_traits.h:947:7 > #9 in std::__cxx1998::vector<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>, std::allocator<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>>>::_M_erase_at_end(std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/stl_vector.h:1932:6 > #10 in std::__cxx1998::vector<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>, std::allocator<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>>>::clear() at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/stl_vector.h:1601:9 > #11 in std::__debug::vector<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>, std::allocator<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>>>::clear() at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/debug/vector:729:9 > #12 in SvTreeListEntry::ClearChildren() at vcl/source/treelist/treelistentry.cxx:28:16 > #13 in SvTreeList::Clear() at vcl/source/treelist/treelist.cxx:123:16 > #14 in SvTreeListBox::Clear() at vcl/source/treelist/treelistbox.cxx:422:17 > #15 in SalInstanceTreeView::clear() at vcl/source/app/salvtables.cxx:4240:18 > #16 in SwFieldRefPage::Reset(SfxItemSet const*) at sw/source/ui/fldui/fldref.cxx:175:16 > #17 in SwFieldPage::EditNewField(bool) at sw/source/ui/fldui/fldpage.cxx:111:5 > #18 in SwFieldDlg::ReInitTabPage(std::basic_string_view<char, std::char_traits<char>>, bool) at sw/source/ui/fldui/fldtdlg.cxx:218:16 > #19 in SwFieldDlg::Activate() at sw/source/ui/fldui/fldtdlg.cxx:239:9 > #20 in SwChildWinWrapper::UpdateHdl(Timer*) at sw/source/uibase/fldui/fldwrap.cxx:42:26 > #21 in SwChildWinWrapper::LinkStubUpdateHdl(void*, Timer*) at sw/source/uibase/fldui/fldwrap.cxx:39:1 > #22 in Link<Timer*, void>::Call(Timer*) const at include/tools/link.hxx:111:45 > #23 in Timer::Invoke() at vcl/source/app/timer.cxx:75:21 > #24 in Scheduler::CallbackTaskScheduling() at vcl/source/app/scheduler.cxx:481:20 > #25 in SalTimer::CallCallback() at vcl/inc/saltimer.hxx:54:13 > #26 in SvpSalInstance::CheckTimeout(bool) at vcl/headless/svpinst.cxx:161:53 > #27 in SvpSalInstance::ImplYield(bool, bool) at vcl/headless/svpinst.cxx:399:17 > #28 in SvpSalInstance::DoYield(bool, bool) at vcl/headless/svpinst.cxx:471:21 > #29 in ImplYield(bool, bool) at vcl/source/app/svapp.cxx:475:48 > #30 in Application::Yield() at vcl/source/app/svapp.cxx:559:5 > #31 in Application::Execute() at vcl/source/app/svapp.cxx:453:13 > #32 in desktop::Desktop::Main() at desktop/source/app/app.cxx:1604:13 causing > ERROR: test_tdf135938_cross_reference_update (tdf135938.tdf135938) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "uitest/uitest/test.py", line 125, in execute_dialog_through_command > yield xDialog > File "uitest/uitest/test.py", line 140, in execute_modeless_dialog_through_command > yield xDialog > File "sw/qa/uitest/writer_tests7/tdf135938.py", line 40, in test_tdf135938_cross_reference_update > self.assertEqual("ABC", get_state_as_dict(xSelect.getChild(0))["Text"]) > File "uitest/uitest/uihelper/common.py", line 13, in get_state_as_dict > return convert_property_values_to_dict(ui_object.getState()) > uitest.uihelper.common.com.sun.star.lang.DisposedException: Binary URP bridge disposed during call at binaryurp/source/bridge.cxx:613 The issue apparently is that TreeListEntryUIObject UNO objects, introduced in 71f562f "uitest: support tree lists", reference SvTreeListEntry instances by pointers that can apparently go stale while those UNO objects are still alive. I'm not sure there would be an easy fix for this, short of making those SvTreeListEntry instances ref-counted, or ripping out UITest support for those TreeListEntryUIObjects again. However, that underlying issue would presumably not be of practical concern if the test_tdf135938_cross_reference_update Python code would have waited for processEventsToIdle between its > xInsert.executeAction("CLICK", tuple()) and the following block > self.assertEqual("2", get_state_as_dict(xSelect)["Children"]) > self.assertEqual("ABC", get_state_as_dict(xSelect.getChild(0))["Text"]) > self.assertEqual("DEF", get_state_as_dict(xSelect.getChild(1))["Text"]) That way, there should be no more opportunity for the pointers in the passed-out TreeListEntryUIObjects to become stale while the Python code accesses them. And in Python UITest code, having to follow a call to executeAction by a call to processEventsToIdle appears to be a common and recurring requirement, just look at the most recent af1ca68 "another stab at making this test reliable", d183dae "tdf#153161: (Ab)use a call to XTextRange::getString to flush edits", 3cc6b87 "make an effort to fix the UITest_inputLine intermittent failure", f466854 "tdf#150443 sw: fix crash of rejecting table row deletion". So make executeAction always call ProcessEventsToIdle, to simplify this and hopefully make UITests more robust. (Removing any now-redundant calls to processEventsToIdle, following calls to executeAction, from Python test code is left as follow-up clean up for now.) (I /think/ that the implementation of UIObjectUnoObj::executeAction could be simplified now, as waiting for Scheduler::ProcessEventsToIdle() should already make sure that aIdle has been processed, removing the need for the Notifier. But lets leave that as a follow-up TODO for now.) Change-Id: I41a5d51515dedaae44fb810b0ad3b0264c90abf3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146434 Reviewed-by: Xisco Fauli <[email protected]> Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> (cherry picked from commit 51a2e1a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146404
An ASan UITest_writer_tests7 UITEST_TEST_NAME=tdf135938.tdf135938.test_tdf135938_cross_reference_update occasionally failed for me with > ==1994973==ERROR: AddressSanitizer: heap-use-after-free on address 0x60f00014d718 at pc 0x7f95f4946ffa bp 0x7f95907fd720 sp 0x7f95907fd718 > READ of size 8 at 0x60f00014d718 thread T33 > #0 in std::__cxx1998::vector<std::unique_ptr<SvLBoxItem, std::default_delete<SvLBoxItem>>, std::allocator<std::unique_ptr<SvLBoxItem, std::default_delete<SvLBoxItem>>>>::size() const at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/stl_vector.h:988:40 > #1 in SvTreeListEntry::ItemCount() const at vcl/source/treelist/treelistentry.cxx:110:20 > #2 in SvTabListBox::GetEntryText(SvTreeListEntry const*, unsigned short) at vcl/source/treelist/svtabbx.cxx:289:37 > #3 in SvTabListBox::GetEntryText(SvTreeListEntry*) const at vcl/source/treelist/svtabbx.cxx:280:12 > #4 in TreeListEntryUIObject::get_state() at vcl/source/treelist/uiobject.cxx:119:32 > #5 in UIObjectUnoObj::getState() at vcl/source/uitest/uno/uiobject_uno.cxx:164:29 > #6 in non-virtual thunk to UIObjectUnoObj::getState() at vcl/source/uitest/uno/uiobject_uno.cxx > #7 in gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*) at bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:77:5 > #8 in cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, _typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*, void*, void**, _uno_Any**) at bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:233:13 > #9 in unoInterfaceProxyDispatch at bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:413:13 > #10 in binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::__debug::vector<binaryurp::BinaryAny, std::allocator<binaryurp::BinaryAny>>*) const at binaryurp/source/incomingrequest.cxx:236:13 > #11 in binaryurp::IncomingRequest::execute() const at binaryurp/source/incomingrequest.cxx:79:26 > #12 in request at binaryurp/source/reader.cxx:86:9 > #13 in cppu_threadpool::JobQueue::enter(void const*, bool) at cppu/source/threadpool/jobqueue.cxx:100:17 > #14 in cppu_threadpool::ORequestThread::run() at cppu/source/threadpool/thread.cxx:165:31 > > 0x60f00014d718 is located 120 bytes inside of 168-byte region [0x60f00014d6a0,0x60f00014d748) > 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:164:3 > #1 in SvTreeListEntry::~SvTreeListEntry() at vcl/source/treelist/treelistentry.cxx:62:1 > #2 in std::default_delete<SvTreeListEntry>::operator()(SvTreeListEntry*) const at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/unique_ptr.h:102:2 > #3 in std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>::~unique_ptr() at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/unique_ptr.h:407:4 > #4 in void std::destroy_at<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>>(std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/stl_construct.h:88:15 > #5 in void std::_Destroy<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>>(std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/stl_construct.h:149:7 > #6 in void std::_Destroy_aux<false>::__destroy<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*>(std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*, std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/stl_construct.h:163:6 > #7 in void std::_Destroy<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*>(std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*, std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/stl_construct.h:195:7 > #8 in void std::_Destroy<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*, std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>>(std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*, std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*, std::allocator<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>>&) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/alloc_traits.h:947:7 > #9 in std::__cxx1998::vector<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>, std::allocator<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>>>::_M_erase_at_end(std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>*) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/stl_vector.h:1932:6 > #10 in std::__cxx1998::vector<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>, std::allocator<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>>>::clear() at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/stl_vector.h:1601:9 > #11 in std::__debug::vector<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>, std::allocator<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>>>::clear() at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/13.0.0/../../../../include/c++/13.0.0/debug/vector:729:9 > #12 in SvTreeListEntry::ClearChildren() at vcl/source/treelist/treelistentry.cxx:28:16 > #13 in SvTreeList::Clear() at vcl/source/treelist/treelist.cxx:123:16 > #14 in SvTreeListBox::Clear() at vcl/source/treelist/treelistbox.cxx:422:17 > #15 in SalInstanceTreeView::clear() at vcl/source/app/salvtables.cxx:4240:18 > #16 in SwFieldRefPage::Reset(SfxItemSet const*) at sw/source/ui/fldui/fldref.cxx:175:16 > #17 in SwFieldPage::EditNewField(bool) at sw/source/ui/fldui/fldpage.cxx:111:5 > #18 in SwFieldDlg::ReInitTabPage(std::basic_string_view<char, std::char_traits<char>>, bool) at sw/source/ui/fldui/fldtdlg.cxx:218:16 > #19 in SwFieldDlg::Activate() at sw/source/ui/fldui/fldtdlg.cxx:239:9 > #20 in SwChildWinWrapper::UpdateHdl(Timer*) at sw/source/uibase/fldui/fldwrap.cxx:42:26 > #21 in SwChildWinWrapper::LinkStubUpdateHdl(void*, Timer*) at sw/source/uibase/fldui/fldwrap.cxx:39:1 > #22 in Link<Timer*, void>::Call(Timer*) const at include/tools/link.hxx:111:45 > #23 in Timer::Invoke() at vcl/source/app/timer.cxx:75:21 > #24 in Scheduler::CallbackTaskScheduling() at vcl/source/app/scheduler.cxx:481:20 > #25 in SalTimer::CallCallback() at vcl/inc/saltimer.hxx:54:13 > #26 in SvpSalInstance::CheckTimeout(bool) at vcl/headless/svpinst.cxx:161:53 > #27 in SvpSalInstance::ImplYield(bool, bool) at vcl/headless/svpinst.cxx:399:17 > #28 in SvpSalInstance::DoYield(bool, bool) at vcl/headless/svpinst.cxx:471:21 > #29 in ImplYield(bool, bool) at vcl/source/app/svapp.cxx:475:48 > #30 in Application::Yield() at vcl/source/app/svapp.cxx:559:5 > #31 in Application::Execute() at vcl/source/app/svapp.cxx:453:13 > #32 in desktop::Desktop::Main() at desktop/source/app/app.cxx:1604:13 causing > ERROR: test_tdf135938_cross_reference_update (tdf135938.tdf135938) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "uitest/uitest/test.py", line 125, in execute_dialog_through_command > yield xDialog > File "uitest/uitest/test.py", line 140, in execute_modeless_dialog_through_command > yield xDialog > File "sw/qa/uitest/writer_tests7/tdf135938.py", line 40, in test_tdf135938_cross_reference_update > self.assertEqual("ABC", get_state_as_dict(xSelect.getChild(0))["Text"]) > File "uitest/uitest/uihelper/common.py", line 13, in get_state_as_dict > return convert_property_values_to_dict(ui_object.getState()) > uitest.uihelper.common.com.sun.star.lang.DisposedException: Binary URP bridge disposed during call at binaryurp/source/bridge.cxx:613 The issue apparently is that TreeListEntryUIObject UNO objects, introduced in 71f562f "uitest: support tree lists", reference SvTreeListEntry instances by pointers that can apparently go stale while those UNO objects are still alive. I'm not sure there would be an easy fix for this, short of making those SvTreeListEntry instances ref-counted, or ripping out UITest support for those TreeListEntryUIObjects again. However, that underlying issue would presumably not be of practical concern if the test_tdf135938_cross_reference_update Python code would have waited for processEventsToIdle between its > xInsert.executeAction("CLICK", tuple()) and the following block > self.assertEqual("2", get_state_as_dict(xSelect)["Children"]) > self.assertEqual("ABC", get_state_as_dict(xSelect.getChild(0))["Text"]) > self.assertEqual("DEF", get_state_as_dict(xSelect.getChild(1))["Text"]) That way, there should be no more opportunity for the pointers in the passed-out TreeListEntryUIObjects to become stale while the Python code accesses them. And in Python UITest code, having to follow a call to executeAction by a call to processEventsToIdle appears to be a common and recurring requirement, just look at the most recent af1ca68 "another stab at making this test reliable", d183dae "tdf#153161: (Ab)use a call to XTextRange::getString to flush edits", 3cc6b87 "make an effort to fix the UITest_inputLine intermittent failure", f466854 "tdf#150443 sw: fix crash of rejecting table row deletion". So make executeAction always call ProcessEventsToIdle, to simplify this and hopefully make UITests more robust. (Removing any now-redundant calls to processEventsToIdle, following calls to executeAction, from Python test code is left as follow-up clean up for now.) (I /think/ that the implementation of UIObjectUnoObj::executeAction could be simplified now, as waiting for Scheduler::ProcessEventsToIdle() should already make sure that aIdle has been processed, removing the need for the Notifier. But lets leave that as a follow-up TODO for now.) Change-Id: I41a5d51515dedaae44fb810b0ad3b0264c90abf3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146434 Reviewed-by: Xisco Fauli <[email protected]> Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> (cherry picked from commit 51a2e1a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146404
UITest_writer_macro_tests occasionally failed with > ==3730889==ERROR: AddressSanitizer: heap-use-after-free on address 0x60d00057d080 at pc 0x7f75353d933c bp 0x7ffcedf8de90 sp 0x7ffcedf8de88 > READ of size 8 at 0x60d00057d080 thread T0 > #0 in basctl::ModulWindow::GetState(SfxItemSet&) at basctl/source/basicide/baside2.cxx:1088:22 > #1 in basctl::Shell::GetState(SfxItemSet&) at basctl/source/basicide/basides1.cxx:1160:18 > #2 in SfxStubbasctl_ShellGetState(SfxShell*, SfxItemSet&) at workdir/SdiTarget/basctl/sdi/basslots.hxx:164:1 > #3 in SfxDispatcher::FillState_(SfxSlotServer const&, SfxItemSet&, SfxSlot const*) at sfx2/source/control/dispatch.cxx:1658:9 > #4 in SfxBindings::Update_Impl(SfxStateCache&) at sfx2/source/control/bindings.cxx:260:22 > #5 in SfxBindings::NextJob_Impl(Timer const*) at sfx2/source/control/bindings.cxx:1275:17 > #6 in SfxBindings::NextJob(Timer*) at sfx2/source/control/bindings.cxx:1220:5 > #7 in SfxBindings::LinkStubNextJob(void*, Timer*) at sfx2/source/control/bindings.cxx:1218:1 > #8 in Link<Timer*, void>::Call(Timer*) const at include/tools/link.hxx:111:45 > #9 in Timer::Invoke() at vcl/source/app/timer.cxx:75:21 > #10 in Scheduler::CallbackTaskScheduling() at vcl/source/app/scheduler.cxx:481:20 > #11 in SalTimer::CallCallback() at vcl/inc/saltimer.hxx:54:13 > #12 in SvpSalInstance::CheckTimeout(bool) at vcl/headless/svpinst.cxx:161:53 > #13 in SvpSalInstance::ImplYield(bool, bool) at vcl/headless/svpinst.cxx:399:17 > #14 in SvpSalInstance::DoYield(bool, bool) at vcl/headless/svpinst.cxx:471:21 > #15 in ImplYield(bool, bool) at vcl/source/app/svapp.cxx:475:48 > #16 in Application::Yield() at vcl/source/app/svapp.cxx:559:5 > #17 in Application::Execute() at vcl/source/app/svapp.cxx:453:13 > #18 in desktop::Desktop::Main() at desktop/source/app/app.cxx:1604:13 > #19 in ImplSVMain() at vcl/source/app/svmain.cxx:203:35 > #20 in SVMain() at vcl/source/app/svmain.cxx:235:12 > #21 in soffice_main at desktop/source/app/sofficemain.cxx:94:12 > #22 in sal_main at desktop/source/app/main.c:51:15 > #23 in main at desktop/source/app/main.c:49:1 > > 0x60d00057d080 is located 0 bytes inside of 144-byte region [0x60d00057d080,0x60d00057d110) > freed by thread T20 here: > #0 in operator delete(void*, unsigned long) at /home/sbergman/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:164:3 > #1 in basctl::ModulWindow::~ModulWindow() at basctl/source/basicide/baside2.cxx:235:1 > #2 in VclReferenceBase::release() const at include/vcl/vclreferencebase.hxx:43:13 > #3 in rtl::Reference<basctl::BaseWindow>::~Reference() at include/rtl/ref.hxx:129:22 > #4 in VclPtr<basctl::BaseWindow>::disposeAndClear() at include/vcl/vclptr.hxx:209:5 > #5 in basctl::Shell::~Shell() at basctl/source/basicide/basidesh.cxx:246:23 > #6 in basctl::Shell::~Shell() at basctl/source/basicide/basidesh.cxx:228:1 > #7 in SfxViewFrame::ReleaseObjectShell_Impl() at sfx2/source/view/viewfrm.cxx:1114:9 > #8 in SfxViewFrame::~SfxViewFrame() at sfx2/source/view/viewfrm.cxx:1905:5 > #9 in SfxViewFrame::Close() at sfx2/source/view/viewfrm.cxx:1166:5 > #10 in SfxFrame::DoClose_Impl() at sfx2/source/view/frame.cxx:138:37 > #11 in SfxBaseController::dispose() at sfx2/source/view/sfxbasecontroller.cxx:931:28 > #12 in (anonymous namespace)::XFrameImpl::setComponent(com::sun::star::uno::Reference<com::sun::star::awt::XWindow> const&, com::sun::star::uno::Reference<com::sun::star::frame::XController> const&) at framework/source/services/frame.cxx:1493:33 > #13 in (anonymous namespace)::XFrameImpl::close(unsigned char) at framework/source/services/frame.cxx:1704:12 > #14 in SfxFrame::DoClose() at sfx2/source/view/frame.cxx:104:29 > #15 in SfxViewFrame::Notify(SfxBroadcaster&, SfxHint const&) at sfx2/source/view/viewfrm.cxx:1703:28 > #16 in SfxBroadcaster::Broadcast(SfxHint const&) at svl/source/notify/SfxBroadcaster.cxx:40:24 > #17 in (anonymous namespace)::SfxModelListener_Impl::notifyClosing(com::sun::star::lang::EventObject const&) at sfx2/source/doc/objxtor.cxx:145:12 > #18 in SfxBaseModel::close(unsigned char) at sfx2/source/doc/sfxbasemodel.cxx:1487:76 > #19 in SfxBaseModel::dispose() at sfx2/source/doc/sfxbasemodel.cxx:725:13 > #20 in gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*) at bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:77:5 > #21 in cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, _typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*, void*, void**, _uno_Any**) at bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:233:13 > #22 in unoInterfaceProxyDispatch at bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:413:13 > #23 in binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::__debug::vector<binaryurp::BinaryAny, std::allocator<binaryurp::BinaryAny>>*) const at binaryurp/source/incomingrequest.cxx:236:13 > #24 in binaryurp::IncomingRequest::execute() const at binaryurp/source/incomingrequest.cxx:79:26 > #25 in request at binaryurp/source/reader.cxx:86:9 > #26 in cppu_threadpool::JobQueue::enter(void const*, bool) at cppu/source/threadpool/jobqueue.cxx:100:17 > #27 in cppu_threadpool::ORequestThread::run() at cppu/source/threadpool/thread.cxx:165:31 > #28 in threadFunc at include/osl/thread.hxx:189:15 > #29 in osl_thread_start_Impl(void*) at sal/osl/unx/thread.cxx:265:9 where the ModulWindow apparently happens to get deleted by the UNO worker thread in the window of time when ModuleWindow::IsPasteAllowed temporarily dropped the SolarMutex on the main thread. Temporarily dropping the SolarMutex around the xClipboard->getContents() call had been there ever since the code got introduced in c29c7a8 "#92173# Reimplement Basic password protection UI in Basic IDE", and at least theoretically it is of course the right thing to do to not call that UNO API with the SolarMutex locked. But it is of course also not a good idea to use SolarMutexReleaser, and that xClipboard->getContents() call doesn't look like it leads to deadlock. Change-Id: I3660065508d37801125f675440071d61e41906d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146650 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]>
sporadically reproducible with tsan and ./instdir/program/soffice.bin --headless --convert-to pdf ~/forum-mso-en4-802501.xlsx move getTables().applyAutoFilters(), which wants to query tab 1 while tab 1 is still getting imported, until after the threaded import has completed. This call was moved before in: commit edd51b8 Date: Thu Aug 15 16:23:46 2013 +0100 fix for bnc#834705 missing drop downs for autofilter ================== WARNING: ThreadSanitizer: data race (pid=3791886) Read of size 8 at 0x7b5000040f20 by thread T7 (mutexes: write M0, write M1): #0 __gnu_cxx::__normal_iterator<unsigned long const*, std::vector<unsigned long, std::allocator<unsigned long>>>::__normal_iterator(unsigned long const* const&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_iterator.h:1073:20 (libsclo.so+0x3d31c4) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #1 std::vector<unsigned long, std::allocator<unsigned long>>::cend() const /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_vector.h:960:16 (libsclo.so+0x3d31c4) #2 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::cbegin() const core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3771:34 (libsclo.so+0x3d31c4) #3 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::begin() const core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3753:12 (libsclo.so+0x3d31c4) #4 ScColumn::InitBlockPosition(sc::ColumnBlockConstPosition&) const core/sc/source/core/data/column3.cxx:1135:35 (libsclo.so+0x3d31c4) #5 ScTable::GetDataArea(short&, int&, short&, int&, bool, bool) const core/sc/source/core/data/table1.cxx:908:19 (libsclo.so+0x637b39) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #6 ScDocument::GetDataArea(short, short&, int&, short&, int&, bool, bool) const core/sc/source/core/data/document.cxx:1104:23 (libsclo.so+0x49b696) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #7 ScDBData::ExtendDataArea(ScDocument const&) core/sc/source/core/tool/dbdata.cxx:654:10 (libsclo.so+0x741e77) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #8 ScDocument::GetFilterEntries(short, int, short, ScFilterEntries&) core/sc/source/core/data/documen3.cxx:1577:14 (libsclo.so+0x46e7a6) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #9 (anonymous namespace)::fillQueryParam(ScQueryParam&, ScDocument*, com::sun::star::uno::Sequence<com::sun::star::sheet::TableFilterField3> const&) core/sc/source/ui/unoobj/datauno.cxx:1164:27 (libsclo.so+0xf7dd72) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #10 ScFilterDescriptorBase::setFilterFields3(com::sun::star::uno::Sequence<com::sun::star::sheet::TableFilterField3> const&) core/sc/source/ui/unoobj/datauno.cxx:1380:5 (libsclo.so+0xf7dd72) #11 non-virtual thunk to ScFilterDescriptorBase::setFilterFields3(com::sun::star::uno::Sequence<com::sun::star::sheet::TableFilterField3> const&) core/sc/source/ui/unoobj/datauno.cxx (libsclo.so+0xf7e2c2) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #12 oox::xls::AutoFilter::finalizeImport(com::sun::star::uno::Reference<com::sun::star::sheet::XDatabaseRange> const&, short) core/sc/source/filter/oox/autofilterbuffer.cxx:803:22 (libscfiltlo.so+0x3cca2c) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #13 oox::xls::AutoFilterBuffer::finalizeImport(com::sun::star::uno::Reference<com::sun::star::sheet::XDatabaseRange> const&, short) core/sc/source/filter/oox/autofilterbuffer.cxx:950:22 (libscfiltlo.so+0x3cdc0b) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #14 oox::xls::Table::applyAutoFilters() core/sc/source/filter/oox/tablebuffer.cxx:143:23 (libscfiltlo.so+0x4b9268) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #15 void std::__invoke_impl<void, void (oox::xls::Table::*&)(), oox::xls::Table&>(std::__invoke_memfun_ref, void (oox::xls::Table::*&)(), oox::xls::Table&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/invoke.h:67:14 (libscfiltlo.so+0x4b9d96) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #16 std::__invoke_result<void (oox::xls::Table::*&)(), oox::xls::Table&>::type std::__invoke<void (oox::xls::Table::*&)(), oox::xls::Table&>(void (oox::xls::Table::*&)(), oox::xls::Table&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/invoke.h:96:14 (libscfiltlo.so+0x4b9d96) #17 void std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>::__call<void, oox::xls::Table&, 0ul>(std::tuple<oox::xls::Table&>&&, std::_Index_tuple<0ul>) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/functional:495:11 (libscfiltlo.so+0x4b9d96) #18 void std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>::operator()<oox::xls::Table&, void>(oox::xls::Table&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/functional:580:17 (libscfiltlo.so+0x4b9d96) #19 oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>::operator()(std::pair<int const, std::shared_ptr<oox::xls::Table>> const&) core/include/oox/helper/refmap.hxx:122:89 (libscfiltlo.so+0x4b9d96) #20 oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>> std::for_each<std::_Rb_tree_const_iterator<std::pair<int const, std::shared_ptr<oox::xls::Table>>>, oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>>(std::_Rb_tree_const_iterator<std::pair<int const, std::shared_ptr<oox::xls::Table>>>, std::_Rb_tree_const_iterator<std::pair<int const, std::shared_ptr<oox::xls::Table>>>, oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algo.h:3787:2 (libscfiltlo.so+0x4b9d96) #21 void oox::RefMap<int, oox::xls::Table, std::less<int>>::forEach<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>(std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()> const&) const core/include/oox/helper/refmap.hxx:71:29 (libscfiltlo.so+0x4b9d96) #22 void oox::RefMap<int, oox::xls::Table, std::less<int>>::forEachMem<void (oox::xls::Table::*)()>(void (oox::xls::Table::*)()) const core/include/oox/helper/refmap.hxx:79:29 (libscfiltlo.so+0x4b9d96) #23 oox::xls::TableBuffer::applyAutoFilters() core/sc/source/filter/oox/tablebuffer.cxx:179:16 (libscfiltlo.so+0x4b9d96) #24 oox::xls::WorksheetGlobals::finalizeWorksheetImport() core/sc/source/filter/oox/worksheethelper.cxx:943:17 (libscfiltlo.so+0x4ee58e) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #25 oox::xls::WorksheetHelper::finalizeWorksheetImport() core/sc/source/filter/oox/worksheethelper.cxx:1625:17 (libscfiltlo.so+0x4f2cff) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #26 oox::xls::WorksheetFragment::finalizeImport() core/sc/source/filter/oox/worksheetfragment.cxx:632:5 (libscfiltlo.so+0x4e91cc) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #27 oox::core::FragmentHandler2::endDocument() core/oox/source/core/fragmenthandler2.cxx:53:5 (libooxlo.so+0x1c20d9) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #28 non-virtual thunk to oox::core::FragmentHandler2::endDocument() core/oox/source/core/fragmenthandler2.cxx (libooxlo.so+0x1c20d9) #29 sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:910:36 (libexpwraplo.so+0x2a06a) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4) #30 sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:1482:13 (libexpwraplo.so+0x31738) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4) #31 oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) core/oox/source/core/fastparser.cxx:121:15 (libooxlo.so+0x1ae980) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #32 oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) core/oox/source/core/fastparser.cxx:129:5 (libooxlo.so+0x1aebdf) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #33 oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/oox/source/core/xmlfilterbase.cxx:412:21 (libooxlo.so+0x1d01ac) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #34 oox::xls::WorkbookHelper::importOoxFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/sc/source/filter/oox/workbookhelper.cxx:1024:27 (libscfiltlo.so+0x4dbbd2) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #35 oox::xls::(anonymous namespace)::WorkerThread::doWork() core/sc/source/filter/oox/workbookfragment.cxx:249:27 (libscfiltlo.so+0x4d3347) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #36 comphelper::ThreadTask::exec() core/comphelper/source/misc/threadpool.cxx:319:9 (libcomphelper.so+0x17dbc1) (BuildId: 30a9bf106ea764f860a55d99b75dd87a0f268335) #37 comphelper::ThreadPool::ThreadWorker::execute() core/comphelper/source/misc/threadpool.cxx:85:24 (libcomphelper.so+0x17dbc1) #38 salhelper::Thread::run() core/salhelper/source/thread.cxx:39:5 (libuno_salhelpergcc3.so.3+0x5267) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6) #39 non-virtual thunk to salhelper::Thread::run() core/salhelper/source/thread.cxx (libuno_salhelpergcc3.so.3+0x5267) #40 threadFunc core/include/osl/thread.hxx:189:15 (libuno_salhelpergcc3.so.3+0x551e) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6) #41 osl_thread_start_Impl(void*) core/sal/osl/unx/thread.cxx:265:9 (libuno_sal.so.3+0x6a9d5) (BuildId: 767a6cd7c58bf820064a10cf0ab0f15b30c2f4ac) Previous write of size 8 at 0x7b5000040f20 by thread T6 (mutexes: write M2): #0 std::vector<unsigned long, std::allocator<unsigned long>>::_M_fill_insert(__gnu_cxx::__normal_iterator<unsigned long*, std::vector<unsigned long, std::allocator<unsigned long>>>, unsigned long, unsigned long const&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/vector.tcc:556:29 (libsclo.so+0x2f6766) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #1 std::vector<unsigned long, std::allocator<unsigned long>>::insert(__gnu_cxx::__normal_iterator<unsigned long const*, std::vector<unsigned long, std::allocator<unsigned long>>>, unsigned long, unsigned long const&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_vector.h:1435:2 (libsclo.so+0x2ffd3a) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #2 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::blocks_type::insert(unsigned long, unsigned long) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:99:15 (libsclo.so+0x2ffd3a) #3 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_new_block_to_middle(unsigned long, unsigned long, unsigned long, bool) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:4326:19 (libsclo.so+0x2ffd3a) #4 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_cell_to_middle_of_block<double>(unsigned long, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3999:19 (libsclo.so+0x3259fe) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #5 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_cell_to_empty_block<double>(unsigned long, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3313:12 (libsclo.so+0x3259fe) #6 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_impl<double>(unsigned long, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:1260:16 (libsclo.so+0x32492f) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #7 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set<double>(mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> const&, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:754:20 (libsclo.so+0x4cc138) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #8 ScDocumentImport::setNumericCell(ScAddress const&, double) core/sc/source/core/data/documentimport.cxx:259:35 (libsclo.so+0x4cc138) #9 oox::xls::SheetDataBuffer::setValueCell(oox::xls::CellModel const&, double) core/sc/source/filter/oox/sheetdatabuffer.cxx:107:20 (libscfiltlo.so+0x4833c0) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #10 oox::xls::SheetDataContext::onEndElement() core/sc/source/filter/oox/sheetdatacontext.cxx:185:25 (libscfiltlo.so+0x48fed2) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #11 non-virtual thunk to oox::xls::SheetDataContext::onEndElement() core/sc/source/filter/oox/sheetdatacontext.cxx (libscfiltlo.so+0x48fff9) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #12 oox::core::ContextHandler2Helper::implEndElement(int) core/oox/source/core/contexthandler2.cxx:125:9 (libooxlo.so+0x1ac82b) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #13 oox::core::ContextHandler2::endFastElement(int) core/oox/source/core/contexthandler2.cxx:220:5 (libooxlo.so+0x1ac82b) #14 non-virtual thunk to oox::core::ContextHandler2::endFastElement(int) core/oox/source/core/contexthandler2.cxx (libooxlo.so+0x1ac82b) #15 (anonymous namespace)::Entity::endElement() core/sax/source/fastparser/fastparser.cxx:515:27 (libexpwraplo.so+0x3042f) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4) #16 sax_fastparser::FastSaxParserImpl::consume((anonymous namespace)::EventList&) core/sax/source/fastparser/fastparser.cxx:1029:25 (libexpwraplo.so+0x29d37) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4) #17 sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:869:22 (libexpwraplo.so+0x29d37) #18 sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:1482:13 (libexpwraplo.so+0x31738) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4) #19 oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) core/oox/source/core/fastparser.cxx:121:15 (libooxlo.so+0x1ae980) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #20 oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) core/oox/source/core/fastparser.cxx:129:5 (libooxlo.so+0x1aebdf) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #21 oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/oox/source/core/xmlfilterbase.cxx:412:21 (libooxlo.so+0x1d01ac) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #22 oox::xls::WorkbookHelper::importOoxFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/sc/source/filter/oox/workbookhelper.cxx:1024:27 (libscfiltlo.so+0x4dbbd2) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #23 oox::xls::(anonymous namespace)::WorkerThread::doWork() core/sc/source/filter/oox/workbookfragment.cxx:249:27 (libscfiltlo.so+0x4d3347) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #24 comphelper::ThreadTask::exec() core/comphelper/source/misc/threadpool.cxx:319:9 (libcomphelper.so+0x17dbc1) (BuildId: 30a9bf106ea764f860a55d99b75dd87a0f268335) #25 comphelper::ThreadPool::ThreadWorker::execute() core/comphelper/source/misc/threadpool.cxx:85:24 (libcomphelper.so+0x17dbc1) #26 salhelper::Thread::run() core/salhelper/source/thread.cxx:39:5 (libuno_salhelpergcc3.so.3+0x5267) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6) #27 non-virtual thunk to salhelper::Thread::run() core/salhelper/source/thread.cxx (libuno_salhelpergcc3.so.3+0x5267) #28 threadFunc core/include/osl/thread.hxx:189:15 (libuno_salhelpergcc3.so.3+0x551e) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6) #29 osl_thread_start_Impl(void*) core/sal/osl/unx/thread.cxx:265:9 (libuno_sal.so.3+0x6a9d5) (BuildId: 767a6cd7c58bf820064a10cf0ab0f15b30c2f4ac) Change-Id: I7542432749fded8ab5e35f79cb221ad712f7802d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146430 Tested-by: Jenkins Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> (cherry picked from commit 6652768) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146531 Reviewed-by: Xisco Fauli <[email protected]>
sporadically reproducible with tsan and ./instdir/program/soffice.bin --headless --convert-to pdf ~/forum-mso-en4-802501.xlsx move getTables().applyAutoFilters(), which wants to query tab 1 while tab 1 is still getting imported, until after the threaded import has completed. This call was moved before in: commit edd51b8 Date: Thu Aug 15 16:23:46 2013 +0100 fix for bnc#834705 missing drop downs for autofilter ================== WARNING: ThreadSanitizer: data race (pid=3791886) Read of size 8 at 0x7b5000040f20 by thread T7 (mutexes: write M0, write M1): #0 __gnu_cxx::__normal_iterator<unsigned long const*, std::vector<unsigned long, std::allocator<unsigned long>>>::__normal_iterator(unsigned long const* const&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_iterator.h:1073:20 (libsclo.so+0x3d31c4) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #1 std::vector<unsigned long, std::allocator<unsigned long>>::cend() const /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_vector.h:960:16 (libsclo.so+0x3d31c4) #2 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::cbegin() const core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3771:34 (libsclo.so+0x3d31c4) #3 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::begin() const core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3753:12 (libsclo.so+0x3d31c4) #4 ScColumn::InitBlockPosition(sc::ColumnBlockConstPosition&) const core/sc/source/core/data/column3.cxx:1135:35 (libsclo.so+0x3d31c4) #5 ScTable::GetDataArea(short&, int&, short&, int&, bool, bool) const core/sc/source/core/data/table1.cxx:908:19 (libsclo.so+0x637b39) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #6 ScDocument::GetDataArea(short, short&, int&, short&, int&, bool, bool) const core/sc/source/core/data/document.cxx:1104:23 (libsclo.so+0x49b696) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #7 ScDBData::ExtendDataArea(ScDocument const&) core/sc/source/core/tool/dbdata.cxx:654:10 (libsclo.so+0x741e77) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #8 ScDocument::GetFilterEntries(short, int, short, ScFilterEntries&) core/sc/source/core/data/documen3.cxx:1577:14 (libsclo.so+0x46e7a6) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #9 (anonymous namespace)::fillQueryParam(ScQueryParam&, ScDocument*, com::sun::star::uno::Sequence<com::sun::star::sheet::TableFilterField3> const&) core/sc/source/ui/unoobj/datauno.cxx:1164:27 (libsclo.so+0xf7dd72) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #10 ScFilterDescriptorBase::setFilterFields3(com::sun::star::uno::Sequence<com::sun::star::sheet::TableFilterField3> const&) core/sc/source/ui/unoobj/datauno.cxx:1380:5 (libsclo.so+0xf7dd72) #11 non-virtual thunk to ScFilterDescriptorBase::setFilterFields3(com::sun::star::uno::Sequence<com::sun::star::sheet::TableFilterField3> const&) core/sc/source/ui/unoobj/datauno.cxx (libsclo.so+0xf7e2c2) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #12 oox::xls::AutoFilter::finalizeImport(com::sun::star::uno::Reference<com::sun::star::sheet::XDatabaseRange> const&, short) core/sc/source/filter/oox/autofilterbuffer.cxx:803:22 (libscfiltlo.so+0x3cca2c) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #13 oox::xls::AutoFilterBuffer::finalizeImport(com::sun::star::uno::Reference<com::sun::star::sheet::XDatabaseRange> const&, short) core/sc/source/filter/oox/autofilterbuffer.cxx:950:22 (libscfiltlo.so+0x3cdc0b) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #14 oox::xls::Table::applyAutoFilters() core/sc/source/filter/oox/tablebuffer.cxx:143:23 (libscfiltlo.so+0x4b9268) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #15 void std::__invoke_impl<void, void (oox::xls::Table::*&)(), oox::xls::Table&>(std::__invoke_memfun_ref, void (oox::xls::Table::*&)(), oox::xls::Table&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/invoke.h:67:14 (libscfiltlo.so+0x4b9d96) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #16 std::__invoke_result<void (oox::xls::Table::*&)(), oox::xls::Table&>::type std::__invoke<void (oox::xls::Table::*&)(), oox::xls::Table&>(void (oox::xls::Table::*&)(), oox::xls::Table&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/invoke.h:96:14 (libscfiltlo.so+0x4b9d96) #17 void std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>::__call<void, oox::xls::Table&, 0ul>(std::tuple<oox::xls::Table&>&&, std::_Index_tuple<0ul>) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/functional:495:11 (libscfiltlo.so+0x4b9d96) #18 void std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>::operator()<oox::xls::Table&, void>(oox::xls::Table&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/functional:580:17 (libscfiltlo.so+0x4b9d96) #19 oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>::operator()(std::pair<int const, std::shared_ptr<oox::xls::Table>> const&) core/include/oox/helper/refmap.hxx:122:89 (libscfiltlo.so+0x4b9d96) #20 oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>> std::for_each<std::_Rb_tree_const_iterator<std::pair<int const, std::shared_ptr<oox::xls::Table>>>, oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>>(std::_Rb_tree_const_iterator<std::pair<int const, std::shared_ptr<oox::xls::Table>>>, std::_Rb_tree_const_iterator<std::pair<int const, std::shared_ptr<oox::xls::Table>>>, oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algo.h:3787:2 (libscfiltlo.so+0x4b9d96) #21 void oox::RefMap<int, oox::xls::Table, std::less<int>>::forEach<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>(std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()> const&) const core/include/oox/helper/refmap.hxx:71:29 (libscfiltlo.so+0x4b9d96) #22 void oox::RefMap<int, oox::xls::Table, std::less<int>>::forEachMem<void (oox::xls::Table::*)()>(void (oox::xls::Table::*)()) const core/include/oox/helper/refmap.hxx:79:29 (libscfiltlo.so+0x4b9d96) #23 oox::xls::TableBuffer::applyAutoFilters() core/sc/source/filter/oox/tablebuffer.cxx:179:16 (libscfiltlo.so+0x4b9d96) #24 oox::xls::WorksheetGlobals::finalizeWorksheetImport() core/sc/source/filter/oox/worksheethelper.cxx:943:17 (libscfiltlo.so+0x4ee58e) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #25 oox::xls::WorksheetHelper::finalizeWorksheetImport() core/sc/source/filter/oox/worksheethelper.cxx:1625:17 (libscfiltlo.so+0x4f2cff) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #26 oox::xls::WorksheetFragment::finalizeImport() core/sc/source/filter/oox/worksheetfragment.cxx:632:5 (libscfiltlo.so+0x4e91cc) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #27 oox::core::FragmentHandler2::endDocument() core/oox/source/core/fragmenthandler2.cxx:53:5 (libooxlo.so+0x1c20d9) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #28 non-virtual thunk to oox::core::FragmentHandler2::endDocument() core/oox/source/core/fragmenthandler2.cxx (libooxlo.so+0x1c20d9) #29 sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:910:36 (libexpwraplo.so+0x2a06a) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4) #30 sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:1482:13 (libexpwraplo.so+0x31738) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4) #31 oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) core/oox/source/core/fastparser.cxx:121:15 (libooxlo.so+0x1ae980) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #32 oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) core/oox/source/core/fastparser.cxx:129:5 (libooxlo.so+0x1aebdf) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #33 oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/oox/source/core/xmlfilterbase.cxx:412:21 (libooxlo.so+0x1d01ac) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #34 oox::xls::WorkbookHelper::importOoxFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/sc/source/filter/oox/workbookhelper.cxx:1024:27 (libscfiltlo.so+0x4dbbd2) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #35 oox::xls::(anonymous namespace)::WorkerThread::doWork() core/sc/source/filter/oox/workbookfragment.cxx:249:27 (libscfiltlo.so+0x4d3347) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #36 comphelper::ThreadTask::exec() core/comphelper/source/misc/threadpool.cxx:319:9 (libcomphelper.so+0x17dbc1) (BuildId: 30a9bf106ea764f860a55d99b75dd87a0f268335) #37 comphelper::ThreadPool::ThreadWorker::execute() core/comphelper/source/misc/threadpool.cxx:85:24 (libcomphelper.so+0x17dbc1) #38 salhelper::Thread::run() core/salhelper/source/thread.cxx:39:5 (libuno_salhelpergcc3.so.3+0x5267) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6) #39 non-virtual thunk to salhelper::Thread::run() core/salhelper/source/thread.cxx (libuno_salhelpergcc3.so.3+0x5267) #40 threadFunc core/include/osl/thread.hxx:189:15 (libuno_salhelpergcc3.so.3+0x551e) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6) #41 osl_thread_start_Impl(void*) core/sal/osl/unx/thread.cxx:265:9 (libuno_sal.so.3+0x6a9d5) (BuildId: 767a6cd7c58bf820064a10cf0ab0f15b30c2f4ac) Previous write of size 8 at 0x7b5000040f20 by thread T6 (mutexes: write M2): #0 std::vector<unsigned long, std::allocator<unsigned long>>::_M_fill_insert(__gnu_cxx::__normal_iterator<unsigned long*, std::vector<unsigned long, std::allocator<unsigned long>>>, unsigned long, unsigned long const&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/vector.tcc:556:29 (libsclo.so+0x2f6766) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #1 std::vector<unsigned long, std::allocator<unsigned long>>::insert(__gnu_cxx::__normal_iterator<unsigned long const*, std::vector<unsigned long, std::allocator<unsigned long>>>, unsigned long, unsigned long const&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_vector.h:1435:2 (libsclo.so+0x2ffd3a) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #2 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::blocks_type::insert(unsigned long, unsigned long) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:99:15 (libsclo.so+0x2ffd3a) #3 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_new_block_to_middle(unsigned long, unsigned long, unsigned long, bool) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:4326:19 (libsclo.so+0x2ffd3a) #4 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_cell_to_middle_of_block<double>(unsigned long, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3999:19 (libsclo.so+0x3259fe) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #5 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_cell_to_empty_block<double>(unsigned long, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3313:12 (libsclo.so+0x3259fe) #6 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_impl<double>(unsigned long, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:1260:16 (libsclo.so+0x32492f) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #7 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set<double>(mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> const&, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:754:20 (libsclo.so+0x4cc138) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #8 ScDocumentImport::setNumericCell(ScAddress const&, double) core/sc/source/core/data/documentimport.cxx:259:35 (libsclo.so+0x4cc138) #9 oox::xls::SheetDataBuffer::setValueCell(oox::xls::CellModel const&, double) core/sc/source/filter/oox/sheetdatabuffer.cxx:107:20 (libscfiltlo.so+0x4833c0) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #10 oox::xls::SheetDataContext::onEndElement() core/sc/source/filter/oox/sheetdatacontext.cxx:185:25 (libscfiltlo.so+0x48fed2) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #11 non-virtual thunk to oox::xls::SheetDataContext::onEndElement() core/sc/source/filter/oox/sheetdatacontext.cxx (libscfiltlo.so+0x48fff9) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #12 oox::core::ContextHandler2Helper::implEndElement(int) core/oox/source/core/contexthandler2.cxx:125:9 (libooxlo.so+0x1ac82b) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #13 oox::core::ContextHandler2::endFastElement(int) core/oox/source/core/contexthandler2.cxx:220:5 (libooxlo.so+0x1ac82b) #14 non-virtual thunk to oox::core::ContextHandler2::endFastElement(int) core/oox/source/core/contexthandler2.cxx (libooxlo.so+0x1ac82b) #15 (anonymous namespace)::Entity::endElement() core/sax/source/fastparser/fastparser.cxx:515:27 (libexpwraplo.so+0x3042f) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4) #16 sax_fastparser::FastSaxParserImpl::consume((anonymous namespace)::EventList&) core/sax/source/fastparser/fastparser.cxx:1029:25 (libexpwraplo.so+0x29d37) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4) #17 sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:869:22 (libexpwraplo.so+0x29d37) #18 sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:1482:13 (libexpwraplo.so+0x31738) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4) #19 oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) core/oox/source/core/fastparser.cxx:121:15 (libooxlo.so+0x1ae980) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #20 oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) core/oox/source/core/fastparser.cxx:129:5 (libooxlo.so+0x1aebdf) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #21 oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/oox/source/core/xmlfilterbase.cxx:412:21 (libooxlo.so+0x1d01ac) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #22 oox::xls::WorkbookHelper::importOoxFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/sc/source/filter/oox/workbookhelper.cxx:1024:27 (libscfiltlo.so+0x4dbbd2) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #23 oox::xls::(anonymous namespace)::WorkerThread::doWork() core/sc/source/filter/oox/workbookfragment.cxx:249:27 (libscfiltlo.so+0x4d3347) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #24 comphelper::ThreadTask::exec() core/comphelper/source/misc/threadpool.cxx:319:9 (libcomphelper.so+0x17dbc1) (BuildId: 30a9bf106ea764f860a55d99b75dd87a0f268335) #25 comphelper::ThreadPool::ThreadWorker::execute() core/comphelper/source/misc/threadpool.cxx:85:24 (libcomphelper.so+0x17dbc1) #26 salhelper::Thread::run() core/salhelper/source/thread.cxx:39:5 (libuno_salhelpergcc3.so.3+0x5267) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6) #27 non-virtual thunk to salhelper::Thread::run() core/salhelper/source/thread.cxx (libuno_salhelpergcc3.so.3+0x5267) #28 threadFunc core/include/osl/thread.hxx:189:15 (libuno_salhelpergcc3.so.3+0x551e) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6) #29 osl_thread_start_Impl(void*) core/sal/osl/unx/thread.cxx:265:9 (libuno_sal.so.3+0x6a9d5) (BuildId: 767a6cd7c58bf820064a10cf0ab0f15b30c2f4ac) Change-Id: I7542432749fded8ab5e35f79cb221ad712f7802d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146430 Tested-by: Jenkins Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> (cherry picked from commit 6652768) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146531 Reviewed-by: Xisco Fauli <[email protected]>
...as happens during CppunitTest_sc_logical_functions_test (see below), by not relying on wrap-around of nStackBase = sp - pCur->GetParamCount(); during underflow. (Though I have no idea whether the excited "underflow?!?" comment means that underflow is indeed expected and harmless, or rather indicates a severe problem elsewhere; at least, it does happen during CppunitTest_sc_logical_functions_test as shown below). > sc/source/core/tool/interpr4.cxx:3965:34: runtime error: implicit conversion from type 'int' of value -2 (32-bit, signed) to type 'sal_uInt16' (aka 'unsigned short') changed the value to 65534 (16-bit, unsigned) > #0 in ScInterpreter::Interpret() at sc/source/core/tool/interpr4.cxx:3965:34 (instdir/program/libsclo.so +0xab8f35e) > #1 in ScFormulaCell::InterpretTail(ScInterpreterContext&, ScFormulaCell::ScInterpretTailParameter) at sc/source/core/data/formulacell.cxx:1866:23 (instdir/program/libsclo.so +0x9bce713) > #2 in ScFormulaCell::Interpret() at sc/source/core/data/formulacell.cxx:1577:13 (instdir/program/libsclo.so +0x9bc4611) > #3 in ScFormulaCell::MaybeInterpret() at sc/source/core/data/formulacell.cxx:2673:9 (instdir/program/libsclo.so +0x9bb04f0) > #4 in ScFormulaCell::GetErrCode() at sc/source/core/data/formulacell.cxx:2912:5 (instdir/program/libsclo.so +0x9beab05) > #5 in ScCellFormat::GetString(ScRefCellValue&, unsigned int, rtl::OUString&, Color**, SvNumberFormatter&, ScDocument const*, bool, bool, bool) at sc/source/core/tool/cellform.cxx:79:59 (instdir/program/libsclo.so +0xa42272b) > #6 in ScColumn::UpdateScriptType(sc::CellTextAttr&, int, mdds::detail::mtv::iterator_base<mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell> >, sc::CellStoreEvent>::iterator_trait, mdds::detail::mtv::private_data_forward_update<mdds::detail::mtv::iterator_value_node<unsigned long, mdds::mtv::base_element_block> > >&) at sc/source/core/data/column3.cxx:534:5 (instdir/program/libsclo.so +0x8b81f94) > #7 in ScColumn::GetRangeScriptType(mdds::detail::mtv::iterator_base<mdds::multi_type_vector<mdds::mtv::custom_block_func1<mdds::mtv::default_element_block<51, sc::CellTextAttr> >, mdds::detail::mtv::event_func>::iterator_trait, mdds::detail::mtv::private_data_forward_update<mdds::detail::mtv::iterator_value_node<unsigned long, mdds::mtv::base_element_block> > >&, int, int, mdds::detail::mtv::iterator_base<mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell> >, sc::CellStoreEvent>::iterator_trait, mdds::detail::mtv::private_data_forward_update<mdds::detail::mtv::iterator_value_node<unsigned long, mdds::mtv::base_element_block> > > const&) at sc/source/core/data/column2.cxx:2010:17 (instdir/program/libsclo.so +0x8aa4973) > #8 in (anonymous namespace)::FindEditCellsHandler::operator()(unsigned long, ScFormulaCell const*) at sc/source/core/data/column.cxx:3036:46 (instdir/program/libsclo.so +0x8873d9b) > #9 in std::pair<mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell> >, sc::CellStoreEvent>::const_iterator, unsigned long> sc::CheckElem<mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>, mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell> >, sc::CellStoreEvent>, (anonymous namespace)::FindEditCellsHandler>(mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell> >, sc::CellStoreEvent> const&, mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell> >, sc::CellStoreEvent>::const_iterator const&, unsigned long, unsigned long, (anonymous namespace)::FindEditCellsHandler&) at sc/inc/mtvfunctions.hxx:139:13 (instdir/program/libsclo.so +0x8872c89) > #10 in std::pair<mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell> >, sc::CellStoreEvent>::const_iterator, mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell> >, sc::CellStoreEvent>::size_type> sc::FindElement2<mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell> >, sc::CellStoreEvent>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>, (anonymous namespace)::FindEditCellsHandler, (anonymous namespace)::FindEditCellsHandler>(mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell> >, sc::CellStoreEvent> const&, mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell> >, sc::CellStoreEvent>::size_type, mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell> >, sc::CellStoreEvent>::size_type, (anonymous namespace)::FindEditCellsHandler&, (anonymous namespace)::FindEditCellsHandler&) at sc/inc/mtvfunctions.hxx:464:37 (instdir/program/libsclo.so +0x88710f5) > #11 in std::pair<mdds::detail::mtv::const_iterator_base<mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell> >, sc::CellStoreEvent>::const_iterator_trait, mdds::detail::mtv::private_data_forward_update<mdds::detail::mtv::iterator_value_node<unsigned long, mdds::mtv::base_element_block> >, mdds::detail::mtv::iterator_base<mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell> >, sc::CellStoreEvent>::iterator_trait, mdds::detail::mtv::private_data_forward_update<mdds::detail::mtv::iterator_value_node<unsigned long, mdds::mtv::base_element_block> > > >, unsigned long> sc::FindFormulaEditText<(anonymous namespace)::FindEditCellsHandler>(mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell> >, sc::CellStoreEvent> const&, int, int, (anonymous namespace)::FindEditCellsHandler&) at sc/inc/mtvcellfunc.hxx:139:12 (instdir/program/libsclo.so +0x8827df0) > #12 in ScColumn::HasEditCells(int, int, int&) at sc/source/core/data/column.cxx:3510:9 (instdir/program/libsclo.so +0x88275b3) > #13 in ScColumn::GetOptimalHeight(sc::RowHeightContext&, int, int, unsigned short, int) at sc/source/core/data/column2.cxx:823:38 (instdir/program/libsclo.so +0x8aa0056) > #14 in (anonymous namespace)::GetOptimalHeightsInColumn(sc::RowHeightContext&, ScColContainer&, int, int, ScProgress*, unsigned long) at sc/source/core/data/table1.cxx:115:20 (instdir/program/libsclo.so +0x9fb52dd) > #15 in ScTable::SetOptimalHeight(sc::RowHeightContext&, int, int, ScProgress*, unsigned long) at sc/source/core/data/table1.cxx:474:5 (instdir/program/libsclo.so +0x9fb4073) > #16 in ScDocRowHeightUpdater::update() at sc/source/core/data/dociter.cxx:2576:33 (instdir/program/libsclo.so +0x8f17a78) > #17 in ScXMLImport::endDocument() at sc/source/filter/xml/xmlimprt.cxx:1806:22 (instdir/program/libsclo.so +0xbd59796) > #18 in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) at sax/source/fastparser/fastparser.cxx:876:36 (instdir/program/libexpwraplo.so +0x237ebc) > #19 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) at sax/source/fastparser/fastparser.cxx:1377:13 (instdir/program/libexpwraplo.so +0x2528ab) > #20 in SvXMLImport::parseStream(com::sun::star::xml::sax::InputSource const&) at xmloff/source/core/xmlimp.cxx:484:15 (instdir/program/libxolo.so +0x261ef9d) > #21 in filter::odfflatxml::OdfFlatXml::importer(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::xml::sax::XDocumentHandler> const&, com::sun::star::uno::Sequence<rtl::OUString> const&) at filter/source/odfflatxml/OdfFlatXml.cxx:151:26 (instdir/program/libodfflatxmllo.so +0x218fa) > #22 in XmlFilterAdaptor::importImpl(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx:180:26 (instdir/program/libxmlfalo.so +0x3ee1f) > #23 in XmlFilterAdaptor::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx:316:67 (instdir/program/libxmlfalo.so +0x44f0a) > #24 in SfxObjectShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) at sfx2/source/doc/objstor.cxx:2251:34 (instdir/program/libsfxlo.so +0x38d597f) > #25 in SfxObjectShell::DoLoad(SfxMedium*) at sfx2/source/doc/objstor.cxx:772:23 (instdir/program/libsfxlo.so +0x389eaf9) > #26 in ScBootstrapFixture::load(bool, rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned long, rtl::OUString const*) at sc/qa/unit/helper/qahelper.cxx:582:21 (workdir/LinkTarget/CppunitTest/../Library/libscqahelper.so +0x869b5) > #27 in ScBootstrapFixture::load(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned long, rtl::OUString const*) at sc/qa/unit/helper/qahelper.cxx:597:12 (workdir/LinkTarget/CppunitTest/../Library/libscqahelper.so +0x86fa6) > #28 in FunctionsTest::load(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) at sc/qa/unit/functions_test.cxx:35:51 (workdir/LinkTarget/CppunitTest/../Library/libscqahelper.so +0xe4e95) > #29 in non-virtual thunk to FunctionsTest::load(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) at sc/qa/unit/functions_test.cxx (workdir/LinkTarget/CppunitTest/../Library/libscqahelper.so +0xe59db) > #30 in test::FiltersTest::recursiveScan(test::filterStatus, rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) at unotest/source/cpp/filters-test.cxx:130:20 (workdir/LinkTarget/CppunitTest/../Library/libunotest.so +0x7526d) > #31 in LogicalFunctionsTest::testLogicalFormulasFODS() at sc/qa/unit/functions_logical.cxx:19:5 (workdir/LinkTarget/CppunitTest/libtest_sc_logical_functions_test.so +0x1fd60) [...] Change-Id: Icccfb37c33885d72bff1003b3a8f8505850eb184 Reviewed-on: https://gerrit.libreoffice.org/63302 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]>
sporadically reproducible with tsan and ./instdir/program/soffice.bin --headless --convert-to pdf ~/forum-mso-en4-802501.xlsx move getTables().applyAutoFilters(), which wants to query tab 1 while tab 1 is still getting imported, until after the threaded import has completed. This call was moved before in: commit edd51b8 Date: Thu Aug 15 16:23:46 2013 +0100 fix for bnc#834705 missing drop downs for autofilter ================== WARNING: ThreadSanitizer: data race (pid=3791886) Read of size 8 at 0x7b5000040f20 by thread T7 (mutexes: write M0, write M1): #0 __gnu_cxx::__normal_iterator<unsigned long const*, std::vector<unsigned long, std::allocator<unsigned long>>>::__normal_iterator(unsigned long const* const&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_iterator.h:1073:20 (libsclo.so+0x3d31c4) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #1 std::vector<unsigned long, std::allocator<unsigned long>>::cend() const /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_vector.h:960:16 (libsclo.so+0x3d31c4) #2 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::cbegin() const core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3771:34 (libsclo.so+0x3d31c4) #3 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::begin() const core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3753:12 (libsclo.so+0x3d31c4) #4 ScColumn::InitBlockPosition(sc::ColumnBlockConstPosition&) const core/sc/source/core/data/column3.cxx:1135:35 (libsclo.so+0x3d31c4) #5 ScTable::GetDataArea(short&, int&, short&, int&, bool, bool) const core/sc/source/core/data/table1.cxx:908:19 (libsclo.so+0x637b39) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #6 ScDocument::GetDataArea(short, short&, int&, short&, int&, bool, bool) const core/sc/source/core/data/document.cxx:1104:23 (libsclo.so+0x49b696) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #7 ScDBData::ExtendDataArea(ScDocument const&) core/sc/source/core/tool/dbdata.cxx:654:10 (libsclo.so+0x741e77) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #8 ScDocument::GetFilterEntries(short, int, short, ScFilterEntries&) core/sc/source/core/data/documen3.cxx:1577:14 (libsclo.so+0x46e7a6) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #9 (anonymous namespace)::fillQueryParam(ScQueryParam&, ScDocument*, com::sun::star::uno::Sequence<com::sun::star::sheet::TableFilterField3> const&) core/sc/source/ui/unoobj/datauno.cxx:1164:27 (libsclo.so+0xf7dd72) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #10 ScFilterDescriptorBase::setFilterFields3(com::sun::star::uno::Sequence<com::sun::star::sheet::TableFilterField3> const&) core/sc/source/ui/unoobj/datauno.cxx:1380:5 (libsclo.so+0xf7dd72) #11 non-virtual thunk to ScFilterDescriptorBase::setFilterFields3(com::sun::star::uno::Sequence<com::sun::star::sheet::TableFilterField3> const&) core/sc/source/ui/unoobj/datauno.cxx (libsclo.so+0xf7e2c2) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #12 oox::xls::AutoFilter::finalizeImport(com::sun::star::uno::Reference<com::sun::star::sheet::XDatabaseRange> const&, short) core/sc/source/filter/oox/autofilterbuffer.cxx:803:22 (libscfiltlo.so+0x3cca2c) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #13 oox::xls::AutoFilterBuffer::finalizeImport(com::sun::star::uno::Reference<com::sun::star::sheet::XDatabaseRange> const&, short) core/sc/source/filter/oox/autofilterbuffer.cxx:950:22 (libscfiltlo.so+0x3cdc0b) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #14 oox::xls::Table::applyAutoFilters() core/sc/source/filter/oox/tablebuffer.cxx:143:23 (libscfiltlo.so+0x4b9268) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #15 void std::__invoke_impl<void, void (oox::xls::Table::*&)(), oox::xls::Table&>(std::__invoke_memfun_ref, void (oox::xls::Table::*&)(), oox::xls::Table&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/invoke.h:67:14 (libscfiltlo.so+0x4b9d96) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #16 std::__invoke_result<void (oox::xls::Table::*&)(), oox::xls::Table&>::type std::__invoke<void (oox::xls::Table::*&)(), oox::xls::Table&>(void (oox::xls::Table::*&)(), oox::xls::Table&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/invoke.h:96:14 (libscfiltlo.so+0x4b9d96) #17 void std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>::__call<void, oox::xls::Table&, 0ul>(std::tuple<oox::xls::Table&>&&, std::_Index_tuple<0ul>) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/functional:495:11 (libscfiltlo.so+0x4b9d96) #18 void std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>::operator()<oox::xls::Table&, void>(oox::xls::Table&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/functional:580:17 (libscfiltlo.so+0x4b9d96) #19 oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>::operator()(std::pair<int const, std::shared_ptr<oox::xls::Table>> const&) core/include/oox/helper/refmap.hxx:122:89 (libscfiltlo.so+0x4b9d96) #20 oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>> std::for_each<std::_Rb_tree_const_iterator<std::pair<int const, std::shared_ptr<oox::xls::Table>>>, oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>>(std::_Rb_tree_const_iterator<std::pair<int const, std::shared_ptr<oox::xls::Table>>>, std::_Rb_tree_const_iterator<std::pair<int const, std::shared_ptr<oox::xls::Table>>>, oox::RefMap<int, oox::xls::Table, std::less<int>>::ForEachFunctor<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algo.h:3787:2 (libscfiltlo.so+0x4b9d96) #21 void oox::RefMap<int, oox::xls::Table, std::less<int>>::forEach<std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()>>(std::_Bind<void (oox::xls::Table::* (std::_Placeholder<1>))()> const&) const core/include/oox/helper/refmap.hxx:71:29 (libscfiltlo.so+0x4b9d96) #22 void oox::RefMap<int, oox::xls::Table, std::less<int>>::forEachMem<void (oox::xls::Table::*)()>(void (oox::xls::Table::*)()) const core/include/oox/helper/refmap.hxx:79:29 (libscfiltlo.so+0x4b9d96) #23 oox::xls::TableBuffer::applyAutoFilters() core/sc/source/filter/oox/tablebuffer.cxx:179:16 (libscfiltlo.so+0x4b9d96) #24 oox::xls::WorksheetGlobals::finalizeWorksheetImport() core/sc/source/filter/oox/worksheethelper.cxx:943:17 (libscfiltlo.so+0x4ee58e) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #25 oox::xls::WorksheetHelper::finalizeWorksheetImport() core/sc/source/filter/oox/worksheethelper.cxx:1625:17 (libscfiltlo.so+0x4f2cff) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #26 oox::xls::WorksheetFragment::finalizeImport() core/sc/source/filter/oox/worksheetfragment.cxx:632:5 (libscfiltlo.so+0x4e91cc) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #27 oox::core::FragmentHandler2::endDocument() core/oox/source/core/fragmenthandler2.cxx:53:5 (libooxlo.so+0x1c20d9) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #28 non-virtual thunk to oox::core::FragmentHandler2::endDocument() core/oox/source/core/fragmenthandler2.cxx (libooxlo.so+0x1c20d9) #29 sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:910:36 (libexpwraplo.so+0x2a06a) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4) #30 sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:1482:13 (libexpwraplo.so+0x31738) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4) #31 oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) core/oox/source/core/fastparser.cxx:121:15 (libooxlo.so+0x1ae980) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #32 oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) core/oox/source/core/fastparser.cxx:129:5 (libooxlo.so+0x1aebdf) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #33 oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/oox/source/core/xmlfilterbase.cxx:412:21 (libooxlo.so+0x1d01ac) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #34 oox::xls::WorkbookHelper::importOoxFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/sc/source/filter/oox/workbookhelper.cxx:1024:27 (libscfiltlo.so+0x4dbbd2) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #35 oox::xls::(anonymous namespace)::WorkerThread::doWork() core/sc/source/filter/oox/workbookfragment.cxx:249:27 (libscfiltlo.so+0x4d3347) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #36 comphelper::ThreadTask::exec() core/comphelper/source/misc/threadpool.cxx:319:9 (libcomphelper.so+0x17dbc1) (BuildId: 30a9bf106ea764f860a55d99b75dd87a0f268335) #37 comphelper::ThreadPool::ThreadWorker::execute() core/comphelper/source/misc/threadpool.cxx:85:24 (libcomphelper.so+0x17dbc1) #38 salhelper::Thread::run() core/salhelper/source/thread.cxx:39:5 (libuno_salhelpergcc3.so.3+0x5267) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6) #39 non-virtual thunk to salhelper::Thread::run() core/salhelper/source/thread.cxx (libuno_salhelpergcc3.so.3+0x5267) #40 threadFunc core/include/osl/thread.hxx:189:15 (libuno_salhelpergcc3.so.3+0x551e) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6) #41 osl_thread_start_Impl(void*) core/sal/osl/unx/thread.cxx:265:9 (libuno_sal.so.3+0x6a9d5) (BuildId: 767a6cd7c58bf820064a10cf0ab0f15b30c2f4ac) Previous write of size 8 at 0x7b5000040f20 by thread T6 (mutexes: write M2): #0 std::vector<unsigned long, std::allocator<unsigned long>>::_M_fill_insert(__gnu_cxx::__normal_iterator<unsigned long*, std::vector<unsigned long, std::allocator<unsigned long>>>, unsigned long, unsigned long const&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/vector.tcc:556:29 (libsclo.so+0x2f6766) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #1 std::vector<unsigned long, std::allocator<unsigned long>>::insert(__gnu_cxx::__normal_iterator<unsigned long const*, std::vector<unsigned long, std::allocator<unsigned long>>>, unsigned long, unsigned long const&) /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_vector.h:1435:2 (libsclo.so+0x2ffd3a) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #2 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::blocks_type::insert(unsigned long, unsigned long) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:99:15 (libsclo.so+0x2ffd3a) #3 mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_new_block_to_middle(unsigned long, unsigned long, unsigned long, bool) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:4326:19 (libsclo.so+0x2ffd3a) #4 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_cell_to_middle_of_block<double>(unsigned long, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3999:19 (libsclo.so+0x3259fe) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #5 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_cell_to_empty_block<double>(unsigned long, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:3313:12 (libsclo.so+0x3259fe) #6 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set_impl<double>(unsigned long, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:1260:16 (libsclo.so+0x32492f) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #7 mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::set<double>(mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell>>, sc::CellStoreTrait>::iterator_trait> const&, unsigned long, double const&) core/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:754:20 (libsclo.so+0x4cc138) (BuildId: 4582437348063bd1c461478348ce37a0dbd28def) #8 ScDocumentImport::setNumericCell(ScAddress const&, double) core/sc/source/core/data/documentimport.cxx:259:35 (libsclo.so+0x4cc138) #9 oox::xls::SheetDataBuffer::setValueCell(oox::xls::CellModel const&, double) core/sc/source/filter/oox/sheetdatabuffer.cxx:107:20 (libscfiltlo.so+0x4833c0) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #10 oox::xls::SheetDataContext::onEndElement() core/sc/source/filter/oox/sheetdatacontext.cxx:185:25 (libscfiltlo.so+0x48fed2) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #11 non-virtual thunk to oox::xls::SheetDataContext::onEndElement() core/sc/source/filter/oox/sheetdatacontext.cxx (libscfiltlo.so+0x48fff9) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #12 oox::core::ContextHandler2Helper::implEndElement(int) core/oox/source/core/contexthandler2.cxx:125:9 (libooxlo.so+0x1ac82b) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #13 oox::core::ContextHandler2::endFastElement(int) core/oox/source/core/contexthandler2.cxx:220:5 (libooxlo.so+0x1ac82b) #14 non-virtual thunk to oox::core::ContextHandler2::endFastElement(int) core/oox/source/core/contexthandler2.cxx (libooxlo.so+0x1ac82b) #15 (anonymous namespace)::Entity::endElement() core/sax/source/fastparser/fastparser.cxx:515:27 (libexpwraplo.so+0x3042f) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4) #16 sax_fastparser::FastSaxParserImpl::consume((anonymous namespace)::EventList&) core/sax/source/fastparser/fastparser.cxx:1029:25 (libexpwraplo.so+0x29d37) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4) #17 sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:869:22 (libexpwraplo.so+0x29d37) #18 sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) core/sax/source/fastparser/fastparser.cxx:1482:13 (libexpwraplo.so+0x31738) (BuildId: 4c8d8739ce3b93f891afa1e160f975a2892a4af4) #19 oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) core/oox/source/core/fastparser.cxx:121:15 (libooxlo.so+0x1ae980) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #20 oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) core/oox/source/core/fastparser.cxx:129:5 (libooxlo.so+0x1aebdf) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #21 oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/oox/source/core/xmlfilterbase.cxx:412:21 (libooxlo.so+0x1d01ac) (BuildId: eba40a8f6e1e986eafb2008b5a61a9060f9b6c0b) #22 oox::xls::WorkbookHelper::importOoxFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) core/sc/source/filter/oox/workbookhelper.cxx:1024:27 (libscfiltlo.so+0x4dbbd2) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #23 oox::xls::(anonymous namespace)::WorkerThread::doWork() core/sc/source/filter/oox/workbookfragment.cxx:249:27 (libscfiltlo.so+0x4d3347) (BuildId: 798032f9cb60957d86e47827d9e882b8931326ba) #24 comphelper::ThreadTask::exec() core/comphelper/source/misc/threadpool.cxx:319:9 (libcomphelper.so+0x17dbc1) (BuildId: 30a9bf106ea764f860a55d99b75dd87a0f268335) #25 comphelper::ThreadPool::ThreadWorker::execute() core/comphelper/source/misc/threadpool.cxx:85:24 (libcomphelper.so+0x17dbc1) #26 salhelper::Thread::run() core/salhelper/source/thread.cxx:39:5 (libuno_salhelpergcc3.so.3+0x5267) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6) #27 non-virtual thunk to salhelper::Thread::run() core/salhelper/source/thread.cxx (libuno_salhelpergcc3.so.3+0x5267) #28 threadFunc core/include/osl/thread.hxx:189:15 (libuno_salhelpergcc3.so.3+0x551e) (BuildId: d146f721ac5d8da923b02df0d671788655b81eb6) #29 osl_thread_start_Impl(void*) core/sal/osl/unx/thread.cxx:265:9 (libuno_sal.so.3+0x6a9d5) (BuildId: 767a6cd7c58bf820064a10cf0ab0f15b30c2f4ac) Change-Id: I7542432749fded8ab5e35f79cb221ad712f7802d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146430 Tested-by: Jenkins Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> (cherry picked from commit 6652768) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146531 Reviewed-by: Xisco Fauli <[email protected]> (cherry picked from commit a1f175f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146695 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Christian Lohmaier <[email protected]> Reviewed-by: Christian Lohmaier <[email protected]>
...during CppunitTest_cppcanvas_test, > fcserialize.c:166:54: runtime error: applying zero offset to null pointer > #0 in FcSerializeResize at workdir/UnpackedTarball/fontconfig/src/fcserialize.c:166:54 > #1 in FcSerializeSet at workdir/UnpackedTarball/fontconfig/src/fcserialize.c:204:7 > #2 in FcSerializeAlloc at workdir/UnpackedTarball/fontconfig/src/fcserialize.c:228:10 > #3 in FcStrSerializeAlloc at workdir/UnpackedTarball/fontconfig/src/fcserialize.c:274:12 > #4 in FcDirCacheBuild at workdir/UnpackedTarball/fontconfig/src/fccache.c:1255:10 > #5 in FcDirCacheScan at workdir/UnpackedTarball/fontconfig/src/fcdir.c:360:13 > #6 in FcDirCacheRead at workdir/UnpackedTarball/fontconfig/src/fcdir.c:462:10 > #7 in FcConfigAddDirList at workdir/UnpackedTarball/fontconfig/src/fccfg.c:516:10 > #8 in FcConfigAppFontAddDir at workdir/UnpackedTarball/fontconfig/src/fccfg.c:2891:10 > #9 in psp::PrintFontManager::addFontconfigDir(rtl::OString const&) at vcl/unx/generic/fontmanager/fontconfig.cxx:745:20 > #10 in psp::PrintFontManager::initialize() at vcl/unx/generic/fontmanager/fontmanager.cxx:683:17 > #11 in GenericUnixSalData::InitPrintFontManager() at vcl/unx/generic/app/gendata.cxx:65:26 > #12 in GenericUnixSalData::GetPrintFontManager() at vcl/inc/unx/gendata.hxx:100:13 > #13 in psp::PrintFontManager::get() at vcl/unx/generic/fontmanager/fontmanager.cxx:105:23 > #14 in GenPspGraphics::GetDevFontListHelper(vcl::font::PhysicalFontCollection*) at vcl/unx/generic/print/genpspgraphics.cxx:248:35 > #15 in FreeTypeTextRenderImpl::GetDevFontList(vcl::font::PhysicalFontCollection*) at vcl/unx/generic/gdi/freetypetextrender.cxx:110:5 > #16 in SvpSalGraphics::GetDevFontList(vcl::font::PhysicalFontCollection*) at vcl/headless/svptext.cxx:51:23 > #17 in OutputDevice::ImplInitFontList() const at vcl/source/outdev/font.cxx:643:17 > #18 in OutputDevice::ImplNewFont() const at vcl/source/outdev/font.cxx:700:5 > #19 in OutputDevice::InitFont() const at vcl/source/outdev/font.cxx:660:10 > #20 in OutputDevice::GetTextHeight() const at vcl/source/outdev/text.cxx:899:10 > #21 in vcl::Window::GetTextHeight() const at vcl/source/window/window3.cxx:65:65 > #22 in vcl::Window::ImplInitAppFontData(vcl::Window const*) at vcl/source/window/window.cxx:1188:40 > #23 in vcl::Window::ImplInit(vcl::Window*, long, SystemParentData*) at vcl/source/window/window.cxx:1182:9 > #24 in ImplBorderWindow::ImplInit(vcl::Window*, long, BorderWindowStyle, SystemParentData*) at vcl/source/window/brdwin.cxx:1557:13 > #25 in ImplBorderWindow::ImplBorderWindow(vcl::Window*, SystemParentData*, long, BorderWindowStyle) at vcl/source/window/brdwin.cxx:1586:5 > #26 in VclPtrInstance<ImplBorderWindow>::VclPtrInstance<vcl::Window*&, SystemParentData*&, long&, BorderWindowStyle&>(vcl::Window*&, SystemParentData*&, long&, BorderWindowStyle&) at include/vcl/vclptr.hxx:280:39 > #27 in WorkWindow::ImplInit(vcl::Window*, long, SystemParentData*) at vcl/source/window/wrkwin.cxx:51:38 > #28 in WorkWindow::WorkWindow(vcl::Window*, long) at vcl/source/window/wrkwin.cxx:95:5 > #29 in ScopedVclPtrInstance<WorkWindow>::ScopedVclPtrInstance<std::nullptr_t, long const&>(std::nullptr_t&&, long const&) at include/vcl/vclptr.hxx:412:45 > #30 in CanvasTest::testComposite() at cppcanvas/qa/unit/test.cxx:38:38 Change-Id: I90c86931ae5d4dfb32a1a95a5eb660484b54f09a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148287 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]>
…Chart" ...as happens during UITest_chart UITEST_TEST_NAME=tdf107097.tdf107097.test_tdf107097 ever since 86b1929 "tdf#107097: sc: Add UItest" added that test (see <https://ci.libreoffice.org/job/lo_ubsan/1919/>), > /chart2/source/tools/XMLRangeHelper.cxx:136:52: runtime error: signed integer overflow: 15 * 308915776 cannot be represented in type 'int' > #0 0x2ad74a554918 in (anonymous namespace)::lcl_getSingleCellAddressFromXMLString(rtl::OUString const&, int, int, chart::XMLRangeHelper::Cell&) /chart2/source/tools/XMLRangeHelper.cxx:136:52 > #1 0x2ad74a553482 in (anonymous namespace)::lcl_getCellAddressFromXMLString(rtl::OUString const&, int, int, chart::XMLRangeHelper::Cell&, rtl::OUString&) /chart2/source/tools/XMLRangeHelper.cxx:217:13 > #2 0x2ad74a5505da in (anonymous namespace)::lcl_getCellRangeAddressFromXMLString(rtl::OUString const&, int, int, chart::XMLRangeHelper::CellRange&) /chart2/source/tools/XMLRangeHelper.cxx:253:19 > #3 0x2ad74a54fde1 in chart::XMLRangeHelper::getCellRangeFromXMLString(rtl::OUString const&) /chart2/source/tools/XMLRangeHelper.cxx:328:15 > #4 0x2ad74a2aed4d in chart::InternalDataProvider::convertRangeFromXML(rtl::OUString const&) /chart2/source/tools/InternalDataProvider.cxx:1227:39 > #5 0x2ad74a2b0164 in non-virtual thunk to chart::InternalDataProvider::convertRangeFromXML(rtl::OUString const&) /chart2/source/tools/InternalDataProvider.cxx > #6 0x2ad6c4784257 in (anonymous namespace)::lcl_ConvertRange(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::chart2::XChartDocument> const&) /xmloff/source/chart/SchXMLPlotAreaContext.cxx:76:32 > #7 0x2ad6c4779a67 in SchXMLPlotAreaContext::startFastElement(int, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) /xmloff/source/chart/SchXMLPlotAreaContext.cxx:233:34 > #8 0x2ad6c4c6328a in SvXMLImport::startFastElement(int, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) /xmloff/source/core/xmlimp.cxx:797:15 > #9 0x2ad704988b78 in (anonymous namespace)::Entity::startElement((anonymous namespace)::Event const*) /sax/source/fastparser/fastparser.cxx:468:27 > #10 0x2ad70496f681 in sax_fastparser::FastSaxParserImpl::consume((anonymous namespace)::EventList&) /sax/source/fastparser/fastparser.cxx:1026:25 > #11 0x2ad70496c65f in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:870:22 > #12 0x2ad7049905d1 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:1482:13 > #13 0x2ad6c4c52b80 in SvXMLImport::parseStream(com::sun::star::xml::sax::InputSource const&) /xmloff/source/core/xmlimp.cxx:504:15 > #14 0x2ad749aafe1e in chart::XMLFilter::impl_ImportStream(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&, com::sun::star::uno::Reference<com::sun::star::lang::XMultiComponentFactory> const&, com::sun::star::uno::Reference<com::sun::star::document::XGraphicStorageHandler> const&, com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> const&) /chart2/source/model/filter/XMLFilter.cxx:473:34 > #15 0x2ad749aa9f01 in chart::XMLFilter::impl_Import(com::sun::star::uno::Reference<com::sun::star::lang::XComponent> const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /chart2/source/model/filter/XMLFilter.cxx:375:35 > #16 0x2ad749aa0988 in chart::XMLFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /chart2/source/model/filter/XMLFilter.cxx:221:13 > #17 0x2ad749c2c76e in chart::ChartModel::impl_load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&) /chart2/source/model/main/ChartModel_Persistence.cxx:567:18 > #18 0x2ad749c30eea in chart::ChartModel::loadFromStorage(com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /chart2/source/model/main/ChartModel_Persistence.cxx:759:5 > #19 0x2ad74244b977 in OCommonEmbeddedObject::LoadDocumentFromStorage_Impl() /embeddedobj/source/commonembedding/persistence.cxx:535:19 > #20 0x2ad7423d7bde in OCommonEmbeddedObject::SwitchStateTo_Impl(int) /embeddedobj/source/commonembedding/embedobj.cxx:185:49 > #21 0x2ad7423e32ff in OCommonEmbeddedObject::changeState(int) /embeddedobj/source/commonembedding/embedobj.cxx:453:13 > #22 0x2ad7424b7057 in OCommonEmbeddedObject::getPreferredVisualRepresentation(long) /embeddedobj/source/commonembedding/visobj.cxx:168:9 > #23 0x2ad67e08fdb6 in comphelper::EmbeddedObjectContainer::GetGraphicReplacementStream(long, com::sun::star::uno::Reference<com::sun::star::embed::XEmbeddedObject> const&, rtl::OUString*) /comphelper/source/container/embeddedobjectcontainer.cxx:1425:54 > #24 0x2ad6a447182c in svt::EmbeddedObjectRef::GetGraphicReplacementStream(long, com::sun::star::uno::Reference<com::sun::star::embed::XEmbeddedObject> const&, rtl::OUString*) /svtools/source/misc/embedhlp.cxx:809:12 > #25 0x2ad6a446c7d4 in svt::EmbeddedObjectRef::GetGraphicStream(bool) const /svtools/source/misc/embedhlp.cxx:616:23 > #26 0x2ad6a4469e58 in svt::EmbeddedObjectRef::GetReplacement(bool) /svtools/source/misc/embedhlp.cxx:424:46 > #27 0x2ad6a446d4ea in svt::EmbeddedObjectRef::GetGraphic() const /svtools/source/misc/embedhlp.cxx:453:54 > #28 0x2ad69d4a9470 in SdrOle2Obj::GetGraphic() const /svx/source/svdraw/svdoole2.cxx:1635:33 > #29 0x2ad71b222d01 in ScDrawTransferObj::ScDrawTransferObj(std::unique_ptr<SdrModel, std::default_delete<SdrModel> >, ScDocShell*, TransferableObjectDescriptor const&) /sc/source/ui/app/drwtrans.cxx:191:107 > #30 0x2ad71d7da932 in ScDrawView::DoCopy() /sc/source/ui/view/drawvie4.cxx:364:56 > #31 0x2ad71c1fb75a in ScDrawShell::ExecDrawFunc(SfxRequest&) /sc/source/ui/drawfunc/drawsh5.cxx:328:20 > #32 0x2ad71c1b181f in SfxStubScDrawShellExecDrawFunc(SfxShell*, SfxRequest&) /workdir/SdiTarget/sc/sdi/scslots.hxx:2823:1 > #33 0x2ad68de39d05 in SfxShell::CallExec(void (*)(SfxShell*, SfxRequest&), SfxRequest&) /include/sfx2/shell.hxx:197:35 > #34 0x2ad68ddd1214 in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) /sfx2/source/control/dispatch.cxx:253:16 > #35 0x2ad68dde721f in SfxDispatcher::Execute_(SfxShell&, SfxSlot const&, SfxRequest&, SfxCallMode) /sfx2/source/control/dispatch.cxx:753:9 > #36 0x2ad68dd5edff in SfxBindings::Execute_Impl(SfxRequest&, SfxSlot const*, SfxShell*) /sfx2/source/control/bindings.cxx:1060:22 > #37 0x2ad68e24a322 in SfxDispatchController_Impl::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) /sfx2/source/control/unoctitm.cxx:758:53 > #38 0x2ad68e245261 in SfxOfficeDispatch::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sfx2/source/control/unoctitm.cxx:229:16 > #39 0x2ad67e465052 in comphelper::dispatchCommand(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) /comphelper/source/misc/dispatchcommand.cxx:61:12 > #40 0x2ad67e4657c5 in comphelper::dispatchCommand(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) /comphelper/source/misc/dispatchcommand.cxx:76:12 > #41 0x2ad6b39a49a6 in UITest::executeCommand(rtl::OUString const&) /vcl/source/uitest/uitest.cxx:24:12 > #42 0x2ad6b39b7240 in (anonymous namespace)::UITestUnoObj::executeCommand(rtl::OUString const&) /vcl/source/uitest/uno/uitest_uno.cxx:69:12 > #43 0x2ad6ee6508db in gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*) /bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:77:5 > #44 0x2ad6ee64abf2 in cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, _typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*, void*, void**, _uno_Any**) /bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:233:13 > #45 0x2ad6ee64773d in unoInterfaceProxyDispatch /bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:413:13 > #46 0x2ad6f3a7d2ca in binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::__debug::vector<binaryurp::BinaryAny, std::allocator<binaryurp::BinaryAny> >*) const /binaryurp/source/incomingrequest.cxx:235:13 Creating a pivot chart apparently generates XML output containing <chart:plot-area table:cell-range-address="PivotChart" ...> which does not conform to ODF, see the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2021-February/086884.html> "Integer overflow in Calc lcl_getSingleCellAddressFromXMLString nColumn computation" for details. And, ignoring the signed-integer-overflow UB for now, InternalDataProvider::convertRangeFromXML would always have returned an empty OUString for an input of aXMLRange="PivotChart": chart::XMLRangeHelper::getCellRangeFromXMLString with rXMLString="PivotChart" calls lcl_getCellAddressFromXMLString with rXMLString="PivotChart", nStartPos=0, nEndPos=9, its leading while-loop mis-computes nDelimiterPos=nEndPos, so calls lcl_getCellAddressFromXMLString with rXMLString="PivotChart", nStartPos=0, nEndPos=9, its leading while-loop mis-computes nDelimiterPos=nEndPos, so it doesn't set rOutTableName, so lcl_getCellAddressFromXMLString returns bResult=false, so chart::XMLRangeHelper::getCellRangeFromXMLString returns an empty CellRange(). So, similar to 9e5314f "tdf#107097 invoke internal DP and correctly handle 'range' names" added special handling of aXMLRange values starting with "PT@" to InternalDataProvider::convertRangeFromXML, also add explicit special handling for "PivotChart" (instead of relying on the later code returning an empty string, but after invoking UB). Change-Id: I1671f0ab3b3ab00dce8e348aa3b7141ebebaaad5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112207 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> (cherry picked from commit 6d43ba1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125233 Tested-by: Michael Stahl <[email protected]> Reviewed-by: Michael Stahl <[email protected]>
in: sw/source/core/text/itrform2.cxx:2643 SwTextFormatter::NewFlyCntPortion at: pFly = static_cast<SwTextFlyCnt*>(pHint)->GetFlyFrame(pFrame) (gdb) print m_pCurr $2 = (SwLineLayout *) 0x55ea220a0020 after calling GetFlyFrame m_pCurr is unchanged and we will call m_pCurr->MaxAscentDescent on it. But m_pCurr is deleted during GetFlyFrame by... #18 0x00007f98c5cd337f in SwLineLayout::~SwLineLayout() (this=this@entry=0x55ea220a0020, __in_chrg=<optimized out>) at source/libo-core/sw/source/core/text/portxt.hxx:26 #19 0x00007f98c5cd347a in SwParaPortion::~SwParaPortion() (this=0x55ea220a0020, __in_chrg=<optimized out>) at source/libo-core/sw/source/core/text/porlay.cxx:2491 #20 0x00007f98c5cd3485 in SwParaPortion::~SwParaPortion() (this=0x55ea220a0020, __in_chrg=<optimized out>) at source/libo-core/sw/source/core/text/porlay.cxx:2491 #21 0x00007f98c5d05e70 in std::default_delete<SwParaPortion>::operator()(SwParaPortion*) const (__ptr=<optimized out>, this=<optimized out>) at /usr/include/c++/8/bits/unique_ptr.h:75 #22 0x00007f98c5d05e70 in std::unique_ptr<SwParaPortion, std::default_delete<SwParaPortion> >::reset(SwParaPortion*) (__p=<optimized out>, this=<optimized out>) at /usr/include/c++/8/bits/unique_ptr.h:382 #23 0x00007f98c5d05e70 in SwTextLine::SetPara(SwParaPortion*, bool) (bDelete=true, pNew=0x0, this=<optimized out>) at source/libo-core/sw/source/core/text/txtcache.hxx:45 #24 0x00007f98c5d05e70 in SwTextFrame::ClearPara() (this=this@entry=0x55ea21302b60) at source/libo-core/sw/source/core/text/txtcache.cxx:113 #25 0x00007f98c5d1be89 in SwTextFrame::Init() (this=this@entry=0x55ea21302b60) at source/libo-core/sw/source/core/text/txtfrm.cxx:757 #26 0x00007f98c5d2630c in SwTextFrame::Prepare(PrepareHint, void const*, bool) (this=0x55ea21302b60, ePrep=PrepareHint::FlyFrameArrive, pVoid=<optimized out>, bNotify=<optimized out>) at source/libo-core/sw/source/core/text/txtfrm.cxx:3086 #27 0x00007f98c5b1edb8 in SwFlyInContentFrame::NotifyBackground(SwPageFrame*, SwRect const&, PrepareHint) (this=<optimized out>, rRect=..., eHint=<optimized out>) at source/libo-core/sw/inc/anchoredobject.hxx:205 #28 0x00007f98c5b261a6 in Notify(SwFlyFrame*, SwPageFrame*, SwRect const&, SwRect const*) (pFly=pFly@entry=0x55ea21a18d60, pOld=0x0, rOld=SwRect = {...}, pOldPrt=pOldPrt@entry=0x7ffeb50390f8) at source/libo-core/sw/source/core/inc/frame.hxx:1177 #29 0x00007f98c5b2ceca in SwFlyNotify::~SwFlyNotify() (this=0x7ffeb50390d0, __in_chrg=<optimized out>) at source/libo-core/sw/source/core/layout/frmtool.cxx:648 #30 0x00007f98c5b1fa25 in SwFlyInContentFrame::MakeAll(OutputDevice*) (this=0x55ea21a18d60) at source/libo-core/sw/source/core/inc/frmtool.hxx:419 #31 0x00007f98c5aec3a9 in SwFrame::PrepareMake(OutputDevice*) (this=0x55ea21a18d60, pRenderContext=0x55ea212bc4c0) at source/libo-core/sw/source/core/layout/calcmove.cxx:375 #32 0x00007f98c5b17ad2 in SwFlyFrame::Calc(OutputDevice*) const (this=<optimized out>, pRenderContext=<optimized out>) at source/libo-core/sw/source/core/layout/fly.cxx:2890 #33 0x00007f98c5b636c5 in SwObjectFormatter::FormatLayout_(SwLayoutFrame&) (this=this@entry=0x55ea2244d150, _rLayoutFrame=...) at source/libo-core/include/rtl/ref.hxx:206 #34 0x00007f98c5b6413e in SwObjectFormatter::FormatObj_(SwAnchoredObject&) (this=this@entry=0x55ea2244d150, _rAnchoredObj=...) at source/libo-core/sw/source/core/layout/objectformatter.cxx:296 #35 0x00007f98c5b6705b in SwObjectFormatterTextFrame::DoFormatObj(SwAnchoredObject&, bool) (this=0x55ea2244d150, _rAnchoredObj=..., _bCheckForMovedFwd=<optimized out>) at source/libo-core/sw/source/core/layout/objectformattertxtfrm.cxx:136 #36 0x00007f98c5b6359f in SwObjectFormatter::FormatObj(SwAnchoredObject&, SwFrame*, SwPageFrame const*) (_rAnchoredObj=..., _pAnchorFrame=<optimized out>, _pPageFrame=<optimized out>) at source/libo-core/sw/source/core/layout/objectformatter.cxx:190 #37 0x00007f98c5d717aa in SwTextFlyCnt::GetFlyFrame_(SwFrame const*) (this=this@entry=0x55ea214d8810, pCurrFrame=pCurrFrame@entry=0x55ea21302b60) at source/libo-core/sw/source/core/inc/frame.hxx:1177 #38 0x00007f98c5cb511b in SwTextFlyCnt::GetFlyFrame(SwFrame const*) (pCurrFrame=0x55ea21302b60, this=0x55ea214d8810) at source/libo-core/sw/inc/txtflcnt.hxx:48 #39 0x00007f98c5cb511b in SwTextFormatter::NewFlyCntPortion(SwTextFormatInfo&, SwTextAttr*) const (this=this@entry=0x7ffeb503a6b0, rInf=..., pHint=0x55ea214d8810) at source/libo-core/sw/source/core/text/itrform2.cxx:2643 (gdb) print this (SwLinePortion * const) 0x55ea220a0020 The SwTextFrame of SwTextFrame::ClearPara is the same pFrame/m_pFrame at SwTextFormatter::NewFlyCntPortion ClearPara is not called if the SwTextFrame is "Locked", so try using that to protect GetFlyFrame Change-Id: Ia9dcb1f345f6953d995f2acf1ec23492d1680364 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118784 Tested-by: Jenkins Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> (cherry picked from commit 7e016df) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125239 Tested-by: Michael Stahl <[email protected]> Reviewed-by: Michael Stahl <[email protected]>
...e.g. during CppunitTest_sd_import_tests, > /oox/source/drawingml/colorchoicecontext.cxx:280:78: runtime error: 35000 is outside the range of representable values of type 'short' > #0 0x7f3b8abf6278 in oox::drawingml::ColorValueContext::onCreateContext(int, oox::AttributeList const&) /oox/source/drawingml/colorchoicecontext.cxx:280:78 > #1 0x7f3b8abf6534 in non-virtual thunk to oox::drawingml::ColorValueContext::onCreateContext(int, oox::AttributeList const&) /oox/source/drawingml/colorchoicecontext.cxx > #2 0x7f3b8a94baff in oox::core::ContextHandler2Helper::implCreateChildContext(int, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) /oox/source/core/contexthandler2.cxx:100:34 > #3 0x7f3b8a94eabb in oox::core::ContextHandler2::createFastChildContext(int, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) /oox/source/core/contexthandler2.cxx:204:12 > #4 0x7f3b8a950484 in non-virtual thunk to oox::core::ContextHandler2::createFastChildContext(int, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) /oox/source/core/contexthandler2.cxx > #5 0x7f3b43e81c45 in DOM::CElement::fastSaxify(DOM::Context&) /unoxml/source/dom/element.cxx:164:67 > #6 0x7f3b43e8299e in DOM::CElement::fastSaxify(DOM::Context&) /unoxml/source/dom/element.cxx:181:20 > #7 0x7f3b43e8299e in DOM::CElement::fastSaxify(DOM::Context&) /unoxml/source/dom/element.cxx:181:20 > #8 0x7f3b43e8299e in DOM::CElement::fastSaxify(DOM::Context&) /unoxml/source/dom/element.cxx:181:20 > #9 0x7f3b43e8299e in DOM::CElement::fastSaxify(DOM::Context&) /unoxml/source/dom/element.cxx:181:20 > #10 0x7f3b43e8299e in DOM::CElement::fastSaxify(DOM::Context&) /unoxml/source/dom/element.cxx:181:20 > #11 0x7f3b43e8299e in DOM::CElement::fastSaxify(DOM::Context&) /unoxml/source/dom/element.cxx:181:20 > #12 0x7f3b43e8299e in DOM::CElement::fastSaxify(DOM::Context&) /unoxml/source/dom/element.cxx:181:20 > #13 0x7f3b43e8299e in DOM::CElement::fastSaxify(DOM::Context&) /unoxml/source/dom/element.cxx:181:20 > #14 0x7f3b43df8a50 in DOM::CDocument::fastSaxify(DOM::Context&) /unoxml/source/dom/document.cxx:289:20 > #15 0x7f3b43e117af in DOM::CDocument::fastSerialize(com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastDocumentHandler> const&, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastTokenHandler> const&, com::sun::star::uno::Sequence<com::sun::star::beans::StringPair> const&, com::sun::star::uno::Sequence<com::sun::star::beans::Pair<rtl::OUString, int> > const&) /unoxml/source/dom/document.cxx:1023:9 > #16 0x7f3b8aa55f81 in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastSAXSerializable> const&) /oox/source/core/xmlfilterbase.cxx:470:23 > #17 0x7f3b8bd30d0f in oox::ppt::PresentationFragmentHandler::importSlide(unsigned int, bool, bool) /oox/source/ppt/presentationfragmenthandler.cxx:357:41 > #18 0x7f3b8bd3cd16 in oox::ppt::PresentationFragmentHandler::finalizeImport() /oox/source/ppt/presentationfragmenthandler.cxx:543:17 > #19 0x7f3b8a9f79ae in oox::core::FragmentHandler2::endDocument() /oox/source/core/fragmenthandler2.cxx:53:5 > #20 0x7f3b548344f0 in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:897:36 > #21 0x7f3b54855150 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:1469:13 > #22 0x7f3b8a97ff11 in oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) /oox/source/core/fastparser.cxx:121:15 > #23 0x7f3b8a9806a8 in oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) /oox/source/core/fastparser.cxx:129:5 > #24 0x7f3b8aa548a4 in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) /oox/source/core/xmlfilterbase.cxx:412:21 > #25 0x7f3b8aa531fd in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&) /oox/source/core/xmlfilterbase.cxx:342:12 > #26 0x7f3b8bcbaf54 in oox::ppt::PowerPointImport::importDocument() /oox/source/ppt/pptimport.cxx:109:17 > #27 0x7f3b8a99493c in oox::core::FilterBase::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /oox/source/core/filterbase.cxx:488:49 > #28 0x7f3b8bcbe067 in oox::ppt::PowerPointImport::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /oox/source/ppt/pptimport.cxx:192:24 > #29 0x7f3b7a89c1c6 in SfxObjectShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) /sfx2/source/doc/objstor.cxx:2272:34 > #30 0x7f3b82834e18 in sd::DrawDocShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) /sd/source/ui/docshell/docshel4.cxx:429:39 > #31 0x7f3b7a85bd64 in SfxObjectShell::DoLoad(SfxMedium*) /sfx2/source/doc/objstor.cxx:739:23 > #32 0x7f3b7aa63c10 in SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sfx2/source/doc/sfxbasemodel.cxx:1940:36 > #33 0x7f3b7b1c142c 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&) /sfx2/source/view/frmload.cxx:720:28 > #34 0x7f3b4ff0f5fb in framework::LoadEnv::impl_loadContent() /framework/source/loadenv/loadenv.cxx:1176:37 > #35 0x7f3b4ff059fb in framework::LoadEnv::start() /framework/source/loadenv/loadenv.cxx:412:20 > #36 0x7f3b4fefd8bc 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) /framework/source/loadenv/loadenv.cxx:308:5 > #37 0x7f3b4fef8c50 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&) /framework/source/loadenv/loadenv.cxx:168:14 > #38 0x7f3b4ffc334d in framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/desktop.cxx:593:16 > #39 0x7f3b4ffc3576 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&) /framework/source/services/desktop.cxx > #40 0x7f3b5feedd95 in unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /unotest/source/cpp/macros_test.cxx:71:62 > #41 0x7f3b75b0aef9 in UnoApiTest::load(rtl::OUString const&, char const*) /test/source/unoapi_test.cxx:115:11 > #42 0x7f3b75b0baf4 in UnoApiTest::loadFromURL(std::basic_string_view<char16_t, std::char_traits<char16_t> >, char const*) /test/source/unoapi_test.cxx:127:5 > #43 0x7f3b95d2f402 in SdModelTestBase::createSdImpressDoc(char const*, char const*) /sd/qa/unit/sdmodeltestbase.hxx:54:13 > #44 0x7f3b95d025c8 in testBnc584721_1::TestBody() /sd/qa/unit/import-tests.cxx:1281:5 (<https://ci.libreoffice.org/job/lo_ubsan/2741/>). Presumably it was just a typo that f707834 "oox: write color transforms to model::ColorDefinition" used 10.0 rather than 10 as divisor. Change-Id: I42de6daaa6db86bf4444243ec2c9173d6d514b02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150216 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]>
bb19817 "MCGR: Make MCGR default for oox im/export, cleanup" started to cause CppunitTest_chart2_geometry CPPUNIT_TEST_NAME=Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_import to fail with the below UBSan failure (even though the relevant code appears to be even older than that commit). At least for now, lets silence that by explicitly using +INF in case the divisor is zero (and the dividend is known non-negative). > /drawinglayer/source/texture/texture.cxx:246:71: runtime error: division by zero > #0 0x7f2e61d80f7f in drawinglayer::texture::GeoTexSvxGradientLinear::appendTransformationsAndColors(std::function<void (basegfx::B2DHomMatrix const&, basegfx::BColor const&)>) /drawinglayer/source/texture/texture.cxx:246:71 > #1 0x7f2e616e187d in drawinglayer::primitive2d::FillGradientPrimitive2D::generateMatricesAndColors(std::function<void (basegfx::B2DHomMatrix const&, basegfx::BColor const&)>) const /drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx:75:31 > #2 0x7f2e616e4f4f in drawinglayer::primitive2d::FillGradientPrimitive2D::createFill(drawinglayer::primitive2d::Primitive2DContainer&, bool) const /drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx:172:17 > #3 0x7f2e616e66ca in drawinglayer::primitive2d::FillGradientPrimitive2D::create2DDecomposition(drawinglayer::primitive2d::Primitive2DContainer&, drawinglayer::geometry::ViewInformation2D const&) const /drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx:269:17 > #4 0x7f2e76cecd04 in drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const /drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx:36:9 > #5 0x7f2e619b9278 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24 > #6 0x7f2e61a38a25 in drawinglayer::processor2d::VclMetafileProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:917:13 > #7 0x7f2e619b9a5f in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21 > #8 0x7f2e61a5cc3e in drawinglayer::processor2d::VclMetafileProcessor2D::processMaskPrimitive2D(drawinglayer::primitive2d::MaskPrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:2139:13 > #9 0x7f2e61a3734a in drawinglayer::processor2d::VclMetafileProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:833:13 > #10 0x7f2e619b9a5f in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21 > #11 0x7f2e619b952c in drawinglayer::processor2d::BaseProcessor2D::visit(drawinglayer::primitive2d::Primitive2DContainer const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:56:13 > #12 0x7f2e76ced03a in drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const /drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx:41:14 > #13 0x7f2e619b9278 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24 > #14 0x7f2e61a595e3 in drawinglayer::processor2d::VclMetafileProcessor2D::processPolyPolygonGradientPrimitive2D(drawinglayer::primitive2d::PolyPolygonGradientPrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:2014:9 > #15 0x7f2e61a36fc0 in drawinglayer::processor2d::VclMetafileProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:821:13 > #16 0x7f2e619b9a5f in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21 > #17 0x7f2e61a2e0da in drawinglayer::processor2d::VclMetafileProcessor2D::impDumpToMetaFile(drawinglayer::primitive2d::Primitive2DContainer const&, GDIMetaFile&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:244:5 > #18 0x7f2e61a60f4a in drawinglayer::processor2d::VclMetafileProcessor2D::processTransparencePrimitive2D(drawinglayer::primitive2d::TransparencePrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:2292:52 > #19 0x7f2e61a378cb in drawinglayer::processor2d::VclMetafileProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:851:13 > #20 0x7f2e619b9a5f in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21 > #21 0x7f2e619b952c in drawinglayer::processor2d::BaseProcessor2D::visit(drawinglayer::primitive2d::Primitive2DContainer const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:56:13 > #22 0x7f2e76ced03a in drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const /drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx:41:14 > #23 0x7f2e619b9278 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24 > #24 0x7f2e61a38a25 in drawinglayer::processor2d::VclMetafileProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:917:13 > #25 0x7f2e619b9a5f in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21 > #26 0x7f2e61a68781 in drawinglayer::processor2d::VclMetafileProcessor2D::processObjectInfoPrimitive2D(drawinglayer::primitive2d::ObjectInfoPrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:965:5 > #27 0x7f2e61a38916 in drawinglayer::processor2d::VclMetafileProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:910:13 > #28 0x7f2e619b9a5f in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21 > #29 0x7f2df2676731 in sdr::contact::ObjectContactOfPageView::DoProcessDisplay(sdr::contact::DisplayInfo&) /svx/source/sdr/contact/objectcontactofpageview.cxx:277:31 > #30 0x7f2df26741be in sdr::contact::ObjectContactOfPageView::ProcessDisplay(sdr::contact::DisplayInfo&) /svx/source/sdr/contact/objectcontactofpageview.cxx:117:21 > #31 0x7f2df291809d in SdrPageWindow::RedrawAll(sdr::contact::ViewObjectContactRedirector*) /svx/source/svdraw/sdrpagewindow.cxx:357:28 > #32 0x7f2df363584c in SdrPageView::CompleteRedraw(SdrPaintWindow&, vcl::Region const&, sdr::contact::ViewObjectContactRedirector*) /svx/source/svdraw/svdpagv.cxx:239:18 > #33 0x7f2df36a80b0 in SdrPaintView::DoCompleteRedraw(SdrPaintWindow&, vcl::Region const&, sdr::contact::ViewObjectContactRedirector*) /svx/source/svdraw/svdpntv.cxx:609:21 > #34 0x7f2df36a7b61 in SdrPaintView::CompleteRedraw(OutputDevice*, vcl::Region const&, sdr::contact::ViewObjectContactRedirector*) /svx/source/svdraw/svdpntv.cxx:522:5 > #35 0x7f2df3ec0413 in (anonymous namespace)::GraphicExporter::GetGraphic((anonymous namespace)::ExportSettings const&, Graphic&, bool) /svx/source/unodraw/UnoGraphicExporter.cxx:740:24 > #36 0x7f2df3ec857b in (anonymous namespace)::GraphicExporter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /svx/source/unodraw/UnoGraphicExporter.cxx:1037:19 > #37 0x7f2db53f082a in chart::ChartView::getMetaFile(com::sun::star::uno::Reference<com::sun::star::io::XOutputStream> const&, bool) /chart2/source/view/main/ChartView.cxx:263:20 > #38 0x7f2db53f1d43 in chart::ChartView::getTransferData(com::sun::star::datatransfer::DataFlavor const&) /chart2/source/view/main/ChartView.cxx:285:11 > #39 0x7f2db53f28ae in non-virtual thunk to chart::ChartView::getTransferData(com::sun::star::datatransfer::DataFlavor const&) /chart2/source/view/main/ChartView.cxx > #40 0x7f2db586547f in chart::ChartModel::getPreferredVisualRepresentation(long) /chart2/source/model/main/ChartModel.cxx:1054:44 > #41 0x7f2db586779e in non-virtual thunk to chart::ChartModel::getPreferredVisualRepresentation(long) /chart2/source/model/main/ChartModel.cxx > #42 0x7f2db8401589 in OCommonEmbeddedObject::getPreferredVisualRepresentation(long) /embeddedobj/source/commonembedding/visobj.cxx:186:48 > #43 0x7f2e95742555 in comphelper::EmbeddedObjectContainer::GetGraphicReplacementStream(long, com::sun::star::uno::Reference<com::sun::star::embed::XEmbeddedObject> const&, rtl::OUString*) /comphelper/source/container/embeddedobjectcontainer.cxx:1428:54 > #44 0x7f2e9573f6b4 in comphelper::EmbeddedObjectContainer::StoreAsChildren(bool, bool, bool, com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&) /comphelper/source/container/embeddedobjectcontainer.cxx:1198:31 > #45 0x7f2e044c7a1f in SfxObjectShell::SaveAsChildren(SfxMedium&) /sfx2/source/doc/objstor.cxx:3316:38 > #46 0x7f2e044c6d0c in SfxObjectShell::SaveAs(SfxMedium&) /sfx2/source/doc/objstor.cxx:160:12 > #47 0x7f2e0c509471 in sd::DrawDocShell::SaveAs(SfxMedium&) /sd/source/ui/docshell/docshel4.cxx:602:33 > #48 0x7f2e0453a4ec in SfxObjectShell::SaveAsOwnFormat(SfxMedium&) /sfx2/source/doc/objstor.cxx:3256:16 > #49 0x7f2e0c513d7d in sd::DrawDocShell::SaveAsOwnFormat(SfxMedium&) /sd/source/ui/docshell/docshel4.cxx:924:28 > #50 0x7f2e044f8b0c in SfxObjectShell::SaveTo_Impl(SfxMedium&, SfxItemSet const*) /sfx2/source/doc/objstor.cxx:1457:23 > #51 0x7f2e04534ef5 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:2993:39 > #52 0x7f2e0452c40c 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:2783:9 > #53 0x7f2e04486556 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:319:19 > #54 0x7f2e046d7afe in SfxBaseModel::impl_store(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, bool) /sfx2/source/doc/sfxbasemodel.cxx:3151:42 > #55 0x7f2e046de8db in SfxBaseModel::storeToURL(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sfx2/source/doc/sfxbasemodel.cxx:1785:13 > #56 0x7f2dff75b078 in UnoApiTest::save(rtl::OUString const&, char const*) /test/source/unoapi_test.cxx:174:16 > #57 0x7f2e63063d61 in Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_import() /chart2/qa/extras/chart2geometry.cxx:322:5 (<>https://ci.libreoffice.org//job/lo_ubsan/2766/) Change-Id: I72650fba2ee7ba339ec78d24dd690487c31e2600 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151495 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]>
Creating or modifying native Qt UI elements needs to happen in the main thread. This commit takes care of the obvious cases where such interaction happens. Otherwise, the tdf#162696 scenario triggers asserts like the following with a Qt debug build: ASSERT failure in QWidget: "Widgets must be created in the GUI thread.", file /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp, line 958 terminate called after throwing an instance of 'com::sun::star::uno::RuntimeException' Fatal exception: Signal 6 Stack: #0 sal::backtrace_get(unsigned int) at /home/michi/development/git/libreoffice/sal/osl/unx/backtraceapi.cxx:42 #1 (anonymous namespace)::printStack(int) at /home/michi/development/git/libreoffice/sal/osl/unx/signal.cxx:289 #2 (anonymous namespace)::callSystemHandler(int, siginfo_t*, void*) at /home/michi/development/git/libreoffice/sal/osl/unx/signal.cxx:330 #3 (anonymous namespace)::signalHandlerFunction(int, siginfo_t*, void*) at /home/michi/development/git/libreoffice/sal/osl/unx/signal.cxx:427 #4 /lib/x86_64-linux-gnu/libc.so.6(+0x3f590) [0x7fdb05455590] #5 __pthread_kill_implementation at ./nptl/pthread_kill.c:44 (discriminator 1) #6 raise at ./signal/../sysdeps/posix/raise.c:27 #7 abort at ./stdlib/abort.c:81 #8 /lib/x86_64-linux-gnu/libstdc++.so.6(+0xa1a3d) [0x7fdb050a1a3d] #9 /lib/x86_64-linux-gnu/libstdc++.so.6(+0xb306a) [0x7fdb050b306a] #10 std::unexpected() in /lib/x86_64-linux-gnu/libstdc++.so.6 #11 /home/michi/development/git/qt5/qtbase/lib/libQt6Core.so.6(+0xed562) [0x7fdaf0eed562] #12 QMessageLogger::fatal() const at /home/michi/development/git/qt5/qtbase/src/corelib/global/qlogging.cpp:901 #13 qt_assert_x(char const*, char const*, char const*, int) at /home/michi/development/git/qt5/qtbase/src/corelib/global/qassert.cpp:0 #14 QWidgetPrivate::init(QWidget*, QFlags<Qt::WindowType>) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:959 #15 QWidget::QWidget(QWidgetPrivate&, QWidget*, QFlags<Qt::WindowType>) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:878 #16 QDialog::QDialog(QDialogPrivate&, QWidget*, QFlags<Qt::WindowType>) at /home/michi/development/git/qt5/qtbase/src/widgets/dialogs/qdialog.cpp:377 #17 QMessageBox::QMessageBox(QWidget*) at /home/michi/development/git/qt5/qtbase/src/widgets/dialogs/qmessagebox.cpp:838 #18 QtInstance::CreateMessageDialog(weld::Widget*, VclMessageType, VclButtonsType, rtl::OUString const&) at /home/michi/development/git/libreoffice/vcl/qt6/../qt5/QtInstance.cxx:825 #19 Application::CreateMessageDialog(weld::Widget*, VclMessageType, VclButtonsType, rtl::OUString const&, vcl::ILibreOfficeKitNotifier const*) at /home/michi/development/git/libreoffice/vcl/source/window/builder.cxx:224 #20 dp_gui::DialogHelper::installExtensionWarn(std::basic_string_view<char16_t, std::char_traits<char16_t>>) at /home/michi/development/git/libreoffice/desktop/source/deployment/gui/dp_gui_dialog2.cxx:371 #21 dp_gui::(anonymous namespace)::ProgressCmdEnv::handle(com::sun::star::uno::Reference<com::sun::star::task::XInteractionRequest> const&) at /home/michi/development/git/libreoffice/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx:477 #22 dp_misc::interactContinuation(com::sun::star::uno::Any const&, com::sun::star::uno::Type const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&, bool*, bool*) at /home/michi/development/git/libreoffice/desktop/source/deployment/misc/dp_interact.cxx:114 #23 dp_manager::ExtensionManager::checkInstall(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&) at /home/michi/development/git/libreoffice/desktop/source/deployment/manager/dp_extensionmanager.cxx:1315 #24 dp_manager::ExtensionManager::doChecksForAddExtension(com::sun::star::uno::Reference<com::sun::star::deployment::XPackageManager> const&, com::sun::star::uno::Sequence<com::sun::star::beans::NamedValue> const&, com::sun::star::uno::Reference<com::sun::star::deployment::XPackage> const&, com::sun::star::uno::Reference<com::sun::star::task::XAbortChannel> const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&, com::sun::star::uno::Reference<com::sun::star::deployment::XPackage>&) at /home/michi/development/git/libreoffice/desktop/source/deployment/manager/dp_extensionmanager.cxx:565 #25 dp_manager::ExtensionManager::addExtension(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::NamedValue> const&, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::task::XAbortChannel> const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&) at /home/michi/development/git/libreoffice/desktop/source/deployment/manager/dp_extensionmanager.cxx:655 #26 non-virtual thunk to dp_manager::ExtensionManager::addExtension(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::NamedValue> const&, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::task::XAbortChannel> const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&) at /home/michi/development/git/libreoffice/desktop/source/deployment/manager/dp_extensionmanager.cxx:0 #27 dp_gui::ExtensionCmdQueue::Thread::_addExtension(rtl::Reference<dp_gui::(anonymous namespace)::ProgressCmdEnv> const&, rtl::OUString const&, rtl::OUString const&, bool) at /home/michi/development/git/libreoffice/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx:864 #28 dp_gui::ExtensionCmdQueue::Thread::execute() at /home/michi/development/git/libreoffice/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx:738 #29 salhelper::Thread::run() at /home/michi/development/git/libreoffice/salhelper/source/thread.cxx:39 #30 threadFunc at /home/michi/development/git/libreoffice/include/osl/thread.hxx:190 #31 osl_thread_start_Impl(void*) at /home/michi/development/git/libreoffice/sal/osl/unx/thread.cxx:245 #32 start_thread at ./nptl/pthread_create.c:447 #33 clone3 at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:80 Change-Id: Ifa84a038fc56f34958cd732caeb9c436b48b3c75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172642 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> (cherry picked from commit 5e4c163) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172652 Reviewed-by: Adolfo Jayme Barrientos <[email protected]>
Besides the obvious cases handled in previous commit Change-Id: Ifa84a038fc56f34958cd732caeb9c436b48b3c75 Author: Michael Weghorn <[email protected]> Date: Fri Aug 30 10:12:21 2024 +0200 tdf#162696 qt weld: Do GUI things in main thread , the destruction of `QtInstanceDialog::m_pDialog` (that previously implicitly happened due to it being a `std::unique_ptr`) also needs to happen in the main thread. Otherwise, it triggers this assert with a debug Qt build for the tdf#162696 of installing an extension via drag'n'drop into the start center: ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread. Current thread QThread(0x7f4b14003390). Receiver 'QDialog(0x562e6ba77450)' was created in thread QThread(0x562e69709f60, name = "Qt mainThread")", file /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp, line 551 terminate called after throwing an instance of 'com::sun::star::uno::RuntimeException' Fatal exception: Signal 6 Stack: #0 sal::backtrace_get(unsigned int) at /home/michi/development/git/libreoffice/sal/osl/unx/backtraceapi.cxx:42 #1 (anonymous namespace)::printStack(int) at /home/michi/development/git/libreoffice/sal/osl/unx/signal.cxx:289 #2 (anonymous namespace)::callSystemHandler(int, siginfo_t*, void*) at /home/michi/development/git/libreoffice/sal/osl/unx/signal.cxx:330 #3 (anonymous namespace)::signalHandlerFunction(int, siginfo_t*, void*) at /home/michi/development/git/libreoffice/sal/osl/unx/signal.cxx:427 #4 /lib/x86_64-linux-gnu/libc.so.6(+0x3f590) [0x7f4be7455590] #5 __pthread_kill_implementation at ./nptl/pthread_kill.c:44 (discriminator 1) #6 raise at ./signal/../sysdeps/posix/raise.c:27 #7 abort at ./stdlib/abort.c:81 #8 /lib/x86_64-linux-gnu/libstdc++.so.6(+0xa1a3d) [0x7f4be70a1a3d] #9 /lib/x86_64-linux-gnu/libstdc++.so.6(+0xb306a) [0x7f4be70b306a] #10 std::unexpected() in /lib/x86_64-linux-gnu/libstdc++.so.6 #11 /home/michi/development/git/qt5/qtbase/lib/libQt6Core.so.6(+0xed562) [0x7f4bd2eed562] #12 QMessageLogger::fatal() const at /home/michi/development/git/qt5/qtbase/src/corelib/global/qlogging.cpp:901 #13 qt_assert_x(char const*, char const*, char const*, int) at /home/michi/development/git/qt5/qtbase/src/corelib/global/qassert.cpp:0 #14 QCoreApplicationPrivate::checkReceiverThread(QObject*) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:0 #15 QApplication::notify(QObject*, QEvent*) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2583 #16 QCoreApplication::notifyInternal2(QObject*, QEvent*) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1170 #17 QCoreApplication::sendEvent(QObject*, QEvent*) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1614 #18 QWidgetPrivate::setVisible(bool) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:8415 #19 QDialogPrivate::setVisible(bool) at /home/michi/development/git/qt5/qtbase/src/widgets/dialogs/qdialog.cpp:832 #20 QMessageBoxPrivate::setVisible(bool) at /home/michi/development/git/qt5/qtbase/src/widgets/dialogs/qmessagebox.cpp:1676 #21 QDialog::setVisible(bool) at /home/michi/development/git/qt5/qtbase/src/widgets/dialogs/qdialog.cpp:750 #22 QWidget::hide() at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:8176 #23 QDialog::~QDialog() at /home/michi/development/git/qt5/qtbase/src/widgets/dialogs/qdialog.cpp:390 #24 QMessageBox::~QMessageBox() at /home/michi/development/git/qt5/qtbase/src/widgets/dialogs/qmessagebox.cpp:879 #25 QMessageBox::~QMessageBox() at /home/michi/development/git/qt5/qtbase/src/widgets/dialogs/qmessagebox.cpp:878 #26 std::default_delete<QDialog>::operator()(QDialog*) const at /usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:94 #27 std::unique_ptr<QDialog, std::default_delete<QDialog>>::~unique_ptr() at /usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:398 #28 QtInstanceDialog::~QtInstanceDialog() at /home/michi/development/git/libreoffice/vcl/inc/qt6/../qt5/QtInstanceDialog.hxx:14 #29 QtInstanceMessageDialog::~QtInstanceMessageDialog() at /home/michi/development/git/libreoffice/vcl/inc/qt6/../qt5/QtInstanceMessageDialog.hxx:16 #30 QtInstanceMessageDialog::~QtInstanceMessageDialog() at /home/michi/development/git/libreoffice/vcl/inc/qt6/../qt5/QtInstanceMessageDialog.hxx:16 #31 QtInstanceMessageDialog::~QtInstanceMessageDialog() at /home/michi/development/git/libreoffice/vcl/inc/qt6/../qt5/QtInstanceMessageDialog.hxx:16 #32 std::default_delete<weld::MessageDialog>::operator()(weld::MessageDialog*) const at /usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:94 #33 std::__uniq_ptr_impl<weld::MessageDialog, std::default_delete<weld::MessageDialog>>::reset(weld::MessageDialog*) at /usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:206 #34 std::unique_ptr<weld::MessageDialog, std::default_delete<weld::MessageDialog>>::reset(weld::MessageDialog*) at /usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:504 #35 dp_gui::DialogHelper::installExtensionWarn(std::basic_string_view<char16_t, std::char_traits<char16_t>>) at /home/michi/development/git/libreoffice/desktop/source/deployment/gui/dp_gui_dialog2.cxx:379 #36 dp_gui::(anonymous namespace)::ProgressCmdEnv::handle(com::sun::star::uno::Reference<com::sun::star::task::XInteractionRequest> const&) at /home/michi/development/git/libreoffice/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx:477 #37 dp_misc::interactContinuation(com::sun::star::uno::Any const&, com::sun::star::uno::Type const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&, bool*, bool*) at /home/michi/development/git/libreoffice/desktop/source/deployment/misc/dp_interact.cxx:114 #38 dp_manager::ExtensionManager::checkInstall(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&) at /home/michi/development/git/libreoffice/desktop/source/deployment/manager/dp_extensionmanager.cxx:1315 #39 dp_manager::ExtensionManager::doChecksForAddExtension(com::sun::star::uno::Reference<com::sun::star::deployment::XPackageManager> const&, com::sun::star::uno::Sequence<com::sun::star::beans::NamedValue> const&, com::sun::star::uno::Reference<com::sun::star::deployment::XPackage> const&, com::sun::star::uno::Reference<com::sun::star::task::XAbortChannel> const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&, com::sun::star::uno::Reference<com::sun::star::deployment::XPackage>&) at /home/michi/development/git/libreoffice/desktop/source/deployment/manager/dp_extensionmanager.cxx:565 #40 dp_manager::ExtensionManager::addExtension(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::NamedValue> const&, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::task::XAbortChannel> const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&) at /home/michi/development/git/libreoffice/desktop/source/deployment/manager/dp_extensionmanager.cxx:655 #41 non-virtual thunk to dp_manager::ExtensionManager::addExtension(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::NamedValue> const&, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::task::XAbortChannel> const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&) at /home/michi/development/git/libreoffice/desktop/source/deployment/manager/dp_extensionmanager.cxx:0 #42 dp_gui::ExtensionCmdQueue::Thread::_addExtension(rtl::Reference<dp_gui::(anonymous namespace)::ProgressCmdEnv> const&, rtl::OUString const&, rtl::OUString const&, bool) at /home/michi/development/git/libreoffice/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx:864 #43 dp_gui::ExtensionCmdQueue::Thread::execute() at /home/michi/development/git/libreoffice/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx:738 #44 salhelper::Thread::run() at /home/michi/development/git/libreoffice/salhelper/source/thread.cxx:39 #45 threadFunc at /home/michi/development/git/libreoffice/include/osl/thread.hxx:190 #46 osl_thread_start_Impl(void*) at /home/michi/development/git/libreoffice/sal/osl/unx/thread.cxx:245 #47 start_thread at ./nptl/pthread_create.c:447 #48 clone3 at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:80 Change-Id: Idb5b20bde8c306ed14efd5467887d55fdf470202 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172643 Reviewed-by: Michael Weghorn <[email protected]> Tested-by: Jenkins Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172653 Reviewed-by: Adolfo Jayme Barrientos <[email protected]>
This fixes the following assert seen with the qt6 VCL plugin when run with a current Qt 6 dev debug build for the tdf#162696 scenario when when native Qt widgets (currently only message dialogs are implmeneted) are explicitly disabled using `SAL_VCL_QT_NO_WELDED_WIDGETS=1`. ASSERT failure in QWidget: "Widgets must be created in the GUI thread.", file /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp, line 958 terminate called after throwing an instance of 'com::sun::star::uno::RuntimeException' Fatal exception: Signal 6 Stack: #0 sal::backtrace_get(unsigned int) at /home/michi/development/git/libreoffice/sal/osl/unx/backtraceapi.cxx:42 #1 (anonymous namespace)::printStack(int) at /home/michi/development/git/libreoffice/sal/osl/unx/signal.cxx:289 #2 (anonymous namespace)::callSystemHandler(int, siginfo_t*, void*) at /home/michi/development/git/libreoffice/sal/osl/unx/signal.cxx:330 #3 (anonymous namespace)::signalHandlerFunction(int, siginfo_t*, void*) at /home/michi/development/git/libreoffice/sal/osl/unx/signal.cxx:427 #4 /lib/x86_64-linux-gnu/libc.so.6(+0x3f590) [0x7f73cbe55590] #5 __pthread_kill_implementation at ./nptl/pthread_kill.c:44 (discriminator 1) #6 raise at ./signal/../sysdeps/posix/raise.c:27 #7 abort at ./stdlib/abort.c:81 #8 /lib/x86_64-linux-gnu/libstdc++.so.6(+0xa1a3d) [0x7f73cbaa1a3d] #9 /lib/x86_64-linux-gnu/libstdc++.so.6(+0xb306a) [0x7f73cbab306a] #10 std::unexpected() in /lib/x86_64-linux-gnu/libstdc++.so.6 #11 /home/michi/development/git/qt5/qtbase/lib/libQt6Core.so.6(+0xed562) [0x7f73b78ed562] #12 QMessageLogger::fatal() const at /home/michi/development/git/qt5/qtbase/src/corelib/global/qlogging.cpp:901 #13 qt_assert_x(char const*, char const*, char const*, int) at /home/michi/development/git/qt5/qtbase/src/corelib/global/qassert.cpp:0 #14 QWidgetPrivate::init(QWidget*, QFlags<Qt::WindowType>) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:959 #15 QWidget::QWidget(QWidgetPrivate&, QWidget*, QFlags<Qt::WindowType>) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:878 #16 QMenuBar::QMenuBar(QWidget*) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qmenubar.cpp:715 #17 QMainWindow::menuBar() const at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qmainwindow.cpp:468 #18 QtFrame::menuBarOffset() const at /home/michi/development/git/libreoffice/vcl/qt6/../qt5/QtFrame.cxx:462 #19 QtFrame::SetDefaultPos() at /home/michi/development/git/libreoffice/vcl/qt6/../qt5/QtFrame.cxx:479 #20 QtFrame::SetPosSize(long, long, long, long, unsigned short) at /home/michi/development/git/libreoffice/vcl/qt6/../qt5/QtFrame.cxx:565 #21 vcl::Window::setPosSizePixel(long, long, long, long, PosSizeFlags) at /home/michi/development/git/libreoffice/vcl/source/window/window.cxx:2786 #22 vcl::Window::SetSizePixel(Size const&) at /home/michi/development/git/libreoffice/vcl/source/window/window2.cxx:1344 #23 SystemWindow::setOptimalLayoutSize(bool) at /home/michi/development/git/libreoffice/vcl/source/window/syswin.cxx:1085 #24 SystemWindow::DoInitialLayout() at /home/michi/development/git/libreoffice/vcl/source/window/syswin.cxx:1098 #25 Dialog::StateChanged(StateChangedType) at /home/michi/development/git/libreoffice/vcl/source/window/dialog.cxx:761 #26 MessageDialog::StateChanged(StateChangedType) at /home/michi/development/git/libreoffice/vcl/source/window/layout.cxx:2706 #27 vcl::Window::CompatStateChanged(StateChangedType) at /home/michi/development/git/libreoffice/vcl/source/window/window.cxx:3921 #28 vcl::Window::ImplCallInitShow() at /home/michi/development/git/libreoffice/vcl/source/window/event.cxx:496 #29 vcl::Window::Show(bool, ShowFlags) at /home/michi/development/git/libreoffice/vcl/source/window/window.cxx:2312 #30 Dialog::ImplStartExecute() at /home/michi/development/git/libreoffice/vcl/source/window/dialog.cxx:1021 #31 Dialog::Execute() at /home/michi/development/git/libreoffice/vcl/source/window/dialog.cxx:1071 #32 SalInstanceDialog::run() at /home/michi/development/git/libreoffice/vcl/source/app/salvtables.cxx:1898 #33 dp_gui::(anonymous namespace)::ProgressCmdEnv::handle(com::sun::star::uno::Reference<com::sun::star::task::XInteractionRequest> const&) at /home/michi/development/git/libreoffice/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx:459 #34 dp_misc::interactContinuation(com::sun::star::uno::Any const&, com::sun::star::uno::Type const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&, bool*, bool*) at /home/michi/development/git/libreoffice/desktop/source/deployment/misc/dp_interact.cxx:114 #35 dp_manager::ExtensionManager::checkUpdate(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::deployment::XPackage> const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&) at /home/michi/development/git/libreoffice/desktop/source/deployment/manager/dp_extensionmanager.cxx:1348 [...] Change-Id: I9eb0ac63c50de3c713328d0466cb01ea90251741 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172685 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]>
This fixes the following assert seen with the qt6 VCL plugin when run with a current Qt 6 dev debug build for the tdf#162696 scenario when when native Qt widgets (currently only message dialogs are implmeneted) are explicitly disabled using `SAL_VCL_QT_NO_WELDED_WIDGETS=1`. ASSERT failure in QWidget: "Widgets must be created in the GUI thread.", file /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp, line 958 terminate called after throwing an instance of 'com::sun::star::uno::RuntimeException' Fatal exception: Signal 6 Stack: #0 sal::backtrace_get(unsigned int) at /home/michi/development/git/libreoffice/sal/osl/unx/backtraceapi.cxx:42 #1 (anonymous namespace)::printStack(int) at /home/michi/development/git/libreoffice/sal/osl/unx/signal.cxx:289 #2 (anonymous namespace)::callSystemHandler(int, siginfo_t*, void*) at /home/michi/development/git/libreoffice/sal/osl/unx/signal.cxx:330 #3 (anonymous namespace)::signalHandlerFunction(int, siginfo_t*, void*) at /home/michi/development/git/libreoffice/sal/osl/unx/signal.cxx:427 #4 /lib/x86_64-linux-gnu/libc.so.6(+0x3f590) [0x7f73cbe55590] #5 __pthread_kill_implementation at ./nptl/pthread_kill.c:44 (discriminator 1) #6 raise at ./signal/../sysdeps/posix/raise.c:27 #7 abort at ./stdlib/abort.c:81 #8 /lib/x86_64-linux-gnu/libstdc++.so.6(+0xa1a3d) [0x7f73cbaa1a3d] #9 /lib/x86_64-linux-gnu/libstdc++.so.6(+0xb306a) [0x7f73cbab306a] #10 std::unexpected() in /lib/x86_64-linux-gnu/libstdc++.so.6 #11 /home/michi/development/git/qt5/qtbase/lib/libQt6Core.so.6(+0xed562) [0x7f73b78ed562] #12 QMessageLogger::fatal() const at /home/michi/development/git/qt5/qtbase/src/corelib/global/qlogging.cpp:901 #13 qt_assert_x(char const*, char const*, char const*, int) at /home/michi/development/git/qt5/qtbase/src/corelib/global/qassert.cpp:0 #14 QWidgetPrivate::init(QWidget*, QFlags<Qt::WindowType>) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:959 #15 QWidget::QWidget(QWidgetPrivate&, QWidget*, QFlags<Qt::WindowType>) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:878 #16 QMenuBar::QMenuBar(QWidget*) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qmenubar.cpp:715 #17 QMainWindow::menuBar() const at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qmainwindow.cpp:468 #18 QtFrame::menuBarOffset() const at /home/michi/development/git/libreoffice/vcl/qt6/../qt5/QtFrame.cxx:462 #19 QtFrame::SetDefaultPos() at /home/michi/development/git/libreoffice/vcl/qt6/../qt5/QtFrame.cxx:479 #20 QtFrame::SetPosSize(long, long, long, long, unsigned short) at /home/michi/development/git/libreoffice/vcl/qt6/../qt5/QtFrame.cxx:565 #21 vcl::Window::setPosSizePixel(long, long, long, long, PosSizeFlags) at /home/michi/development/git/libreoffice/vcl/source/window/window.cxx:2786 #22 vcl::Window::SetSizePixel(Size const&) at /home/michi/development/git/libreoffice/vcl/source/window/window2.cxx:1344 #23 SystemWindow::setOptimalLayoutSize(bool) at /home/michi/development/git/libreoffice/vcl/source/window/syswin.cxx:1085 #24 SystemWindow::DoInitialLayout() at /home/michi/development/git/libreoffice/vcl/source/window/syswin.cxx:1098 #25 Dialog::StateChanged(StateChangedType) at /home/michi/development/git/libreoffice/vcl/source/window/dialog.cxx:761 #26 MessageDialog::StateChanged(StateChangedType) at /home/michi/development/git/libreoffice/vcl/source/window/layout.cxx:2706 #27 vcl::Window::CompatStateChanged(StateChangedType) at /home/michi/development/git/libreoffice/vcl/source/window/window.cxx:3921 #28 vcl::Window::ImplCallInitShow() at /home/michi/development/git/libreoffice/vcl/source/window/event.cxx:496 #29 vcl::Window::Show(bool, ShowFlags) at /home/michi/development/git/libreoffice/vcl/source/window/window.cxx:2312 #30 Dialog::ImplStartExecute() at /home/michi/development/git/libreoffice/vcl/source/window/dialog.cxx:1021 #31 Dialog::Execute() at /home/michi/development/git/libreoffice/vcl/source/window/dialog.cxx:1071 #32 SalInstanceDialog::run() at /home/michi/development/git/libreoffice/vcl/source/app/salvtables.cxx:1898 #33 dp_gui::(anonymous namespace)::ProgressCmdEnv::handle(com::sun::star::uno::Reference<com::sun::star::task::XInteractionRequest> const&) at /home/michi/development/git/libreoffice/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx:459 #34 dp_misc::interactContinuation(com::sun::star::uno::Any const&, com::sun::star::uno::Type const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&, bool*, bool*) at /home/michi/development/git/libreoffice/desktop/source/deployment/misc/dp_interact.cxx:114 #35 dp_manager::ExtensionManager::checkUpdate(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::deployment::XPackage> const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&) at /home/michi/development/git/libreoffice/desktop/source/deployment/manager/dp_extensionmanager.cxx:1348 [...] Change-Id: I9eb0ac63c50de3c713328d0466cb01ea90251741 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172685 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> (cherry picked from commit 5ef991f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172674 Reviewed-by: Adolfo Jayme Barrientos <[email protected]>
The stack trace was: Thread 1 "soffice.bin" received signal SIGSEGV, Segmentation fault. 0x00007ffff32175ee in rtl::OUString::OUString (this=0x7fffffffaac0, str=...) at /home/cono/git/lo/libreoffice/include/rtl/ustring.hxx:197 197 pData = str.pData; #0 0x00007ffff32175ee in rtl::OUString::OUString(rtl::OUString const&) (this=0x7fffffffaac0, str=...) at /home/cono/git/lo/libreoffice/include/rtl/ustring.hxx:197 #1 0x00007ffff3521e4f in GalleryBrowser1::GetItemText(SgaObject const&, GalleryItemFlags) (rObj=..., nItemTextFlags=GalleryItemFlags::Title) at /home/cono/git/lo/libreoffice/svx/source/gallery2/galbrws1.cxx:1412 #2 0x00007ffff352265d in GalleryBrowser1::FillThemeEntries() (this=0x55555c0c9240) at /home/cono/git/lo/libreoffice/svx/source/gallery2/galbrws1.cxx:1505 #3 0x00007ffff351a602 in GalleryBrowser1::GalleryBrowser1(weld::Builder&, Gallery*) (this=0x55555c0c9240, rBuilder=..., pGallery=0x55555c0a4aa0) at /home/cono/git/lo/libreoffice/svx/source/gallery2/galbrws1.cxx:196 #4 0x00007ffff354c291 in svx::sidebar::GalleryControl::GalleryControl(weld::Widget*) (this=0x55555c04e470, pParent=0x55555be85558) at /home/cono/git/lo/libreoffice/svx/source/gallery2/GalleryControl.cxx:32 #5 0x00007ffff45c72ea in std::make_unique<svx::sidebar::GalleryControl, weld::Widget*&>(weld::Widget*&) () at /usr/include/c++/12/bits/unique_ptr.h:1065 #6 0x00007ffff45c5f7a in (anonymous namespace)::PanelFactory::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (this=0x55555c0494e0, rsResourceURL=..., rArguments=...) at /home/cono/git/lo/libreoffice/svx/source/sidebar/PanelFactory.cxx:180 #7 0x00007ffff6412417 in (anonymous namespace)::UIElementFactoryManager::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (this=0x5555564db3e0, ResourceURL=..., Args=...) at /home/cono/git/lo/libreoffice/framework/source/uifactory/uielementfactorymanager.cxx:440 #8 0x00007ffff5593a35 in sfx2::sidebar::SidebarController::CreateUIElement(com::sun::star::uno::Reference<com::sun::star::awt::XWindow> const&, rtl::OUString const&, bool, sfx2::sidebar::Context const&) (this=0x55555b0a8100, rxWindow=..., rsImplementationURL=..., bWantsCanvas=false, rContext=...) at /home/cono/git/lo/libreoffice/sfx2/source/sidebar/SidebarController.cxx:1044 #9 0x00007ffff5593341 in sfx2::sidebar::SidebarController::CreatePanel(std::basic_string_view<char16_t, std::char_traits<char16_t> >, weld::Widget*, bool, sfx2::sidebar::Context const&, VclPtr<sfx2::sidebar::Deck> const&) (this=0x55555b0a8100, rsPanelId=u"GalleryPanel", pParentWindow=0x55555c040718, bIsInitiallyExpanded=true, rContext=..., pDeck=...) at /home/cono/git/lo/libreoffice/sfx2/source/sidebar/SidebarController.cxx:989 #10 0x00007ffff5592150 in sfx2::sidebar::SidebarController::CreatePanels(std::basic_string_view<char16_t, std::char_traits<char16_t> >, sfx2::sidebar::Context const&) (this=0x55555b0a8100, rDeckId=u"GalleryDeck", rContext=...) at /home/cono/git/lo/libreoffice/sfx2/source/sidebar/SidebarController.cxx:789 #11 0x00007ffff5591dbe in sfx2::sidebar::SidebarController::CreateDeck(std::basic_string_view<char16_t, std::char_traits<char16_t> >, sfx2::sidebar::Context const&, bool) (this=0x55555b0a8100, rDeckId=u"GalleryDeck", rContext=..., bForceCreate=false) at /home/cono/git/lo/libreoffice/sfx2/source/sidebar/SidebarController.cxx:737 #12 0x00007ffff5592b96 in sfx2::sidebar::SidebarController::SwitchToDeck(sfx2::sidebar::DeckDescriptor const&, sfx2::sidebar::Context const&) (this=0x55555b0a8100, rDeckDescriptor=..., rContext=...) at /home/cono/git/lo/libreoffice/sfx2/source/sidebar/SidebarController.cxx:899 #13 0x00007ffff5591b89 in sfx2::sidebar::SidebarController::SwitchToDeck(std::basic_string_view<char16_t, std::char_traits<char16_t> >) (this=0x55555b0a8100, rsDeckId=u"GalleryDeck") at /home/cono/git/lo/libreoffice/sfx2/source/sidebar/SidebarController.cxx:708 #14 0x00007ffff5591936 in sfx2::sidebar::SidebarController::OpenThenToggleDeck(rtl::OUString const&) (this=0x55555b0a8100, rsDeckId=...) at /home/cono/git/lo/libreoffice/sfx2/source/sidebar/SidebarController.cxx:664 #15 0x00007ffff558d884 in operator()(rtl::OUString const&) const (__closure=0x7fffffffb7c0, rsDeckId=...) at /home/cono/git/lo/libreoffice/sfx2/source/sidebar/SidebarController.cxx:123 #16 0x00007ffff5598e13 in std::__invoke_impl<void, sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, const SfxViewFrame*)::<lambda(const rtl::OUString&)>&, const rtl::OUString&>(std::__invoke_other, struct {...} &) (__f=...) at /usr/include/c++/12/bits/invoke.h:61 #17 0x00007ffff559851c in std::__invoke_r<void, sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, const SfxViewFrame*)::<lambda(const rtl::OUString&)>&, const rtl::OUString&>(struct {...} &) (__fn=...) at /usr/include/c++/12/bits/invoke.h:111 #18 0x00007ffff5597b76 in std::_Function_handler<void(const rtl::OUString&), sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, const SfxViewFrame*)::<lambda(const rtl::OUString&)> >::_M_invoke(const std::_Any_data &, const rtl::OUString &) (__functor=..., __args#0=...) at /usr/include/c++/12/bits/std_function.h:290 #19 0x00007ffff55e2bed in std::function<void (rtl::OUString const&)>::operator()(rtl::OUString const&) const (this=0x7fffffffb7c0, __args#0=...) at /usr/include/c++/12/bits/std_function.h:591 #20 0x00007ffff55e09aa in sfx2::sidebar::TabBar::Item::HandleClick(rtl::OUString const&) (this=0x55555b133290) at /home/cono/git/lo/libreoffice/sfx2/source/sidebar/TabBar.cxx:274 #21 0x00007ffff55e0933 in sfx2::sidebar::TabBar::Item::LinkStubHandleClick(void*, rtl::OUString const&) (instance=0x55555b133290, data=...) at /home/cono/git/lo/libreoffice/sfx2/source/sidebar/TabBar.cxx:264 #22 0x00007fffe688a6b7 in Link<rtl::OUString const&, void>::Call(rtl::OUString const&) const (this=0x555556f7ee38, data=...) at /home/cono/git/lo/libreoffice/include/tools/link.hxx:111 #23 0x00007fffe68821c9 in weld::Toolbar::signal_clicked(rtl::OUString const&) (this=0x555556f7ee30, rIdent=...) at /home/cono/git/lo/libreoffice/include/vcl/weld.hxx:2512 #24 0x00007fffe683260b in (anonymous namespace)::GtkInstanceToolbar::signal_item_clicked(GtkToolButton*) (this=0x555556f7ebe0, pItem=0x55555b13a9a0) at /home/cono/git/lo/libreoffice/vcl/unx/gtk3/gtkinst.cxx:12009 #25 0x00007fffe6832553 in (anonymous namespace)::GtkInstanceToolbar::signalItemClicked(GtkToolButton*, gpointer) (pItem=0x55555b13a9a0, widget=0x555556f7ebe0) at /home/cono/git/lo/libreoffice/vcl/unx/gtk3/gtkinst.cxx:12000 ... I suspect that there is a corner case of some element giving a nullptr in xSgaObject; but since I can't repro locally, it's just a guess. Other places using AcquireObject in the file do check its return, so it seems reasonable to do the same here. Change-Id: I40c0d64a7219d483ec94f56c56a6df0ce79e9c51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172280 Tested-by: Jenkins Reviewed-by: Mike Kaganski <[email protected]> Signed-off-by: Xisco Fauli <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173027 Reviewed-by: Caolán McNamara <[email protected]>
The stack trace was: Thread 1 "soffice.bin" received signal SIGSEGV, Segmentation fault. 0x00007ffff32175ee in rtl::OUString::OUString (this=0x7fffffffaac0, str=...) at /home/cono/git/lo/libreoffice/include/rtl/ustring.hxx:197 197 pData = str.pData; #0 0x00007ffff32175ee in rtl::OUString::OUString(rtl::OUString const&) (this=0x7fffffffaac0, str=...) at /home/cono/git/lo/libreoffice/include/rtl/ustring.hxx:197 #1 0x00007ffff3521e4f in GalleryBrowser1::GetItemText(SgaObject const&, GalleryItemFlags) (rObj=..., nItemTextFlags=GalleryItemFlags::Title) at /home/cono/git/lo/libreoffice/svx/source/gallery2/galbrws1.cxx:1412 #2 0x00007ffff352265d in GalleryBrowser1::FillThemeEntries() (this=0x55555c0c9240) at /home/cono/git/lo/libreoffice/svx/source/gallery2/galbrws1.cxx:1505 #3 0x00007ffff351a602 in GalleryBrowser1::GalleryBrowser1(weld::Builder&, Gallery*) (this=0x55555c0c9240, rBuilder=..., pGallery=0x55555c0a4aa0) at /home/cono/git/lo/libreoffice/svx/source/gallery2/galbrws1.cxx:196 #4 0x00007ffff354c291 in svx::sidebar::GalleryControl::GalleryControl(weld::Widget*) (this=0x55555c04e470, pParent=0x55555be85558) at /home/cono/git/lo/libreoffice/svx/source/gallery2/GalleryControl.cxx:32 #5 0x00007ffff45c72ea in std::make_unique<svx::sidebar::GalleryControl, weld::Widget*&>(weld::Widget*&) () at /usr/include/c++/12/bits/unique_ptr.h:1065 #6 0x00007ffff45c5f7a in (anonymous namespace)::PanelFactory::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (this=0x55555c0494e0, rsResourceURL=..., rArguments=...) at /home/cono/git/lo/libreoffice/svx/source/sidebar/PanelFactory.cxx:180 #7 0x00007ffff6412417 in (anonymous namespace)::UIElementFactoryManager::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (this=0x5555564db3e0, ResourceURL=..., Args=...) at /home/cono/git/lo/libreoffice/framework/source/uifactory/uielementfactorymanager.cxx:440 #8 0x00007ffff5593a35 in sfx2::sidebar::SidebarController::CreateUIElement(com::sun::star::uno::Reference<com::sun::star::awt::XWindow> const&, rtl::OUString const&, bool, sfx2::sidebar::Context const&) (this=0x55555b0a8100, rxWindow=..., rsImplementationURL=..., bWantsCanvas=false, rContext=...) at /home/cono/git/lo/libreoffice/sfx2/source/sidebar/SidebarController.cxx:1044 #9 0x00007ffff5593341 in sfx2::sidebar::SidebarController::CreatePanel(std::basic_string_view<char16_t, std::char_traits<char16_t> >, weld::Widget*, bool, sfx2::sidebar::Context const&, VclPtr<sfx2::sidebar::Deck> const&) (this=0x55555b0a8100, rsPanelId=u"GalleryPanel", pParentWindow=0x55555c040718, bIsInitiallyExpanded=true, rContext=..., pDeck=...) at /home/cono/git/lo/libreoffice/sfx2/source/sidebar/SidebarController.cxx:989 #10 0x00007ffff5592150 in sfx2::sidebar::SidebarController::CreatePanels(std::basic_string_view<char16_t, std::char_traits<char16_t> >, sfx2::sidebar::Context const&) (this=0x55555b0a8100, rDeckId=u"GalleryDeck", rContext=...) at /home/cono/git/lo/libreoffice/sfx2/source/sidebar/SidebarController.cxx:789 #11 0x00007ffff5591dbe in sfx2::sidebar::SidebarController::CreateDeck(std::basic_string_view<char16_t, std::char_traits<char16_t> >, sfx2::sidebar::Context const&, bool) (this=0x55555b0a8100, rDeckId=u"GalleryDeck", rContext=..., bForceCreate=false) at /home/cono/git/lo/libreoffice/sfx2/source/sidebar/SidebarController.cxx:737 #12 0x00007ffff5592b96 in sfx2::sidebar::SidebarController::SwitchToDeck(sfx2::sidebar::DeckDescriptor const&, sfx2::sidebar::Context const&) (this=0x55555b0a8100, rDeckDescriptor=..., rContext=...) at /home/cono/git/lo/libreoffice/sfx2/source/sidebar/SidebarController.cxx:899 #13 0x00007ffff5591b89 in sfx2::sidebar::SidebarController::SwitchToDeck(std::basic_string_view<char16_t, std::char_traits<char16_t> >) (this=0x55555b0a8100, rsDeckId=u"GalleryDeck") at /home/cono/git/lo/libreoffice/sfx2/source/sidebar/SidebarController.cxx:708 #14 0x00007ffff5591936 in sfx2::sidebar::SidebarController::OpenThenToggleDeck(rtl::OUString const&) (this=0x55555b0a8100, rsDeckId=...) at /home/cono/git/lo/libreoffice/sfx2/source/sidebar/SidebarController.cxx:664 #15 0x00007ffff558d884 in operator()(rtl::OUString const&) const (__closure=0x7fffffffb7c0, rsDeckId=...) at /home/cono/git/lo/libreoffice/sfx2/source/sidebar/SidebarController.cxx:123 #16 0x00007ffff5598e13 in std::__invoke_impl<void, sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, const SfxViewFrame*)::<lambda(const rtl::OUString&)>&, const rtl::OUString&>(std::__invoke_other, struct {...} &) (__f=...) at /usr/include/c++/12/bits/invoke.h:61 #17 0x00007ffff559851c in std::__invoke_r<void, sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, const SfxViewFrame*)::<lambda(const rtl::OUString&)>&, const rtl::OUString&>(struct {...} &) (__fn=...) at /usr/include/c++/12/bits/invoke.h:111 #18 0x00007ffff5597b76 in std::_Function_handler<void(const rtl::OUString&), sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, const SfxViewFrame*)::<lambda(const rtl::OUString&)> >::_M_invoke(const std::_Any_data &, const rtl::OUString &) (__functor=..., __args#0=...) at /usr/include/c++/12/bits/std_function.h:290 #19 0x00007ffff55e2bed in std::function<void (rtl::OUString const&)>::operator()(rtl::OUString const&) const (this=0x7fffffffb7c0, __args#0=...) at /usr/include/c++/12/bits/std_function.h:591 #20 0x00007ffff55e09aa in sfx2::sidebar::TabBar::Item::HandleClick(rtl::OUString const&) (this=0x55555b133290) at /home/cono/git/lo/libreoffice/sfx2/source/sidebar/TabBar.cxx:274 #21 0x00007ffff55e0933 in sfx2::sidebar::TabBar::Item::LinkStubHandleClick(void*, rtl::OUString const&) (instance=0x55555b133290, data=...) at /home/cono/git/lo/libreoffice/sfx2/source/sidebar/TabBar.cxx:264 #22 0x00007fffe688a6b7 in Link<rtl::OUString const&, void>::Call(rtl::OUString const&) const (this=0x555556f7ee38, data=...) at /home/cono/git/lo/libreoffice/include/tools/link.hxx:111 #23 0x00007fffe68821c9 in weld::Toolbar::signal_clicked(rtl::OUString const&) (this=0x555556f7ee30, rIdent=...) at /home/cono/git/lo/libreoffice/include/vcl/weld.hxx:2512 #24 0x00007fffe683260b in (anonymous namespace)::GtkInstanceToolbar::signal_item_clicked(GtkToolButton*) (this=0x555556f7ebe0, pItem=0x55555b13a9a0) at /home/cono/git/lo/libreoffice/vcl/unx/gtk3/gtkinst.cxx:12009 #25 0x00007fffe6832553 in (anonymous namespace)::GtkInstanceToolbar::signalItemClicked(GtkToolButton*, gpointer) (pItem=0x55555b13a9a0, widget=0x555556f7ebe0) at /home/cono/git/lo/libreoffice/vcl/unx/gtk3/gtkinst.cxx:12000 ... I suspect that there is a corner case of some element giving a nullptr in xSgaObject; but since I can't repro locally, it's just a guess. Other places using AcquireObject in the file do check its return, so it seems reasonable to do the same here. Change-Id: I40c0d64a7219d483ec94f56c56a6df0ce79e9c51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172280 Tested-by: Jenkins Reviewed-by: Mike Kaganski <[email protected]> Signed-off-by: Xisco Fauli <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173027 Reviewed-by: Caolán McNamara <[email protected]> Signed-off-by: Xisco Fauli <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173031 Tested-by: Caolán McNamara <[email protected]>
At least with one ASan/UBSan setup of mine using LODE's Clang 12.0.1, ./autogen.sh would occasionally detect -std=gnu11 as the required CC "option to enable C11 features" (which would in turn cause building external/firebird to fail oddly; an issue worth investigations of its own), because Clang would occasionally crash with a SEGV on the corresponding configure test program's first invocation (without -std=gnu11) when invoked with -O2 (and happen to succeed on second invocation with -std=gnu11, so configure thinks that's needed), see below for a relevant config.log excerpt. When CC/CXX are already set (as is the case in this scenario), we could arguably skip the AC_PROG_CC/CXX checks entirely (and thus avoid configure potentially adding -std=gnu11 to CC), but at least AC_PROG_CC also internally sets the GCC shell var, which we use in configure.ac. So better be conservative and just avoid -O2 during AC_PROG_CC/CXX (whatever the autoconf motivation to include it in the first place). > configure:8165: checking for /home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang -fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=local-bounds -fsanitize-blacklist=/home/sberg/lo0/core/sanitize-ubsan-excludelist option to enable C11 features > configure:8180: /home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang -fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=local-bounds -fsanitize-blacklist=/home/sberg/lo0/core/sanitize-ubsan-excludelist -c -g -O2 conftest.c >&5 > PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. > Stack dump: > 0. Program arguments: /home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang -fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=local-bounds -fsanitize-blacklist=/home/sberg/lo0/core/sanitize-ubsan-excludelist -c -g -O2 conftest.c > 1. <eof> parser at end of file > 2. Code generation > #0 0x000055f3a890caf2 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1c3eaf2) > #1 0x000055f3a890a734 llvm::sys::RunSignalHandlers() (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1c3c734) > #2 0x000055f3a887b998 CrashRecoverySignalHandler(int) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1bad998) > #3 0x00007f750d24e520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520) > #4 0x000055f3a93f9cd4 llvm::DIE::getUnitDie() const (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x272bcd4) > #5 0x000055f3a9404574 llvm::DwarfDebug::finishEntityDefinitions() (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2736574) > #6 0x000055f3a941df99 llvm::DwarfDebug::finalizeModuleInfo() (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x274ff99) > #7 0x000055f3a9421128 llvm::DwarfDebug::endModule() (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2753128) > #8 0x000055f3a93f1219 llvm::AsmPrinter::doFinalization(llvm::Module&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2723219) > #9 0x000055f3a82478f5 llvm::FPPassManager::doFinalization(llvm::Module&) (.localalias) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x15798f5) > #10 0x000055f3a8253900 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1585900) > #11 0x000055f3a8bb57d3 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (.constprop.0) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1ee77d3) > #12 0x000055f3a8bb76ea clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1ee96ea) > #13 0x000055f3a9825876 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2b57876) > #14 0x000055f3aa35c549 clang::ParseAST(clang::Sema&, bool, bool) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x368e549) > #15 0x000055f3a91ef2d9 clang::FrontendAction::Execute() (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x25212d9) > #16 0x000055f3a91903a3 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x24c23a3) > #17 0x000055f3a92a2fd8 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x25d4fd8) > #18 0x000055f3a7798815 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0xaca815) > #19 0x000055f3a77961a7 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0xac81a7) > #20 0x000055f3a9039689 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const::'lambda'()>(long) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x236b689) > #21 0x000055f3a887baa7 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1badaa7) > #22 0x000055f3a903a802 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const (.part.0) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x236c802) > #23 0x000055f3a900fbec clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2341bec) > #24 0x000055f3a9010679 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2342679) > #25 0x000055f3a901e8f1 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x23508f1) > #26 0x000055f3a7717e6f main (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0xa49e6f) > #27 0x00007f750d235d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90) > #28 0x00007f750d235e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40) > #29 0x000055f3a7795b55 _start (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0xac7b55) > clang-12: error: clang frontend command failed with exit code 139 (use -v to see invocation) > clang version 12.0.1 (https://github.com/llvm/llvm-project.git fed41342a82f5a3a9201819a82bf7a48313e296b) > Target: x86_64-unknown-linux-gnu > Thread model: posix > InstalledDir: /home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin > clang-12: note: diagnostic msg: > ******************** > > PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: > Preprocessed source(s) and associated run script(s) are located at: > clang-12: note: diagnostic msg: /tmp/conftest-968380.c > clang-12: note: diagnostic msg: /tmp/conftest-968380.sh > clang-12: note: diagnostic msg: > > ******************** > configure:8180: $? = 139 > configure: failed program was: > | /* confdefs.h */ > | #define PACKAGE_NAME "LibreOffice" > | #define PACKAGE_TARNAME "libreoffice" > | #define PACKAGE_VERSION "24.8.0.0.alpha0+" > | #define PACKAGE_STRING "LibreOffice 24.8.0.0.alpha0+" > | #define PACKAGE_BUGREPORT "" > | #define PACKAGE_URL "http://documentfoundation.org/" > | #define LIBO_VERSION_MAJOR 24 > | #define LIBO_VERSION_MINOR 8 > | #define LIBO_VERSION_MICRO 0 > | #define LIBO_VERSION_PATCH 0 > | #define LIBO_THIS_YEAR 2024 > | #define SRCDIR "/home/sberg/lo0/core" > | #define SRC_ROOT "/home/sberg/lo0/core" > | #define BUILDDIR "/home/sberg/lo0/core" > | #define USE_HEADLESS_CODE 1 > | #define ENABLE_HEADLESS 1 > | /* end confdefs.h. */ > | > | /* Does the compiler advertise C89 conformance? > | Do not test the value of __STDC__, because some compilers set it to 0 > | while being otherwise adequately conformant. */ > | #if !defined __STDC__ > | # error "Compiler does not advertise C89 conformance" > | #endif > | > | #include <stddef.h> > | #include <stdarg.h> > | struct stat; > | /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ > | struct buf { int x; }; > | struct buf * (*rcsopen) (struct buf *, struct stat *, int); > | static char *e (p, i) > | char **p; > | int i; > | { > | return p[i]; > | } > | static char *f (char * (*g) (char **, int), char **p, ...) > | { > | char *s; > | va_list v; > | va_start (v,p); > | s = g (p, va_arg (v,int)); > | va_end (v); > | return s; > | } > | > | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has > | function prototypes and stuff, but not \xHH hex character constants. > | These do not provoke an error unfortunately, instead are silently treated > | as an "x". The following induces an error, until -std is added to get > | proper ANSI mode. Curiously \x00 != x always comes out true, for an > | array size at least. It is necessary to write \x00 == 0 to get something > | that is true only with -std. */ > | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; > | > | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters > | inside strings and character constants. */ > | #define FOO(x) 'x' > | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; > | > | int test (int i, double x); > | struct s1 {int (*f) (int a);}; > | struct s2 {int (*f) (double a);}; > | int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), > | int, int); > | > | // Does the compiler advertise C99 conformance? > | #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L > | # error "Compiler does not advertise C99 conformance" > | #endif > | > | #include <stdbool.h> > | extern int puts (const char *); > | extern int printf (const char *, ...); > | extern int dprintf (int, const char *, ...); > | extern void *malloc (size_t); > | > | // Check varargs macros. These examples are taken from C99 6.10.3.5. > | // dprintf is used instead of fprintf to avoid needing to declare > | // FILE and stderr. > | #define debug(...) dprintf (2, __VA_ARGS__) > | #define showlist(...) puts (#__VA_ARGS__) > | #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) > | static void > | test_varargs_macros (void) > | { > | int x = 1234; > | int y = 5678; > | debug ("Flag"); > | debug ("X = %d\n", x); > | showlist (The first, second, and third items.); > | report (x>y, "x is %d but y is %d", x, y); > | } > | > | // Check long long types. > | #define BIG64 18446744073709551615ull > | #define BIG32 4294967295ul > | #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) > | #if !BIG_OK > | #error "your preprocessor is broken" > | #endif > | #if BIG_OK > | #else > | #error "your preprocessor is broken" > | #endif > | static long long int bignum = -9223372036854775807LL; > | static unsigned long long int ubignum = BIG64; > | > | struct incomplete_array > | { > | int datasize; > | double data[]; > | }; > | > | struct named_init { > | int number; > | const wchar_t *name; > | double average; > | }; > | > | typedef const char *ccp; > | > | static inline int > | test_restrict (ccp restrict text) > | { > | // See if C++-style comments work. > | // Iterate through items via the restricted pointer. > | // Also check for declarations in for loops. > | for (unsigned int i = 0; *(text+i) != '\0'; ++i) > | continue; > | return 0; > | } > | > | // Check varargs and va_copy. > | static bool > | test_varargs (const char *format, ...) > | { > | va_list args; > | va_start (args, format); > | va_list args_copy; > | va_copy (args_copy, args); > | > | const char *str = ""; > | int number = 0; > | float fnumber = 0; > | > | while (*format) > | { > | switch (*format++) > | { > | case 's': // string > | str = va_arg (args_copy, const char *); > | break; > | case 'd': // int > | number = va_arg (args_copy, int); > | break; > | case 'f': // float > | fnumber = va_arg (args_copy, double); > | break; > | default: > | break; > | } > | } > | va_end (args_copy); > | va_end (args); > | > | return *str && number && fnumber; > | } > | > | > | // Does the compiler advertise C11 conformance? > | #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L > | # error "Compiler does not advertise C11 conformance" > | #endif > | > | // Check _Alignas. > | char _Alignas (double) aligned_as_double; > | char _Alignas (0) no_special_alignment; > | extern char aligned_as_int; > | char _Alignas (0) _Alignas (int) aligned_as_int; > | > | // Check _Alignof. > | enum > | { > | int_alignment = _Alignof (int), > | int_array_alignment = _Alignof (int[100]), > | char_alignment = _Alignof (char) > | }; > | _Static_assert (0 < -_Alignof (int), "_Alignof is signed"); > | > | // Check _Noreturn. > | int _Noreturn does_not_return (void) { for (;;) continue; } > | > | // Check _Static_assert. > | struct test_static_assert > | { > | int x; > | _Static_assert (sizeof (int) <= sizeof (long int), > | "_Static_assert does not work in struct"); > | long int y; > | }; > | > | // Check UTF-8 literals. > | #define u8 syntax error! > | char const utf8_literal[] = u8"happens to be ASCII" "another string"; > | > | // Check duplicate typedefs. > | typedef long *long_ptr; > | typedef long int *long_ptr; > | typedef long_ptr long_ptr; > | > | // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. > | struct anonymous > | { > | union { > | struct { int i; int j; }; > | struct { int k; long int l; } w; > | }; > | int m; > | } v1; > | > | > | int > | main (int argc, char **argv) > | { > | int ok = 0; > | > | ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); > | > | > | // Check bool. > | _Bool success = false; > | success |= (argc != 0); > | > | // Check restrict. > | if (test_restrict ("String literal") == 0) > | success = true; > | char *restrict newvar = "Another string"; > | > | // Check varargs. > | success &= test_varargs ("s, d' f .", "string", 65, 34.234); > | test_varargs_macros (); > | > | // Check flexible array members. > | struct incomplete_array *ia = > | malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); > | ia->datasize = 10; > | for (int i = 0; i < ia->datasize; ++i) > | ia->data[i] = i * 1.234; > | > | // Check named initializers. > | struct named_init ni = { > | .number = 34, > | .name = L"Test wide string", > | .average = 543.34343, > | }; > | > | ni.number = 58; > | > | int dynamic_array[ni.number]; > | dynamic_array[0] = argv[0][0]; > | dynamic_array[ni.number - 1] = 543; > | > | // work around unused variable warnings > | ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' > | || dynamic_array[ni.number - 1] != 543); > | > | > | _Static_assert ((offsetof (struct anonymous, i) > | == offsetof (struct anonymous, w.k)), > | "Anonymous union alignment botch"); > | v1.i = 2; > | v1.w.k = 5; > | ok |= v1.i != 5; > | > | return ok; > | } > | > configure:8180: /home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang -fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=local-bounds -fsanitize-blacklist=/home/sberg/lo0/core/sanitize-ubsan-excludelist -std=gnu11 -c -g -O2 conftest.c >&5 > configure:8180: $? = 0 > configure:8201: result: -std=gnu11 Change-Id: I9122d0d853d0010155d57cb1d1d56f7c453d5208 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165904 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> (cherry picked from commit 42f6e89) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173098 Tested-by: allotropia jenkins <[email protected]>
At least with one ASan/UBSan setup of mine using LODE's Clang 12.0.1, ./autogen.sh would occasionally detect -std=gnu11 as the required CC "option to enable C11 features" (which would in turn cause building external/firebird to fail oddly; an issue worth investigations of its own), because Clang would occasionally crash with a SEGV on the corresponding configure test program's first invocation (without -std=gnu11) when invoked with -O2 (and happen to succeed on second invocation with -std=gnu11, so configure thinks that's needed), see below for a relevant config.log excerpt. When CC/CXX are already set (as is the case in this scenario), we could arguably skip the AC_PROG_CC/CXX checks entirely (and thus avoid configure potentially adding -std=gnu11 to CC), but at least AC_PROG_CC also internally sets the GCC shell var, which we use in configure.ac. So better be conservative and just avoid -O2 during AC_PROG_CC/CXX (whatever the autoconf motivation to include it in the first place). > configure:8165: checking for /home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang -fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=local-bounds -fsanitize-blacklist=/home/sberg/lo0/core/sanitize-ubsan-excludelist option to enable C11 features > configure:8180: /home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang -fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=local-bounds -fsanitize-blacklist=/home/sberg/lo0/core/sanitize-ubsan-excludelist -c -g -O2 conftest.c >&5 > PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. > Stack dump: > 0. Program arguments: /home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang -fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=local-bounds -fsanitize-blacklist=/home/sberg/lo0/core/sanitize-ubsan-excludelist -c -g -O2 conftest.c > 1. <eof> parser at end of file > 2. Code generation > #0 0x000055f3a890caf2 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1c3eaf2) > #1 0x000055f3a890a734 llvm::sys::RunSignalHandlers() (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1c3c734) > #2 0x000055f3a887b998 CrashRecoverySignalHandler(int) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1bad998) > #3 0x00007f750d24e520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520) > #4 0x000055f3a93f9cd4 llvm::DIE::getUnitDie() const (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x272bcd4) > #5 0x000055f3a9404574 llvm::DwarfDebug::finishEntityDefinitions() (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2736574) > #6 0x000055f3a941df99 llvm::DwarfDebug::finalizeModuleInfo() (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x274ff99) > #7 0x000055f3a9421128 llvm::DwarfDebug::endModule() (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2753128) > #8 0x000055f3a93f1219 llvm::AsmPrinter::doFinalization(llvm::Module&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2723219) > #9 0x000055f3a82478f5 llvm::FPPassManager::doFinalization(llvm::Module&) (.localalias) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x15798f5) > #10 0x000055f3a8253900 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1585900) > #11 0x000055f3a8bb57d3 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (.constprop.0) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1ee77d3) > #12 0x000055f3a8bb76ea clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1ee96ea) > #13 0x000055f3a9825876 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2b57876) > #14 0x000055f3aa35c549 clang::ParseAST(clang::Sema&, bool, bool) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x368e549) > #15 0x000055f3a91ef2d9 clang::FrontendAction::Execute() (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x25212d9) > #16 0x000055f3a91903a3 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x24c23a3) > #17 0x000055f3a92a2fd8 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x25d4fd8) > #18 0x000055f3a7798815 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0xaca815) > #19 0x000055f3a77961a7 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0xac81a7) > #20 0x000055f3a9039689 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const::'lambda'()>(long) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x236b689) > #21 0x000055f3a887baa7 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1badaa7) > #22 0x000055f3a903a802 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const (.part.0) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x236c802) > #23 0x000055f3a900fbec clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2341bec) > #24 0x000055f3a9010679 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2342679) > #25 0x000055f3a901e8f1 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x23508f1) > #26 0x000055f3a7717e6f main (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0xa49e6f) > #27 0x00007f750d235d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90) > #28 0x00007f750d235e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40) > #29 0x000055f3a7795b55 _start (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0xac7b55) > clang-12: error: clang frontend command failed with exit code 139 (use -v to see invocation) > clang version 12.0.1 (https://github.com/llvm/llvm-project.git fed41342a82f5a3a9201819a82bf7a48313e296b) > Target: x86_64-unknown-linux-gnu > Thread model: posix > InstalledDir: /home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin > clang-12: note: diagnostic msg: > ******************** > > PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: > Preprocessed source(s) and associated run script(s) are located at: > clang-12: note: diagnostic msg: /tmp/conftest-968380.c > clang-12: note: diagnostic msg: /tmp/conftest-968380.sh > clang-12: note: diagnostic msg: > > ******************** > configure:8180: $? = 139 > configure: failed program was: > | /* confdefs.h */ > | #define PACKAGE_NAME "LibreOffice" > | #define PACKAGE_TARNAME "libreoffice" > | #define PACKAGE_VERSION "24.8.0.0.alpha0+" > | #define PACKAGE_STRING "LibreOffice 24.8.0.0.alpha0+" > | #define PACKAGE_BUGREPORT "" > | #define PACKAGE_URL "http://documentfoundation.org/" > | #define LIBO_VERSION_MAJOR 24 > | #define LIBO_VERSION_MINOR 8 > | #define LIBO_VERSION_MICRO 0 > | #define LIBO_VERSION_PATCH 0 > | #define LIBO_THIS_YEAR 2024 > | #define SRCDIR "/home/sberg/lo0/core" > | #define SRC_ROOT "/home/sberg/lo0/core" > | #define BUILDDIR "/home/sberg/lo0/core" > | #define USE_HEADLESS_CODE 1 > | #define ENABLE_HEADLESS 1 > | /* end confdefs.h. */ > | > | /* Does the compiler advertise C89 conformance? > | Do not test the value of __STDC__, because some compilers set it to 0 > | while being otherwise adequately conformant. */ > | #if !defined __STDC__ > | # error "Compiler does not advertise C89 conformance" > | #endif > | > | #include <stddef.h> > | #include <stdarg.h> > | struct stat; > | /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ > | struct buf { int x; }; > | struct buf * (*rcsopen) (struct buf *, struct stat *, int); > | static char *e (p, i) > | char **p; > | int i; > | { > | return p[i]; > | } > | static char *f (char * (*g) (char **, int), char **p, ...) > | { > | char *s; > | va_list v; > | va_start (v,p); > | s = g (p, va_arg (v,int)); > | va_end (v); > | return s; > | } > | > | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has > | function prototypes and stuff, but not \xHH hex character constants. > | These do not provoke an error unfortunately, instead are silently treated > | as an "x". The following induces an error, until -std is added to get > | proper ANSI mode. Curiously \x00 != x always comes out true, for an > | array size at least. It is necessary to write \x00 == 0 to get something > | that is true only with -std. */ > | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; > | > | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters > | inside strings and character constants. */ > | #define FOO(x) 'x' > | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; > | > | int test (int i, double x); > | struct s1 {int (*f) (int a);}; > | struct s2 {int (*f) (double a);}; > | int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), > | int, int); > | > | // Does the compiler advertise C99 conformance? > | #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L > | # error "Compiler does not advertise C99 conformance" > | #endif > | > | #include <stdbool.h> > | extern int puts (const char *); > | extern int printf (const char *, ...); > | extern int dprintf (int, const char *, ...); > | extern void *malloc (size_t); > | > | // Check varargs macros. These examples are taken from C99 6.10.3.5. > | // dprintf is used instead of fprintf to avoid needing to declare > | // FILE and stderr. > | #define debug(...) dprintf (2, __VA_ARGS__) > | #define showlist(...) puts (#__VA_ARGS__) > | #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) > | static void > | test_varargs_macros (void) > | { > | int x = 1234; > | int y = 5678; > | debug ("Flag"); > | debug ("X = %d\n", x); > | showlist (The first, second, and third items.); > | report (x>y, "x is %d but y is %d", x, y); > | } > | > | // Check long long types. > | #define BIG64 18446744073709551615ull > | #define BIG32 4294967295ul > | #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) > | #if !BIG_OK > | #error "your preprocessor is broken" > | #endif > | #if BIG_OK > | #else > | #error "your preprocessor is broken" > | #endif > | static long long int bignum = -9223372036854775807LL; > | static unsigned long long int ubignum = BIG64; > | > | struct incomplete_array > | { > | int datasize; > | double data[]; > | }; > | > | struct named_init { > | int number; > | const wchar_t *name; > | double average; > | }; > | > | typedef const char *ccp; > | > | static inline int > | test_restrict (ccp restrict text) > | { > | // See if C++-style comments work. > | // Iterate through items via the restricted pointer. > | // Also check for declarations in for loops. > | for (unsigned int i = 0; *(text+i) != '\0'; ++i) > | continue; > | return 0; > | } > | > | // Check varargs and va_copy. > | static bool > | test_varargs (const char *format, ...) > | { > | va_list args; > | va_start (args, format); > | va_list args_copy; > | va_copy (args_copy, args); > | > | const char *str = ""; > | int number = 0; > | float fnumber = 0; > | > | while (*format) > | { > | switch (*format++) > | { > | case 's': // string > | str = va_arg (args_copy, const char *); > | break; > | case 'd': // int > | number = va_arg (args_copy, int); > | break; > | case 'f': // float > | fnumber = va_arg (args_copy, double); > | break; > | default: > | break; > | } > | } > | va_end (args_copy); > | va_end (args); > | > | return *str && number && fnumber; > | } > | > | > | // Does the compiler advertise C11 conformance? > | #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L > | # error "Compiler does not advertise C11 conformance" > | #endif > | > | // Check _Alignas. > | char _Alignas (double) aligned_as_double; > | char _Alignas (0) no_special_alignment; > | extern char aligned_as_int; > | char _Alignas (0) _Alignas (int) aligned_as_int; > | > | // Check _Alignof. > | enum > | { > | int_alignment = _Alignof (int), > | int_array_alignment = _Alignof (int[100]), > | char_alignment = _Alignof (char) > | }; > | _Static_assert (0 < -_Alignof (int), "_Alignof is signed"); > | > | // Check _Noreturn. > | int _Noreturn does_not_return (void) { for (;;) continue; } > | > | // Check _Static_assert. > | struct test_static_assert > | { > | int x; > | _Static_assert (sizeof (int) <= sizeof (long int), > | "_Static_assert does not work in struct"); > | long int y; > | }; > | > | // Check UTF-8 literals. > | #define u8 syntax error! > | char const utf8_literal[] = u8"happens to be ASCII" "another string"; > | > | // Check duplicate typedefs. > | typedef long *long_ptr; > | typedef long int *long_ptr; > | typedef long_ptr long_ptr; > | > | // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. > | struct anonymous > | { > | union { > | struct { int i; int j; }; > | struct { int k; long int l; } w; > | }; > | int m; > | } v1; > | > | > | int > | main (int argc, char **argv) > | { > | int ok = 0; > | > | ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); > | > | > | // Check bool. > | _Bool success = false; > | success |= (argc != 0); > | > | // Check restrict. > | if (test_restrict ("String literal") == 0) > | success = true; > | char *restrict newvar = "Another string"; > | > | // Check varargs. > | success &= test_varargs ("s, d' f .", "string", 65, 34.234); > | test_varargs_macros (); > | > | // Check flexible array members. > | struct incomplete_array *ia = > | malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); > | ia->datasize = 10; > | for (int i = 0; i < ia->datasize; ++i) > | ia->data[i] = i * 1.234; > | > | // Check named initializers. > | struct named_init ni = { > | .number = 34, > | .name = L"Test wide string", > | .average = 543.34343, > | }; > | > | ni.number = 58; > | > | int dynamic_array[ni.number]; > | dynamic_array[0] = argv[0][0]; > | dynamic_array[ni.number - 1] = 543; > | > | // work around unused variable warnings > | ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' > | || dynamic_array[ni.number - 1] != 543); > | > | > | _Static_assert ((offsetof (struct anonymous, i) > | == offsetof (struct anonymous, w.k)), > | "Anonymous union alignment botch"); > | v1.i = 2; > | v1.w.k = 5; > | ok |= v1.i != 5; > | > | return ok; > | } > | > configure:8180: /home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang -fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=local-bounds -fsanitize-blacklist=/home/sberg/lo0/core/sanitize-ubsan-excludelist -std=gnu11 -c -g -O2 conftest.c >&5 > configure:8180: $? = 0 > configure:8201: result: -std=gnu11 Change-Id: I9122d0d853d0010155d57cb1d1d56f7c453d5208 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165904 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> (cherry picked from commit 42f6e89) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173098 Tested-by: allotropia jenkins <[email protected]>
...in code newly introduced in 135ce25 "tdf#146487 Don't show generic diagram title when there is an empty title given", which caused CppunitTest_chart2_export2 to fail with > /oox/inc/drawingml/chart/plotareaconverter.hxx:78:62: runtime error: load of value 222, which is not a valid value for type 'bool' > #0 0x7f95cd9ed87c in oox::drawingml::chart::PlotAreaConverter::isSingleSeriesTitle() const /oox/inc/drawingml/chart/plotareaconverter.hxx:78:62 > #1 0x7f95cd9e506f in oox::drawingml::chart::ChartSpaceConverter::convertFromModel(com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, com::sun::star::awt::Point const&) /oox/source/drawingml/chart/chartspaceconverter.cxx:189:53 > #2 0x7f95cd9b6c34 in oox::drawingml::chart::ChartConverter::convertFromModel(oox::core::XmlFilterBase&, oox::drawingml::chart::ChartSpaceModel&, com::sun::star::uno::Reference<com::sun::star::chart2::XChartDocument> const&, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, com::sun::star::awt::Point const&, com::sun::star::awt::Size const&) /oox/source/drawingml/chart/chartconverter.cxx:93:20 > #3 0x7f95ce548f59 in oox::drawingml::Shape::finalizeXShape(oox::core::XmlFilterBase&, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&) /oox/source/drawingml/shape.cxx:2245:50 > #4 0x7f95438150b2 in oox::xls::Shape::finalizeXShape(oox::core::XmlFilterBase&, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&) /sc/source/filter/oox/drawingfragment.cxx:113:30 > #5 0x7f95ce5267bb in oox::drawingml::Shape::createAndInsert(oox::core::XmlFilterBase&, rtl::OUString const&, oox::drawingml::Theme const*, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, bool, bool, basegfx::B2DHomMatrix&, oox::drawingml::FillProperties const&, std::shared_ptr<oox::drawingml::Shape>) /oox/source/drawingml/shape.cxx:1964:9 > #6 0x7f95ce4edb54 in oox::drawingml::Shape::addShape(oox::core::XmlFilterBase&, oox::drawingml::Theme const*, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, basegfx::B2DHomMatrix const&, oox::drawingml::FillProperties const&, std::__debug::map<rtl::OUString, std::shared_ptr<oox::drawingml::Shape>, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, std::shared_ptr<oox::drawingml::Shape> > > >*, std::shared_ptr<oox::drawingml::Shape>) /oox/source/drawingml/shape.cxx:366:41 > #7 0x7f954381ef79 in oox::xls::DrawingFragment::onEndElement() /sc/source/filter/oox/drawingfragment.cxx:335:30 > #8 0x7f95cdcaee54 in oox::core::ContextHandler2Helper::implEndElement(int) /oox/source/core/contexthandler2.cxx:125:9 > #9 0x7f95cdd5c116 in oox::core::FragmentHandler2::endFastElement(int) /oox/source/core/fragmenthandler2.cxx:91:5 > #10 0x7f95caf68fca in (anonymous namespace)::Entity::endElement() /sax/source/fastparser/fastparser.cxx:514:27 > #11 0x7f95caf68998 in sax_fastparser::FastSaxParserImpl::callbackEndElement() /sax/source/fastparser/fastparser.cxx:1331:17 > #12 0x7f95caf58444 in (anonymous namespace)::call_callbackEndElement(void*, unsigned char const*, unsigned char const*, unsigned char const*) /sax/source/fastparser/fastparser.cxx:338:18 > #13 0x7f960adebeda in xmlParseEndTag2 /workdir/UnpackedTarball/libxml2/parser.c:10090:2 > #14 0x7f960ad929b5 in xmlParseTryOrFinish /workdir/UnpackedTarball/libxml2/parser.c:11868:14 > #15 0x7f960ad86334 in xmlParseChunk /workdir/UnpackedTarball/libxml2/parser.c:12151:5 > #16 0x7f95caf53231 in sax_fastparser::FastSaxParserImpl::parse() /sax/source/fastparser/fastparser.cxx:1085:21 > #17 0x7f95caf4cd18 in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:890:9 > #18 0x7f95caf6e950 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:1470:13 > #19 0x7f95cdce50d1 in oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) /oox/source/core/fastparser.cxx:121:15 > #20 0x7f95cdce5868 in oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) /oox/source/core/fastparser.cxx:129:5 > #21 0x7f95cddbb234 in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) /oox/source/core/xmlfilterbase.cxx:414:21 > #22 0x7f95cddb9b8d in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&) /oox/source/core/xmlfilterbase.cxx:344:12 > #23 0x7f95441ceaa8 in oox::xls::WorkbookHelper::importOoxFragment(rtl::Reference<oox::core::FragmentHandler> const&) /sc/source/filter/oox/workbookhelper.cxx:1046:27 > #24 0x7f95442797f1 in oox::xls::WorksheetGlobals::finalizeDrawings() /sc/source/filter/oox/worksheethelper.cxx:1373:9 > #25 0x7f95442789e0 in oox::xls::WorksheetGlobals::finalizeDrawingImport() /sc/source/filter/oox/worksheethelper.cxx:996:5 > #26 0x7f954428744d in oox::xls::WorksheetHelper::finalizeDrawingImport() /sc/source/filter/oox/worksheethelper.cxx:1637:17 > #27 0x7f95441771de in oox::xls::WorkbookFragment::finalizeImport() /sc/source/filter/oox/workbookfragment.cxx:511:18 > #28 0x7f95cdd5b3ae in oox::core::FragmentHandler2::endDocument() /oox/source/core/fragmenthandler2.cxx:53:5 > #29 0x7f95caf4cfc2 in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:896:36 > #30 0x7f95caf6e950 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:1470:13 > #31 0x7f95cdce50d1 in oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) /oox/source/core/fastparser.cxx:121:15 > #32 0x7f95cdce5868 in oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) /oox/source/core/fastparser.cxx:129:5 > #33 0x7f95cddbb234 in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) /oox/source/core/xmlfilterbase.cxx:414:21 > #34 0x7f95cddb9b8d in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&) /oox/source/core/xmlfilterbase.cxx:344:12 > #35 0x7f95435c4daa in oox::xls::ExcelFilter::importDocument() /sc/source/filter/oox/excelfilter.cxx:113:25 > #36 0x7f95cdcf953b in oox::core::FilterBase::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /oox/source/core/filterbase.cxx:488:49 > #37 0x7f95435c7733 in oox::xls::ExcelFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sc/source/filter/oox/excelfilter.cxx:176:25 > #38 0x7f95857c5b40 in SfxObjectShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) /sfx2/source/doc/objstor.cxx:2393:34 > #39 0x7f9585781c6a in SfxObjectShell::DoLoad(SfxMedium*) /sfx2/source/doc/objstor.cxx:761:23 > #40 0x7f95859a9652 in SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sfx2/source/doc/sfxbasemodel.cxx:1980:36 > #41 0x7f95862145e9 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&) /sfx2/source/view/frmload.cxx:720:28 > #42 0x7f95536a9900 in framework::LoadEnv::impl_loadContent() /framework/source/loadenv/loadenv.cxx:1176:37 > #43 0x7f95536a091b in framework::LoadEnv::start() /framework/source/loadenv/loadenv.cxx:412:20 > #44 0x7f9553698f59 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) /framework/source/loadenv/loadenv.cxx:308:5 > #45 0x7f95536946e7 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&) /framework/source/loadenv/loadenv.cxx:168:14 > #46 0x7f955376867d in framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/desktop.cxx:591:16 > #47 0x7f95537688a6 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&) /framework/source/services/desktop.cxx > #48 0x7f9569f7cafa in unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /unotest/source/cpp/macros_test.cxx:71:62 > #49 0x7f9580718c56 in UnoApiTest::loadWithParams(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /test/source/unoapi_test.cxx:126:19 > #50 0x7f9580717ef8 in UnoApiTest::load(rtl::OUString const&, char const*) /test/source/unoapi_test.cxx:108:5 > #51 0x7f9580719254 in UnoApiTest::loadFromFile(std::basic_string_view<char16_t, std::char_traits<char16_t> >, char const*) /test/source/unoapi_test.cxx:132:5 > #52 0x7f95d8bf1018 in testTdf123647::TestBody() /chart2/qa/extras/chart2export2.cxx:1242:5 (<https://ci.libreoffice.org//job/lo_ubsan/3048/>) Change-Id: I870d811e78b8c55b84627ae609f98f623465dd9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162294 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> (cherry picked from commit 3fb9859)
...in code newly introduced in 135ce25 "tdf#146487 Don't show generic diagram title when there is an empty title given", which caused CppunitTest_chart2_export2 to fail with > /oox/inc/drawingml/chart/plotareaconverter.hxx:78:62: runtime error: load of value 222, which is not a valid value for type 'bool' > #0 0x7f95cd9ed87c in oox::drawingml::chart::PlotAreaConverter::isSingleSeriesTitle() const /oox/inc/drawingml/chart/plotareaconverter.hxx:78:62 > #1 0x7f95cd9e506f in oox::drawingml::chart::ChartSpaceConverter::convertFromModel(com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, com::sun::star::awt::Point const&) /oox/source/drawingml/chart/chartspaceconverter.cxx:189:53 > #2 0x7f95cd9b6c34 in oox::drawingml::chart::ChartConverter::convertFromModel(oox::core::XmlFilterBase&, oox::drawingml::chart::ChartSpaceModel&, com::sun::star::uno::Reference<com::sun::star::chart2::XChartDocument> const&, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, com::sun::star::awt::Point const&, com::sun::star::awt::Size const&) /oox/source/drawingml/chart/chartconverter.cxx:93:20 > #3 0x7f95ce548f59 in oox::drawingml::Shape::finalizeXShape(oox::core::XmlFilterBase&, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&) /oox/source/drawingml/shape.cxx:2245:50 > #4 0x7f95438150b2 in oox::xls::Shape::finalizeXShape(oox::core::XmlFilterBase&, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&) /sc/source/filter/oox/drawingfragment.cxx:113:30 > #5 0x7f95ce5267bb in oox::drawingml::Shape::createAndInsert(oox::core::XmlFilterBase&, rtl::OUString const&, oox::drawingml::Theme const*, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, bool, bool, basegfx::B2DHomMatrix&, oox::drawingml::FillProperties const&, std::shared_ptr<oox::drawingml::Shape>) /oox/source/drawingml/shape.cxx:1964:9 > #6 0x7f95ce4edb54 in oox::drawingml::Shape::addShape(oox::core::XmlFilterBase&, oox::drawingml::Theme const*, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, basegfx::B2DHomMatrix const&, oox::drawingml::FillProperties const&, std::__debug::map<rtl::OUString, std::shared_ptr<oox::drawingml::Shape>, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, std::shared_ptr<oox::drawingml::Shape> > > >*, std::shared_ptr<oox::drawingml::Shape>) /oox/source/drawingml/shape.cxx:366:41 > #7 0x7f954381ef79 in oox::xls::DrawingFragment::onEndElement() /sc/source/filter/oox/drawingfragment.cxx:335:30 > #8 0x7f95cdcaee54 in oox::core::ContextHandler2Helper::implEndElement(int) /oox/source/core/contexthandler2.cxx:125:9 > #9 0x7f95cdd5c116 in oox::core::FragmentHandler2::endFastElement(int) /oox/source/core/fragmenthandler2.cxx:91:5 > #10 0x7f95caf68fca in (anonymous namespace)::Entity::endElement() /sax/source/fastparser/fastparser.cxx:514:27 > #11 0x7f95caf68998 in sax_fastparser::FastSaxParserImpl::callbackEndElement() /sax/source/fastparser/fastparser.cxx:1331:17 > #12 0x7f95caf58444 in (anonymous namespace)::call_callbackEndElement(void*, unsigned char const*, unsigned char const*, unsigned char const*) /sax/source/fastparser/fastparser.cxx:338:18 > #13 0x7f960adebeda in xmlParseEndTag2 /workdir/UnpackedTarball/libxml2/parser.c:10090:2 > #14 0x7f960ad929b5 in xmlParseTryOrFinish /workdir/UnpackedTarball/libxml2/parser.c:11868:14 > #15 0x7f960ad86334 in xmlParseChunk /workdir/UnpackedTarball/libxml2/parser.c:12151:5 > #16 0x7f95caf53231 in sax_fastparser::FastSaxParserImpl::parse() /sax/source/fastparser/fastparser.cxx:1085:21 > #17 0x7f95caf4cd18 in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:890:9 > #18 0x7f95caf6e950 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:1470:13 > #19 0x7f95cdce50d1 in oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) /oox/source/core/fastparser.cxx:121:15 > #20 0x7f95cdce5868 in oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) /oox/source/core/fastparser.cxx:129:5 > #21 0x7f95cddbb234 in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) /oox/source/core/xmlfilterbase.cxx:414:21 > #22 0x7f95cddb9b8d in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&) /oox/source/core/xmlfilterbase.cxx:344:12 > #23 0x7f95441ceaa8 in oox::xls::WorkbookHelper::importOoxFragment(rtl::Reference<oox::core::FragmentHandler> const&) /sc/source/filter/oox/workbookhelper.cxx:1046:27 > #24 0x7f95442797f1 in oox::xls::WorksheetGlobals::finalizeDrawings() /sc/source/filter/oox/worksheethelper.cxx:1373:9 > #25 0x7f95442789e0 in oox::xls::WorksheetGlobals::finalizeDrawingImport() /sc/source/filter/oox/worksheethelper.cxx:996:5 > #26 0x7f954428744d in oox::xls::WorksheetHelper::finalizeDrawingImport() /sc/source/filter/oox/worksheethelper.cxx:1637:17 > #27 0x7f95441771de in oox::xls::WorkbookFragment::finalizeImport() /sc/source/filter/oox/workbookfragment.cxx:511:18 > #28 0x7f95cdd5b3ae in oox::core::FragmentHandler2::endDocument() /oox/source/core/fragmenthandler2.cxx:53:5 > #29 0x7f95caf4cfc2 in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:896:36 > #30 0x7f95caf6e950 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:1470:13 > #31 0x7f95cdce50d1 in oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) /oox/source/core/fastparser.cxx:121:15 > #32 0x7f95cdce5868 in oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) /oox/source/core/fastparser.cxx:129:5 > #33 0x7f95cddbb234 in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) /oox/source/core/xmlfilterbase.cxx:414:21 > #34 0x7f95cddb9b8d in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&) /oox/source/core/xmlfilterbase.cxx:344:12 > #35 0x7f95435c4daa in oox::xls::ExcelFilter::importDocument() /sc/source/filter/oox/excelfilter.cxx:113:25 > #36 0x7f95cdcf953b in oox::core::FilterBase::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /oox/source/core/filterbase.cxx:488:49 > #37 0x7f95435c7733 in oox::xls::ExcelFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sc/source/filter/oox/excelfilter.cxx:176:25 > #38 0x7f95857c5b40 in SfxObjectShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) /sfx2/source/doc/objstor.cxx:2393:34 > #39 0x7f9585781c6a in SfxObjectShell::DoLoad(SfxMedium*) /sfx2/source/doc/objstor.cxx:761:23 > #40 0x7f95859a9652 in SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sfx2/source/doc/sfxbasemodel.cxx:1980:36 > #41 0x7f95862145e9 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&) /sfx2/source/view/frmload.cxx:720:28 > #42 0x7f95536a9900 in framework::LoadEnv::impl_loadContent() /framework/source/loadenv/loadenv.cxx:1176:37 > #43 0x7f95536a091b in framework::LoadEnv::start() /framework/source/loadenv/loadenv.cxx:412:20 > #44 0x7f9553698f59 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) /framework/source/loadenv/loadenv.cxx:308:5 > #45 0x7f95536946e7 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&) /framework/source/loadenv/loadenv.cxx:168:14 > #46 0x7f955376867d in framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/desktop.cxx:591:16 > #47 0x7f95537688a6 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&) /framework/source/services/desktop.cxx > #48 0x7f9569f7cafa in unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /unotest/source/cpp/macros_test.cxx:71:62 > #49 0x7f9580718c56 in UnoApiTest::loadWithParams(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /test/source/unoapi_test.cxx:126:19 > #50 0x7f9580717ef8 in UnoApiTest::load(rtl::OUString const&, char const*) /test/source/unoapi_test.cxx:108:5 > #51 0x7f9580719254 in UnoApiTest::loadFromFile(std::basic_string_view<char16_t, std::char_traits<char16_t> >, char const*) /test/source/unoapi_test.cxx:132:5 > #52 0x7f95d8bf1018 in testTdf123647::TestBody() /chart2/qa/extras/chart2export2.cxx:1242:5 (<https://ci.libreoffice.org//job/lo_ubsan/3048/>) Change-Id: I870d811e78b8c55b84627ae609f98f623465dd9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162294 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> (cherry picked from commit 3fb9859) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174442 Tested-by: Stephan Bergmann <[email protected]>
Instead of using a custom (non-recursive) std::mutex in the extension manager dialog, hold the (recursive) SolarMutex instead. As the backtrace in attachment 197155 in tdf#161625 (s.a. below) shows, a recursive mutex is needed: dp_gui::ExtMgrDialog::TimeOutHdl (frame 17) locks the mutex, then dp_gui::ExtMgrDialog::startProgress (frame 6) wants to lock it again, causing a deadlock. (Switching ExtMgrDialog::m_aMutex to be a std::recursive_mutex could be an alternative, but follow the common pattern of holding the SolarMutex while doing UI stuff instead.) Somewhat similar commit: commit 406a7e9 Date: Wed Jul 10 12:46:50 2024 +0200 fix locking in UpdateRequiredDialog Backtrace of deadlock: #0 0x00007f883f6adc70 in ?? () from /usr/lib/libc.so.6 #1 0x00007f883f6b4b01 in pthread_mutex_lock () from /usr/lib/libc.so.6 #2 0x00007f87f3ea068e in __gthread_mutex_lock (__mutex=0x5782aab26e48) at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/x86_64-pc-linux-gnu/bits/gthr-default.h:762 #3 std::mutex::lock (this=0x5782aab26e48) at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/std_mutex.h:113 #4 std::unique_lock<std::mutex>::lock (this=<optimized out>) at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/unique_lock.h:147 #5 std::unique_lock<std::mutex>::unique_lock (__m=..., this=<optimized out>) at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/unique_lock.h:73 #6 dp_gui::ExtMgrDialog::startProgress (this=0x5782aab26de0, _bLockInterface=0x80) at /home/user/libreofficetwo/desktop/source/deployment/gui/dp_gui_dialog2.cxx:779 #7 0x00007f883b4080a1 in Link<void*, void>::Call (this=0x7f86b0000c08, data=0x80) at include/tools/link.hxx:111 #8 ImplHandleUserEvent (pSVEvent=pSVEvent@entry=0x7f86b0000c00) at /home/user/libreofficetwo/vcl/source/window/winproc.cxx:2285 #9 0x00007f883b40616a in ImplWindowFrameProc (_pWindow=0x5782a76df9f0, nEvent=SalEvent::UserEvent, pEvent=0x7f86b0000c00) at /home/user/libreofficetwo/vcl/source/window/winproc.cxx:2849 #10 0x00007f883b6c711e in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const (this=<optimized out>) at /home/user/libreofficetwo/vcl/source/app/salusereventlist.cxx:119 #11 SalUserEventList::DispatchUserEvents (this=0x5782a62edb08, bHandleAllCurrentEvents=false) at /home/user/libreofficetwo/vcl/source/app/salusereventlist.cxx:120 #12 0x00007f8833fb7827 in QtInstance::ImplYield (this=this@entry=0x5782a62edad0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:447 #13 0x00007f8833fb9e11 in QtInstance::DoYield (this=0x5782a62edad0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:469 #14 0x00007f883b70fc72 in ImplYield (i_bWait=true, i_bAllEvents=false) at /home/user/libreofficetwo/vcl/source/app/svapp.cxx:385 #15 Application::Yield () at /home/user/libreofficetwo/vcl/source/app/svapp.cxx:473 #16 0x00007f883b486415 in ProgressBar::SetValue (this=<optimized out>, nNewPercent=<optimized out>) at /home/user/libreofficetwo/vcl/source/control/prgsbar.cxx:199 #17 0x00007f87f3ea14ca in dp_gui::ExtMgrDialog::TimeOutHdl (this=0x5782aab26de0) at /home/user/libreofficetwo/desktop/source/deployment/gui/dp_gui_dialog2.cxx:976 #18 0x00007f883b6ff8c7 in Scheduler::CallbackTaskScheduling () at /home/user/libreofficetwo/vcl/source/app/scheduler.cxx:509 #19 0x00007f8833fd4013 in SalTimer::CallCallback (this=0x5782a77b83d0) at vcl/inc/saltimer.hxx:53 #20 QtTimer::timeoutActivated (this=0x5782a77b83c0) at vcl/qt6/../qt5/QtTimer.cxx:51 #21 0x00007f88341a3397 in ?? () from /usr/lib/libQt6Core.so.6 #22 0x00007f88341ab5e5 in QTimer::timerEvent(QTimerEvent*) () from /usr/lib/libQt6Core.so.6 #23 0x00007f883418d859 in QObject::event(QEvent*) () from /usr/lib/libQt6Core.so.6 #24 0x00007f8832efc8cc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt6Widgets.so.6 #25 0x00007f8834145aa8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt6Core.so.6 #26 0x00007f88342c7658 in QTimerInfoList::activateTimers() () from /usr/lib/libQt6Core.so.6 #27 0x00007f88343a9f99 in ?? () from /usr/lib/libQt6Core.so.6 #28 0x00007f8837877299 in ?? () from /usr/lib/libglib-2.0.so.0 #29 0x00007f88378d9ec7 in ?? () from /usr/lib/libglib-2.0.so.0 #30 0x00007f8837876795 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #31 0x00007f88343a82bd in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt6Core.so.6 #32 0x00007f8833fb789d in QtInstance::ImplYield (this=this@entry=0x5782a62edad0, bWait=<optimized out>, bHandleAllCurrentEvents=<optimized out>) at vcl/qt6/../qt5/QtInstance.cxx:458 #33 0x00007f8833fb9e11 in QtInstance::DoYield (this=0x5782a62edad0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:469 #34 0x00007f883b70fc72 in ImplYield (i_bWait=true, i_bAllEvents=false) at /home/user/libreofficetwo/vcl/source/app/svapp.cxx:385 #35 Application::Yield () at /home/user/libreofficetwo/vcl/source/app/svapp.cxx:473 #36 0x00007f883b70fb90 in Application::Execute () at /home/user/libreofficetwo/vcl/source/app/svapp.cxx:360 #37 0x00007f883f8e1770 in desktop::Desktop::Main (this=0x7ffc2a5b0d28) at /home/user/libreofficetwo/desktop/source/app/app.cxx:1691 #38 0x00007f883b717e1e in ImplSVMain () at /home/user/libreofficetwo/vcl/source/app/svmain.cxx:228 #39 0x00007f883f90ef8a in soffice_main () at /home/user/libreofficetwo/desktop/source/app/sofficemain.cxx:121 #40 0x000057829d6f683b in sal_main () at /home/user/libreofficetwo/desktop/source/app/main.c:51 #41 main (argc=<optimized out>, argv=<optimized out>) at /home/user/libreofficetwo/desktop/source/app/main.c:49 Change-Id: I96d746eb1493aaf5b56d50664c9d1817699f21bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175298 Reviewed-by: Michael Weghorn <[email protected]> Reviewed-by: Noel Grandin <[email protected]> Tested-by: Jenkins Reviewed-by: Rafael Lima <[email protected]> Tested-by: Ilmari Lauhakangas <[email protected]> Reviewed-by: Ilmari Lauhakangas <[email protected]>
Instead of using a custom (non-recursive) std::mutex in the extension manager dialog, hold the (recursive) SolarMutex instead. As the backtrace in attachment 197155 in tdf#161625 (s.a. below) shows, a recursive mutex is needed: dp_gui::ExtMgrDialog::TimeOutHdl (frame 17) locks the mutex, then dp_gui::ExtMgrDialog::startProgress (frame 6) wants to lock it again, causing a deadlock. (Switching ExtMgrDialog::m_aMutex to be a std::recursive_mutex could be an alternative, but follow the common pattern of holding the SolarMutex while doing UI stuff instead.) Somewhat similar commit: commit 406a7e9 Date: Wed Jul 10 12:46:50 2024 +0200 fix locking in UpdateRequiredDialog Backtrace of deadlock: #0 0x00007f883f6adc70 in ?? () from /usr/lib/libc.so.6 #1 0x00007f883f6b4b01 in pthread_mutex_lock () from /usr/lib/libc.so.6 #2 0x00007f87f3ea068e in __gthread_mutex_lock (__mutex=0x5782aab26e48) at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/x86_64-pc-linux-gnu/bits/gthr-default.h:762 #3 std::mutex::lock (this=0x5782aab26e48) at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/std_mutex.h:113 #4 std::unique_lock<std::mutex>::lock (this=<optimized out>) at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/unique_lock.h:147 #5 std::unique_lock<std::mutex>::unique_lock (__m=..., this=<optimized out>) at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/unique_lock.h:73 #6 dp_gui::ExtMgrDialog::startProgress (this=0x5782aab26de0, _bLockInterface=0x80) at /home/user/libreofficetwo/desktop/source/deployment/gui/dp_gui_dialog2.cxx:779 #7 0x00007f883b4080a1 in Link<void*, void>::Call (this=0x7f86b0000c08, data=0x80) at include/tools/link.hxx:111 #8 ImplHandleUserEvent (pSVEvent=pSVEvent@entry=0x7f86b0000c00) at /home/user/libreofficetwo/vcl/source/window/winproc.cxx:2285 #9 0x00007f883b40616a in ImplWindowFrameProc (_pWindow=0x5782a76df9f0, nEvent=SalEvent::UserEvent, pEvent=0x7f86b0000c00) at /home/user/libreofficetwo/vcl/source/window/winproc.cxx:2849 #10 0x00007f883b6c711e in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const (this=<optimized out>) at /home/user/libreofficetwo/vcl/source/app/salusereventlist.cxx:119 #11 SalUserEventList::DispatchUserEvents (this=0x5782a62edb08, bHandleAllCurrentEvents=false) at /home/user/libreofficetwo/vcl/source/app/salusereventlist.cxx:120 #12 0x00007f8833fb7827 in QtInstance::ImplYield (this=this@entry=0x5782a62edad0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:447 #13 0x00007f8833fb9e11 in QtInstance::DoYield (this=0x5782a62edad0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:469 #14 0x00007f883b70fc72 in ImplYield (i_bWait=true, i_bAllEvents=false) at /home/user/libreofficetwo/vcl/source/app/svapp.cxx:385 #15 Application::Yield () at /home/user/libreofficetwo/vcl/source/app/svapp.cxx:473 #16 0x00007f883b486415 in ProgressBar::SetValue (this=<optimized out>, nNewPercent=<optimized out>) at /home/user/libreofficetwo/vcl/source/control/prgsbar.cxx:199 #17 0x00007f87f3ea14ca in dp_gui::ExtMgrDialog::TimeOutHdl (this=0x5782aab26de0) at /home/user/libreofficetwo/desktop/source/deployment/gui/dp_gui_dialog2.cxx:976 #18 0x00007f883b6ff8c7 in Scheduler::CallbackTaskScheduling () at /home/user/libreofficetwo/vcl/source/app/scheduler.cxx:509 #19 0x00007f8833fd4013 in SalTimer::CallCallback (this=0x5782a77b83d0) at vcl/inc/saltimer.hxx:53 #20 QtTimer::timeoutActivated (this=0x5782a77b83c0) at vcl/qt6/../qt5/QtTimer.cxx:51 #21 0x00007f88341a3397 in ?? () from /usr/lib/libQt6Core.so.6 #22 0x00007f88341ab5e5 in QTimer::timerEvent(QTimerEvent*) () from /usr/lib/libQt6Core.so.6 #23 0x00007f883418d859 in QObject::event(QEvent*) () from /usr/lib/libQt6Core.so.6 #24 0x00007f8832efc8cc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt6Widgets.so.6 #25 0x00007f8834145aa8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt6Core.so.6 #26 0x00007f88342c7658 in QTimerInfoList::activateTimers() () from /usr/lib/libQt6Core.so.6 #27 0x00007f88343a9f99 in ?? () from /usr/lib/libQt6Core.so.6 #28 0x00007f8837877299 in ?? () from /usr/lib/libglib-2.0.so.0 #29 0x00007f88378d9ec7 in ?? () from /usr/lib/libglib-2.0.so.0 #30 0x00007f8837876795 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #31 0x00007f88343a82bd in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt6Core.so.6 #32 0x00007f8833fb789d in QtInstance::ImplYield (this=this@entry=0x5782a62edad0, bWait=<optimized out>, bHandleAllCurrentEvents=<optimized out>) at vcl/qt6/../qt5/QtInstance.cxx:458 #33 0x00007f8833fb9e11 in QtInstance::DoYield (this=0x5782a62edad0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:469 #34 0x00007f883b70fc72 in ImplYield (i_bWait=true, i_bAllEvents=false) at /home/user/libreofficetwo/vcl/source/app/svapp.cxx:385 #35 Application::Yield () at /home/user/libreofficetwo/vcl/source/app/svapp.cxx:473 #36 0x00007f883b70fb90 in Application::Execute () at /home/user/libreofficetwo/vcl/source/app/svapp.cxx:360 #37 0x00007f883f8e1770 in desktop::Desktop::Main (this=0x7ffc2a5b0d28) at /home/user/libreofficetwo/desktop/source/app/app.cxx:1691 #38 0x00007f883b717e1e in ImplSVMain () at /home/user/libreofficetwo/vcl/source/app/svmain.cxx:228 #39 0x00007f883f90ef8a in soffice_main () at /home/user/libreofficetwo/desktop/source/app/sofficemain.cxx:121 #40 0x000057829d6f683b in sal_main () at /home/user/libreofficetwo/desktop/source/app/main.c:51 #41 main (argc=<optimized out>, argv=<optimized out>) at /home/user/libreofficetwo/desktop/source/app/main.c:49 Change-Id: I96d746eb1493aaf5b56d50664c9d1817699f21bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175298 Reviewed-by: Michael Weghorn <[email protected]> Reviewed-by: Noel Grandin <[email protected]> Tested-by: Jenkins Reviewed-by: Rafael Lima <[email protected]> Tested-by: Ilmari Lauhakangas <[email protected]> Reviewed-by: Ilmari Lauhakangas <[email protected]> Signed-off-by: Xisco Fauli <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175402
...as seen at > /tools/source/misc/fix16.cxx:79:53: runtime error: signed integer overflow: -2147483648 - 1 cannot be represented in type 'int' > #0 0x7fc2f9f50a60 in mask(int) /tools/source/misc/fix16.cxx:79:53 > #1 0x7fc2f9f505fd in fix16_div(int, int) /tools/source/misc/fix16.cxx:122:34 > #2 0x7fc2f00d12e0 in vcl::fixedDiv(int, int) /vcl/source/fontsubset/sft.cxx:127:12 > #3 0x7fc2f00d11c1 in vcl::fixedMulDiv(int, int, int) /vcl/source/fontsubset/sft.cxx:135:12 > #4 0x7fc2f00d0851 in vcl::GetCompoundTTOutline(vcl::AbstractTrueTypeFont*, unsigned int, std::__debug::vector<vcl::ControlPoint, std::allocator<vcl::ControlPoint> >&, vcl::(anonymous namespace)::TTGlyphMetrics*, std::__debug::vector<unsigned int, std::allocator<unsigned int> >&) /vcl/source/fontsubset/sft.cxx:544:91 > #5 0x7fc2f00af5f1 in vcl::GetTTGlyphOutline(vcl::AbstractTrueTypeFont*, unsigned int, std::__debug::vector<vcl::ControlPoint, std::allocator<vcl::ControlPoint> >&, vcl::(anonymous namespace)::TTGlyphMetrics*, std::__debug::vector<unsigned int, std::allocator<unsigned int> >*) /vcl/source/fontsubset/sft.cxx:621:15 > #6 0x7fc2f00aea34 in vcl::GetTTGlyphPoints(vcl::AbstractTrueTypeFont*, unsigned int, std::__debug::vector<vcl::ControlPoint, std::allocator<vcl::ControlPoint> >&) /vcl/source/fontsubset/sft.cxx:1239:12 > #7 0x7fc2f00b92de in vcl::GetTTRawGlyphData(vcl::AbstractTrueTypeFont*, unsigned int) /vcl/source/fontsubset/sft.cxx:1667:9 > #8 0x7fc2f00b23ed in vcl::CreateTTFromTTGlyphs(vcl::AbstractTrueTypeFont*, std::__debug::vector<unsigned char, std::allocator<unsigned char> >&, unsigned short const*, unsigned char const*, int) /vcl/source/fontsubset/sft.cxx:1374:32 > #9 0x7fc2f00bc71a in vcl::CreateTTFfontSubset(vcl::AbstractTrueTypeFont&, std::__debug::vector<unsigned char, std::allocator<unsigned char> >&, unsigned int const*, unsigned char const*, int, FontSubsetInfo&) /vcl/source/fontsubset/sft.cxx:1549:13 > #10 0x7fc2eff57836 in vcl::font::PhysicalFontFace::CreateFontSubset(std::__debug::vector<unsigned char, std::allocator<unsigned char> >&, unsigned int const*, unsigned char const*, int, FontSubsetInfo&) const /vcl/source/font/PhysicalFontFace.cxx:367:12 > #11 0x7fc2ee4e0472 in vcl::PDFWriterImpl::emitFonts() /vcl/source/gdi/pdfwriter_impl.cxx:3152:24 > #12 0x7fc2ee4e9cb9 in vcl::PDFWriterImpl::emitResources() /vcl/source/gdi/pdfwriter_impl.cxx:3363:10 > #13 0x7fc2ee53f91d in vcl::PDFWriterImpl::emitCatalog() /vcl/source/gdi/pdfwriter_impl.cxx:5288:10 > #14 0x7fc2ee567ae3 in vcl::PDFWriterImpl::emit() /vcl/source/gdi/pdfwriter_impl.cxx:6341:10 > #15 0x7fc2ee3d3f2a in vcl::PDFWriter::Emit() /vcl/source/gdi/pdfwriter.cxx:53:29 > #16 0x7fc249b4b82a in PDFExport::Export(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /filter/source/pdf/pdfexport.cxx:1127:39 > #17 0x7fc249bb2782 in PDFFilter::implExport(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /filter/source/pdf/pdffilter.cxx:182:24 > #18 0x7fc249bb342b in PDFFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /filter/source/pdf/pdffilter.cxx:247:23 > #19 0x7fc2a51ebec6 in SfxObjectShell::ExportTo(SfxMedium&) /sfx2/source/doc/objstor.cxx:2945:25 > #20 0x7fc2a51d7bec in SfxObjectShell::SaveTo_Impl(SfxMedium&, SfxItemSet const*) /sfx2/source/doc/objstor.cxx:1943:19 > #21 0x7fc2a5213f83 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:3459:39 > #22 0x7fc2a520b709 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:3249:9 > #23 0x7fc2a5147a8b 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:320:19 > #24 0x7fc2a543024c in SfxBaseModel::impl_store(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, bool) /sfx2/source/doc/sfxbasemodel.cxx:3231:42 > #25 0x7fc2a54374f4 in SfxBaseModel::storeToURL(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sfx2/source/doc/sfxbasemodel.cxx:1813:13 > #26 0x7fc2c74053ae in ScPDFExportTest::exportToPDF(com::sun::star::uno::Reference<com::sun::star::frame::XModel> const&, ScRange const&) /sc/qa/extras/scpdfexport.cxx:179:16 > #27 0x7fc2c7437e0f in ScPDFExportTest::testForcepoint97() /sc/qa/extras/scpdfexport.cxx:915:5 during CppunitTest_sc_pdf_export (<https://ci.libreoffice.org/job/lo_ubsan/3346/>) Change-Id: I3074479ea3267417a73ecafa81b4a9898f19d1a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175469 Reviewed-by: Stephan Bergmann <[email protected]> Tested-by: Jenkins
At least with one ASan/UBSan setup of mine using LODE's Clang 12.0.1, ./autogen.sh would occasionally detect -std=gnu11 as the required CC "option to enable C11 features" (which would in turn cause building external/firebird to fail oddly; an issue worth investigations of its own), because Clang would occasionally crash with a SEGV on the corresponding configure test program's first invocation (without -std=gnu11) when invoked with -O2 (and happen to succeed on second invocation with -std=gnu11, so configure thinks that's needed), see below for a relevant config.log excerpt. When CC/CXX are already set (as is the case in this scenario), we could arguably skip the AC_PROG_CC/CXX checks entirely (and thus avoid configure potentially adding -std=gnu11 to CC), but at least AC_PROG_CC also internally sets the GCC shell var, which we use in configure.ac. So better be conservative and just avoid -O2 during AC_PROG_CC/CXX (whatever the autoconf motivation to include it in the first place). > configure:8165: checking for /home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang -fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=local-bounds -fsanitize-blacklist=/home/sberg/lo0/core/sanitize-ubsan-excludelist option to enable C11 features > configure:8180: /home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang -fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=local-bounds -fsanitize-blacklist=/home/sberg/lo0/core/sanitize-ubsan-excludelist -c -g -O2 conftest.c >&5 > PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. > Stack dump: > 0. Program arguments: /home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang -fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=local-bounds -fsanitize-blacklist=/home/sberg/lo0/core/sanitize-ubsan-excludelist -c -g -O2 conftest.c > 1. <eof> parser at end of file > 2. Code generation > #0 0x000055f3a890caf2 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1c3eaf2) > #1 0x000055f3a890a734 llvm::sys::RunSignalHandlers() (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1c3c734) > #2 0x000055f3a887b998 CrashRecoverySignalHandler(int) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1bad998) > #3 0x00007f750d24e520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520) > #4 0x000055f3a93f9cd4 llvm::DIE::getUnitDie() const (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x272bcd4) > #5 0x000055f3a9404574 llvm::DwarfDebug::finishEntityDefinitions() (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2736574) > #6 0x000055f3a941df99 llvm::DwarfDebug::finalizeModuleInfo() (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x274ff99) > #7 0x000055f3a9421128 llvm::DwarfDebug::endModule() (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2753128) > #8 0x000055f3a93f1219 llvm::AsmPrinter::doFinalization(llvm::Module&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2723219) > #9 0x000055f3a82478f5 llvm::FPPassManager::doFinalization(llvm::Module&) (.localalias) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x15798f5) > #10 0x000055f3a8253900 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1585900) > #11 0x000055f3a8bb57d3 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (.constprop.0) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1ee77d3) > #12 0x000055f3a8bb76ea clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1ee96ea) > #13 0x000055f3a9825876 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2b57876) > #14 0x000055f3aa35c549 clang::ParseAST(clang::Sema&, bool, bool) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x368e549) > #15 0x000055f3a91ef2d9 clang::FrontendAction::Execute() (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x25212d9) > #16 0x000055f3a91903a3 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x24c23a3) > #17 0x000055f3a92a2fd8 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x25d4fd8) > #18 0x000055f3a7798815 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0xaca815) > #19 0x000055f3a77961a7 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0xac81a7) > #20 0x000055f3a9039689 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const::'lambda'()>(long) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x236b689) > #21 0x000055f3a887baa7 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1badaa7) > #22 0x000055f3a903a802 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const (.part.0) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x236c802) > #23 0x000055f3a900fbec clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2341bec) > #24 0x000055f3a9010679 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2342679) > #25 0x000055f3a901e8f1 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x23508f1) > #26 0x000055f3a7717e6f main (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0xa49e6f) > #27 0x00007f750d235d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90) > #28 0x00007f750d235e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40) > #29 0x000055f3a7795b55 _start (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0xac7b55) > clang-12: error: clang frontend command failed with exit code 139 (use -v to see invocation) > clang version 12.0.1 (https://github.com/llvm/llvm-project.git fed41342a82f5a3a9201819a82bf7a48313e296b) > Target: x86_64-unknown-linux-gnu > Thread model: posix > InstalledDir: /home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin > clang-12: note: diagnostic msg: > ******************** > > PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: > Preprocessed source(s) and associated run script(s) are located at: > clang-12: note: diagnostic msg: /tmp/conftest-968380.c > clang-12: note: diagnostic msg: /tmp/conftest-968380.sh > clang-12: note: diagnostic msg: > > ******************** > configure:8180: $? = 139 > configure: failed program was: > | /* confdefs.h */ > | #define PACKAGE_NAME "LibreOffice" > | #define PACKAGE_TARNAME "libreoffice" > | #define PACKAGE_VERSION "24.8.0.0.alpha0+" > | #define PACKAGE_STRING "LibreOffice 24.8.0.0.alpha0+" > | #define PACKAGE_BUGREPORT "" > | #define PACKAGE_URL "http://documentfoundation.org/" > | #define LIBO_VERSION_MAJOR 24 > | #define LIBO_VERSION_MINOR 8 > | #define LIBO_VERSION_MICRO 0 > | #define LIBO_VERSION_PATCH 0 > | #define LIBO_THIS_YEAR 2024 > | #define SRCDIR "/home/sberg/lo0/core" > | #define SRC_ROOT "/home/sberg/lo0/core" > | #define BUILDDIR "/home/sberg/lo0/core" > | #define USE_HEADLESS_CODE 1 > | #define ENABLE_HEADLESS 1 > | /* end confdefs.h. */ > | > | /* Does the compiler advertise C89 conformance? > | Do not test the value of __STDC__, because some compilers set it to 0 > | while being otherwise adequately conformant. */ > | #if !defined __STDC__ > | # error "Compiler does not advertise C89 conformance" > | #endif > | > | #include <stddef.h> > | #include <stdarg.h> > | struct stat; > | /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ > | struct buf { int x; }; > | struct buf * (*rcsopen) (struct buf *, struct stat *, int); > | static char *e (p, i) > | char **p; > | int i; > | { > | return p[i]; > | } > | static char *f (char * (*g) (char **, int), char **p, ...) > | { > | char *s; > | va_list v; > | va_start (v,p); > | s = g (p, va_arg (v,int)); > | va_end (v); > | return s; > | } > | > | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has > | function prototypes and stuff, but not \xHH hex character constants. > | These do not provoke an error unfortunately, instead are silently treated > | as an "x". The following induces an error, until -std is added to get > | proper ANSI mode. Curiously \x00 != x always comes out true, for an > | array size at least. It is necessary to write \x00 == 0 to get something > | that is true only with -std. */ > | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; > | > | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters > | inside strings and character constants. */ > | #define FOO(x) 'x' > | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; > | > | int test (int i, double x); > | struct s1 {int (*f) (int a);}; > | struct s2 {int (*f) (double a);}; > | int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), > | int, int); > | > | // Does the compiler advertise C99 conformance? > | #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L > | # error "Compiler does not advertise C99 conformance" > | #endif > | > | #include <stdbool.h> > | extern int puts (const char *); > | extern int printf (const char *, ...); > | extern int dprintf (int, const char *, ...); > | extern void *malloc (size_t); > | > | // Check varargs macros. These examples are taken from C99 6.10.3.5. > | // dprintf is used instead of fprintf to avoid needing to declare > | // FILE and stderr. > | #define debug(...) dprintf (2, __VA_ARGS__) > | #define showlist(...) puts (#__VA_ARGS__) > | #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) > | static void > | test_varargs_macros (void) > | { > | int x = 1234; > | int y = 5678; > | debug ("Flag"); > | debug ("X = %d\n", x); > | showlist (The first, second, and third items.); > | report (x>y, "x is %d but y is %d", x, y); > | } > | > | // Check long long types. > | #define BIG64 18446744073709551615ull > | #define BIG32 4294967295ul > | #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) > | #if !BIG_OK > | #error "your preprocessor is broken" > | #endif > | #if BIG_OK > | #else > | #error "your preprocessor is broken" > | #endif > | static long long int bignum = -9223372036854775807LL; > | static unsigned long long int ubignum = BIG64; > | > | struct incomplete_array > | { > | int datasize; > | double data[]; > | }; > | > | struct named_init { > | int number; > | const wchar_t *name; > | double average; > | }; > | > | typedef const char *ccp; > | > | static inline int > | test_restrict (ccp restrict text) > | { > | // See if C++-style comments work. > | // Iterate through items via the restricted pointer. > | // Also check for declarations in for loops. > | for (unsigned int i = 0; *(text+i) != '\0'; ++i) > | continue; > | return 0; > | } > | > | // Check varargs and va_copy. > | static bool > | test_varargs (const char *format, ...) > | { > | va_list args; > | va_start (args, format); > | va_list args_copy; > | va_copy (args_copy, args); > | > | const char *str = ""; > | int number = 0; > | float fnumber = 0; > | > | while (*format) > | { > | switch (*format++) > | { > | case 's': // string > | str = va_arg (args_copy, const char *); > | break; > | case 'd': // int > | number = va_arg (args_copy, int); > | break; > | case 'f': // float > | fnumber = va_arg (args_copy, double); > | break; > | default: > | break; > | } > | } > | va_end (args_copy); > | va_end (args); > | > | return *str && number && fnumber; > | } > | > | > | // Does the compiler advertise C11 conformance? > | #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L > | # error "Compiler does not advertise C11 conformance" > | #endif > | > | // Check _Alignas. > | char _Alignas (double) aligned_as_double; > | char _Alignas (0) no_special_alignment; > | extern char aligned_as_int; > | char _Alignas (0) _Alignas (int) aligned_as_int; > | > | // Check _Alignof. > | enum > | { > | int_alignment = _Alignof (int), > | int_array_alignment = _Alignof (int[100]), > | char_alignment = _Alignof (char) > | }; > | _Static_assert (0 < -_Alignof (int), "_Alignof is signed"); > | > | // Check _Noreturn. > | int _Noreturn does_not_return (void) { for (;;) continue; } > | > | // Check _Static_assert. > | struct test_static_assert > | { > | int x; > | _Static_assert (sizeof (int) <= sizeof (long int), > | "_Static_assert does not work in struct"); > | long int y; > | }; > | > | // Check UTF-8 literals. > | #define u8 syntax error! > | char const utf8_literal[] = u8"happens to be ASCII" "another string"; > | > | // Check duplicate typedefs. > | typedef long *long_ptr; > | typedef long int *long_ptr; > | typedef long_ptr long_ptr; > | > | // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. > | struct anonymous > | { > | union { > | struct { int i; int j; }; > | struct { int k; long int l; } w; > | }; > | int m; > | } v1; > | > | > | int > | main (int argc, char **argv) > | { > | int ok = 0; > | > | ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); > | > | > | // Check bool. > | _Bool success = false; > | success |= (argc != 0); > | > | // Check restrict. > | if (test_restrict ("String literal") == 0) > | success = true; > | char *restrict newvar = "Another string"; > | > | // Check varargs. > | success &= test_varargs ("s, d' f .", "string", 65, 34.234); > | test_varargs_macros (); > | > | // Check flexible array members. > | struct incomplete_array *ia = > | malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); > | ia->datasize = 10; > | for (int i = 0; i < ia->datasize; ++i) > | ia->data[i] = i * 1.234; > | > | // Check named initializers. > | struct named_init ni = { > | .number = 34, > | .name = L"Test wide string", > | .average = 543.34343, > | }; > | > | ni.number = 58; > | > | int dynamic_array[ni.number]; > | dynamic_array[0] = argv[0][0]; > | dynamic_array[ni.number - 1] = 543; > | > | // work around unused variable warnings > | ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' > | || dynamic_array[ni.number - 1] != 543); > | > | > | _Static_assert ((offsetof (struct anonymous, i) > | == offsetof (struct anonymous, w.k)), > | "Anonymous union alignment botch"); > | v1.i = 2; > | v1.w.k = 5; > | ok |= v1.i != 5; > | > | return ok; > | } > | > configure:8180: /home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang -fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=local-bounds -fsanitize-blacklist=/home/sberg/lo0/core/sanitize-ubsan-excludelist -std=gnu11 -c -g -O2 conftest.c >&5 > configure:8180: $? = 0 > configure:8201: result: -std=gnu11 Change-Id: I9122d0d853d0010155d57cb1d1d56f7c453d5208 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165904 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> (cherry picked from commit 42f6e89) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175755 Tested-by: allotropia jenkins <[email protected]>
although the actual order doesn't change there is a Delete/Insert of the object in case the order should change. ::Insert will check if sorted and resort if not anyway, so presumably if we just skip the middle-men and resort here if we need to then that is equivalent, but without the invalidation for the already sorted case. #0 SwSortedObjs::Remove (this=0x510ed40, _rAnchoredObj=...) at core/sw/source/core/layout/sortedobjs.cxx:243 #1 0x00007fffce0af130 in SwSortedObjs::Update (this=0x510ed40, _rAnchoredObj=...) at core/sw/source/core/layout/sortedobjs.cxx:282 #2 0x00007fffcdf32c40 in SwAnchoredObject::UpdateObjInSortedList (this=0x51123c0) at core/sw/source/core/layout/anchoredobject.cxx:661 #3 0x00007fffcdf8fc38 in SwFlyFrame::SwClientNotify (this=0x5112260, rMod=..., rHint=...) at core/sw/source/core/layout/fly.cxx:859 #4 0x00007fffcdf9d1bf in SwFlyAtContentFrame::SwClientNotify (this=0x5112260, rMod=..., rHint=...) at core/sw/source/core/layout/flycnt.cxx:112 #5 0x00007fffcd65bca8 in SwModify::CallSwClientNotify (this=0x4e68da0, rHint=...) at core/sw/source/core/attr/calbck.cxx:311 #6 0x00007fffcd65bd71 in sw::BroadcastingModify::CallSwClientNotify (this=0x4e68da0, rHint=...) at core/sw/source/core/attr/calbck.cxx:316 #7 0x00007fffcd65b42f in SwModify::SwClientNotify (this=0x4e68da0, rHint=...) at core/sw/source/core/attr/calbck.cxx:302 #8 0x00007fffcd66771b in SwFormat::SwClientNotify (this=0x4e68da0, rHint=...) at core/sw/source/core/attr/format.cxx:300 #9 0x00007fffcdf4448a in SwFrameFormat::SwClientNotify (this=0x4e68da0, rMod=..., rHint=...) at core/sw/source/core/layout/atrfrm.cxx:2843 #10 0x00007fffcd65be1e in sw::ClientNotifyAttrChg (rModify=..., aSet=..., aOld=..., aNew=...) at core/sw/source/core/attr/calbck.cxx:325 #11 0x00007fffcd66948e in SwFormat::SetFormatAttr (this=0x4e68da0, rSet=SfxItemSet of pool 0x1bcebe0 with parent 0x4e68e68 and Which ranges: [(88, 141), (159, 159), (1014, 1034)] = {...}) at core/sw/source/core/attr/format.cxx:597 #12 0x00007fffce649a2c in SwXFrame::setPropertyValue (this=0x5e47b90, rPropertyName="Size", _rValue=uno::Any("com.sun.star.awt.Size": ...)) at core/sw/source/core/unocore/unoframe.cxx:1867 #13 0x00007fffcdc4d7ea in SwTextBoxHelper::syncProperty (pShape=0x4dce770, nWID=89, nMemberID=0 '\000', rValue=uno::Any("com.sun.star.awt.Size": ...), pObj=0x0) at core/sw/source/core/doc/textboxhelper.cxx:995 #14 0x00007fffcdf2e2d7 in SwAnchoredDrawObject::GetObjBoundRect (this=0x4e69dd0) at core/sw/source/core/layout/anchoreddrawobject.cxx:757 #15 0x00007fffcdf320ca in SwAnchoredObject::GetObjRectWithSpaces (this=0x4e69dd0) at core/sw/source/core/layout/anchoredobject.cxx:575 #16 0x00007fffcdf31eaa in SwAnchoredObject::InvalidateObjPosForConsiderWrapInfluence (this=0x4e69dd0) at core/sw/source/core/layout/anchoredobject.cxx:400 #17 0x00007fffcdf32be5 in SwAnchoredObject::UpdateObjInSortedList (this=0x510e530) at core/sw/source/core/layout/anchoredobject.cxx:654 #18 0x00007fffcdf8fc38 in SwFlyFrame::SwClientNotify (this=0x510e3d0, rMod=..., rHint=...) at core/sw/source/core/layout/fly.cxx:859 #19 0x00007fffcdf9d1bf in SwFlyAtContentFrame::SwClientNotify (this=0x510e3d0, rMod=..., rHint=...) at core/sw/source/core/layout/flycnt.cxx:112 #20 0x00007fffcd65bca8 in SwModify::CallSwClientNotify (this=0x4e364a0, rHint=...) at core/sw/source/core/attr/calbck.cxx:311 #21 0x00007fffcd65bd71 in sw::BroadcastingModify::CallSwClientNotify (this=0x4e364a0, rHint=...) at core/sw/source/core/attr/calbck.cxx:316 #22 0x00007fffcd65b42f in SwModify::SwClientNotify (this=0x4e364a0, rHint=...) at core/sw/source/core/attr/calbck.cxx:302 #23 0x00007fffcd66771b in SwFormat::SwClientNotify (this=0x4e364a0, rHint=...) at core/sw/source/core/attr/format.cxx:300 #24 0x00007fffcdf4448a in SwFrameFormat::SwClientNotify (this=0x4e364a0, rMod=..., rHint=...) at core/sw/source/core/layout/atrfrm.cxx:2843 #25 0x00007fffcd65be1e in sw::ClientNotifyAttrChg (rModify=..., aSet=..., aOld=..., aNew=...) at core/sw/source/core/attr/calbck.cxx:325 #26 0x00007fffcd66948e in SwFormat::SetFormatAttr (this=0x4e364a0, rSet=SfxItemSet of pool 0x1bcebe0 with parent 0x4e36568 and Which ranges: [(88, 141), (159, 159), (1014, 1034)] = {...}) at core/sw/source/core/attr/format.cxx:597 #27 0x00007fffce649a2c in SwXFrame::setPropertyValue (this=0x4a86e10, rPropertyName="Size", _rValue=uno::Any("com.sun.star.awt.Size": ...)) at core/sw/source/core/unocore/unoframe.cxx:1867 #28 0x00007fffcdc4d7ea in SwTextBoxHelper::syncProperty (pShape=0x4dc65f0, nWID=89, nMemberID=0 '\000', rValue=uno::Any("com.sun.star.awt.Size": ...), pObj=0x0) at core/sw/source/core/doc/textboxhelper.cxx:995 #29 0x00007fffcdf2e2d7 in SwAnchoredDrawObject::GetObjBoundRect (this=0x4e3a0d0) at core/sw/source/core/layout/anchoreddrawobject.cxx:757 #30 0x00007fffcdf320ca in SwAnchoredObject::GetObjRectWithSpaces (this=0x4e3a0d0) at core/sw/source/core/layout/anchoredobject.cxx:575 #31 0x00007fffcdf815b3 in (anonymous namespace)::IsNextContentFullPage (rThis=...) at core/sw/source/core/layout/flowfrm.cxx:217 #32 0x00007fffcdf81002 in SwFlowFrame::IsKeep (this=0x4e5a630, rKeep=..., rBreak=..., bCheckIfLastRowShouldKeep=false) at core/sw/source/core/layout/flowfrm.cxx:259 Change-Id: If2191e8b99d1b0347bab54a704013ce0a9a19410 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176992 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]>
although the actual order doesn't change there is a Delete/Insert of the object in case the order should change. ::Insert will check if sorted and resort if not anyway, so presumably if we just skip the middle-men and resort here if we need to then that is equivalent, but without the invalidation for the already sorted case. #0 SwSortedObjs::Remove (this=0x510ed40, _rAnchoredObj=...) at core/sw/source/core/layout/sortedobjs.cxx:243 #1 0x00007fffce0af130 in SwSortedObjs::Update (this=0x510ed40, _rAnchoredObj=...) at core/sw/source/core/layout/sortedobjs.cxx:282 #2 0x00007fffcdf32c40 in SwAnchoredObject::UpdateObjInSortedList (this=0x51123c0) at core/sw/source/core/layout/anchoredobject.cxx:661 #3 0x00007fffcdf8fc38 in SwFlyFrame::SwClientNotify (this=0x5112260, rMod=..., rHint=...) at core/sw/source/core/layout/fly.cxx:859 #4 0x00007fffcdf9d1bf in SwFlyAtContentFrame::SwClientNotify (this=0x5112260, rMod=..., rHint=...) at core/sw/source/core/layout/flycnt.cxx:112 #5 0x00007fffcd65bca8 in SwModify::CallSwClientNotify (this=0x4e68da0, rHint=...) at core/sw/source/core/attr/calbck.cxx:311 #6 0x00007fffcd65bd71 in sw::BroadcastingModify::CallSwClientNotify (this=0x4e68da0, rHint=...) at core/sw/source/core/attr/calbck.cxx:316 #7 0x00007fffcd65b42f in SwModify::SwClientNotify (this=0x4e68da0, rHint=...) at core/sw/source/core/attr/calbck.cxx:302 #8 0x00007fffcd66771b in SwFormat::SwClientNotify (this=0x4e68da0, rHint=...) at core/sw/source/core/attr/format.cxx:300 #9 0x00007fffcdf4448a in SwFrameFormat::SwClientNotify (this=0x4e68da0, rMod=..., rHint=...) at core/sw/source/core/layout/atrfrm.cxx:2843 #10 0x00007fffcd65be1e in sw::ClientNotifyAttrChg (rModify=..., aSet=..., aOld=..., aNew=...) at core/sw/source/core/attr/calbck.cxx:325 #11 0x00007fffcd66948e in SwFormat::SetFormatAttr (this=0x4e68da0, rSet=SfxItemSet of pool 0x1bcebe0 with parent 0x4e68e68 and Which ranges: [(88, 141), (159, 159), (1014, 1034)] = {...}) at core/sw/source/core/attr/format.cxx:597 #12 0x00007fffce649a2c in SwXFrame::setPropertyValue (this=0x5e47b90, rPropertyName="Size", _rValue=uno::Any("com.sun.star.awt.Size": ...)) at core/sw/source/core/unocore/unoframe.cxx:1867 #13 0x00007fffcdc4d7ea in SwTextBoxHelper::syncProperty (pShape=0x4dce770, nWID=89, nMemberID=0 '\000', rValue=uno::Any("com.sun.star.awt.Size": ...), pObj=0x0) at core/sw/source/core/doc/textboxhelper.cxx:995 #14 0x00007fffcdf2e2d7 in SwAnchoredDrawObject::GetObjBoundRect (this=0x4e69dd0) at core/sw/source/core/layout/anchoreddrawobject.cxx:757 #15 0x00007fffcdf320ca in SwAnchoredObject::GetObjRectWithSpaces (this=0x4e69dd0) at core/sw/source/core/layout/anchoredobject.cxx:575 #16 0x00007fffcdf31eaa in SwAnchoredObject::InvalidateObjPosForConsiderWrapInfluence (this=0x4e69dd0) at core/sw/source/core/layout/anchoredobject.cxx:400 #17 0x00007fffcdf32be5 in SwAnchoredObject::UpdateObjInSortedList (this=0x510e530) at core/sw/source/core/layout/anchoredobject.cxx:654 #18 0x00007fffcdf8fc38 in SwFlyFrame::SwClientNotify (this=0x510e3d0, rMod=..., rHint=...) at core/sw/source/core/layout/fly.cxx:859 #19 0x00007fffcdf9d1bf in SwFlyAtContentFrame::SwClientNotify (this=0x510e3d0, rMod=..., rHint=...) at core/sw/source/core/layout/flycnt.cxx:112 #20 0x00007fffcd65bca8 in SwModify::CallSwClientNotify (this=0x4e364a0, rHint=...) at core/sw/source/core/attr/calbck.cxx:311 #21 0x00007fffcd65bd71 in sw::BroadcastingModify::CallSwClientNotify (this=0x4e364a0, rHint=...) at core/sw/source/core/attr/calbck.cxx:316 #22 0x00007fffcd65b42f in SwModify::SwClientNotify (this=0x4e364a0, rHint=...) at core/sw/source/core/attr/calbck.cxx:302 #23 0x00007fffcd66771b in SwFormat::SwClientNotify (this=0x4e364a0, rHint=...) at core/sw/source/core/attr/format.cxx:300 #24 0x00007fffcdf4448a in SwFrameFormat::SwClientNotify (this=0x4e364a0, rMod=..., rHint=...) at core/sw/source/core/layout/atrfrm.cxx:2843 #25 0x00007fffcd65be1e in sw::ClientNotifyAttrChg (rModify=..., aSet=..., aOld=..., aNew=...) at core/sw/source/core/attr/calbck.cxx:325 #26 0x00007fffcd66948e in SwFormat::SetFormatAttr (this=0x4e364a0, rSet=SfxItemSet of pool 0x1bcebe0 with parent 0x4e36568 and Which ranges: [(88, 141), (159, 159), (1014, 1034)] = {...}) at core/sw/source/core/attr/format.cxx:597 #27 0x00007fffce649a2c in SwXFrame::setPropertyValue (this=0x4a86e10, rPropertyName="Size", _rValue=uno::Any("com.sun.star.awt.Size": ...)) at core/sw/source/core/unocore/unoframe.cxx:1867 #28 0x00007fffcdc4d7ea in SwTextBoxHelper::syncProperty (pShape=0x4dc65f0, nWID=89, nMemberID=0 '\000', rValue=uno::Any("com.sun.star.awt.Size": ...), pObj=0x0) at core/sw/source/core/doc/textboxhelper.cxx:995 #29 0x00007fffcdf2e2d7 in SwAnchoredDrawObject::GetObjBoundRect (this=0x4e3a0d0) at core/sw/source/core/layout/anchoreddrawobject.cxx:757 #30 0x00007fffcdf320ca in SwAnchoredObject::GetObjRectWithSpaces (this=0x4e3a0d0) at core/sw/source/core/layout/anchoredobject.cxx:575 #31 0x00007fffcdf815b3 in (anonymous namespace)::IsNextContentFullPage (rThis=...) at core/sw/source/core/layout/flowfrm.cxx:217 #32 0x00007fffcdf81002 in SwFlowFrame::IsKeep (this=0x4e5a630, rKeep=..., rBreak=..., bCheckIfLastRowShouldKeep=false) at core/sw/source/core/layout/flowfrm.cxx:259 Change-Id: If2191e8b99d1b0347bab54a704013ce0a9a19410 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176992 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> (cherry picked from commit f2cf4d9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177030 Reviewed-by: Michael Stahl <[email protected]>
At least with one ASan/UBSan setup of mine using LODE's Clang 12.0.1, ./autogen.sh would occasionally detect -std=gnu11 as the required CC "option to enable C11 features" (which would in turn cause building external/firebird to fail oddly; an issue worth investigations of its own), because Clang would occasionally crash with a SEGV on the corresponding configure test program's first invocation (without -std=gnu11) when invoked with -O2 (and happen to succeed on second invocation with -std=gnu11, so configure thinks that's needed), see below for a relevant config.log excerpt. When CC/CXX are already set (as is the case in this scenario), we could arguably skip the AC_PROG_CC/CXX checks entirely (and thus avoid configure potentially adding -std=gnu11 to CC), but at least AC_PROG_CC also internally sets the GCC shell var, which we use in configure.ac. So better be conservative and just avoid -O2 during AC_PROG_CC/CXX (whatever the autoconf motivation to include it in the first place). > configure:8165: checking for /home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang -fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=local-bounds -fsanitize-blacklist=/home/sberg/lo0/core/sanitize-ubsan-excludelist option to enable C11 features > configure:8180: /home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang -fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=local-bounds -fsanitize-blacklist=/home/sberg/lo0/core/sanitize-ubsan-excludelist -c -g -O2 conftest.c >&5 > PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. > Stack dump: > 0. Program arguments: /home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang -fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=local-bounds -fsanitize-blacklist=/home/sberg/lo0/core/sanitize-ubsan-excludelist -c -g -O2 conftest.c > 1. <eof> parser at end of file > 2. Code generation > #0 0x000055f3a890caf2 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1c3eaf2) > #1 0x000055f3a890a734 llvm::sys::RunSignalHandlers() (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1c3c734) > #2 0x000055f3a887b998 CrashRecoverySignalHandler(int) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1bad998) > #3 0x00007f750d24e520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520) > #4 0x000055f3a93f9cd4 llvm::DIE::getUnitDie() const (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x272bcd4) > #5 0x000055f3a9404574 llvm::DwarfDebug::finishEntityDefinitions() (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2736574) > #6 0x000055f3a941df99 llvm::DwarfDebug::finalizeModuleInfo() (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x274ff99) > #7 0x000055f3a9421128 llvm::DwarfDebug::endModule() (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2753128) > #8 0x000055f3a93f1219 llvm::AsmPrinter::doFinalization(llvm::Module&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2723219) > #9 0x000055f3a82478f5 llvm::FPPassManager::doFinalization(llvm::Module&) (.localalias) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x15798f5) > #10 0x000055f3a8253900 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1585900) > #11 0x000055f3a8bb57d3 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (.constprop.0) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1ee77d3) > #12 0x000055f3a8bb76ea clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1ee96ea) > #13 0x000055f3a9825876 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2b57876) > #14 0x000055f3aa35c549 clang::ParseAST(clang::Sema&, bool, bool) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x368e549) > #15 0x000055f3a91ef2d9 clang::FrontendAction::Execute() (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x25212d9) > #16 0x000055f3a91903a3 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x24c23a3) > #17 0x000055f3a92a2fd8 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x25d4fd8) > #18 0x000055f3a7798815 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0xaca815) > #19 0x000055f3a77961a7 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0xac81a7) > #20 0x000055f3a9039689 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const::'lambda'()>(long) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x236b689) > #21 0x000055f3a887baa7 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1badaa7) > #22 0x000055f3a903a802 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const (.part.0) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x236c802) > #23 0x000055f3a900fbec clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2341bec) > #24 0x000055f3a9010679 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2342679) > #25 0x000055f3a901e8f1 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x23508f1) > #26 0x000055f3a7717e6f main (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0xa49e6f) > #27 0x00007f750d235d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90) > #28 0x00007f750d235e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40) > #29 0x000055f3a7795b55 _start (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0xac7b55) > clang-12: error: clang frontend command failed with exit code 139 (use -v to see invocation) > clang version 12.0.1 (https://github.com/llvm/llvm-project.git fed41342a82f5a3a9201819a82bf7a48313e296b) > Target: x86_64-unknown-linux-gnu > Thread model: posix > InstalledDir: /home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin > clang-12: note: diagnostic msg: > ******************** > > PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: > Preprocessed source(s) and associated run script(s) are located at: > clang-12: note: diagnostic msg: /tmp/conftest-968380.c > clang-12: note: diagnostic msg: /tmp/conftest-968380.sh > clang-12: note: diagnostic msg: > > ******************** > configure:8180: $? = 139 > configure: failed program was: > | /* confdefs.h */ > | #define PACKAGE_NAME "LibreOffice" > | #define PACKAGE_TARNAME "libreoffice" > | #define PACKAGE_VERSION "24.8.0.0.alpha0+" > | #define PACKAGE_STRING "LibreOffice 24.8.0.0.alpha0+" > | #define PACKAGE_BUGREPORT "" > | #define PACKAGE_URL "http://documentfoundation.org/" > | #define LIBO_VERSION_MAJOR 24 > | #define LIBO_VERSION_MINOR 8 > | #define LIBO_VERSION_MICRO 0 > | #define LIBO_VERSION_PATCH 0 > | #define LIBO_THIS_YEAR 2024 > | #define SRCDIR "/home/sberg/lo0/core" > | #define SRC_ROOT "/home/sberg/lo0/core" > | #define BUILDDIR "/home/sberg/lo0/core" > | #define USE_HEADLESS_CODE 1 > | #define ENABLE_HEADLESS 1 > | /* end confdefs.h. */ > | > | /* Does the compiler advertise C89 conformance? > | Do not test the value of __STDC__, because some compilers set it to 0 > | while being otherwise adequately conformant. */ > | #if !defined __STDC__ > | # error "Compiler does not advertise C89 conformance" > | #endif > | > | #include <stddef.h> > | #include <stdarg.h> > | struct stat; > | /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ > | struct buf { int x; }; > | struct buf * (*rcsopen) (struct buf *, struct stat *, int); > | static char *e (p, i) > | char **p; > | int i; > | { > | return p[i]; > | } > | static char *f (char * (*g) (char **, int), char **p, ...) > | { > | char *s; > | va_list v; > | va_start (v,p); > | s = g (p, va_arg (v,int)); > | va_end (v); > | return s; > | } > | > | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has > | function prototypes and stuff, but not \xHH hex character constants. > | These do not provoke an error unfortunately, instead are silently treated > | as an "x". The following induces an error, until -std is added to get > | proper ANSI mode. Curiously \x00 != x always comes out true, for an > | array size at least. It is necessary to write \x00 == 0 to get something > | that is true only with -std. */ > | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; > | > | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters > | inside strings and character constants. */ > | #define FOO(x) 'x' > | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; > | > | int test (int i, double x); > | struct s1 {int (*f) (int a);}; > | struct s2 {int (*f) (double a);}; > | int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), > | int, int); > | > | // Does the compiler advertise C99 conformance? > | #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L > | # error "Compiler does not advertise C99 conformance" > | #endif > | > | #include <stdbool.h> > | extern int puts (const char *); > | extern int printf (const char *, ...); > | extern int dprintf (int, const char *, ...); > | extern void *malloc (size_t); > | > | // Check varargs macros. These examples are taken from C99 6.10.3.5. > | // dprintf is used instead of fprintf to avoid needing to declare > | // FILE and stderr. > | #define debug(...) dprintf (2, __VA_ARGS__) > | #define showlist(...) puts (#__VA_ARGS__) > | #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) > | static void > | test_varargs_macros (void) > | { > | int x = 1234; > | int y = 5678; > | debug ("Flag"); > | debug ("X = %d\n", x); > | showlist (The first, second, and third items.); > | report (x>y, "x is %d but y is %d", x, y); > | } > | > | // Check long long types. > | #define BIG64 18446744073709551615ull > | #define BIG32 4294967295ul > | #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) > | #if !BIG_OK > | #error "your preprocessor is broken" > | #endif > | #if BIG_OK > | #else > | #error "your preprocessor is broken" > | #endif > | static long long int bignum = -9223372036854775807LL; > | static unsigned long long int ubignum = BIG64; > | > | struct incomplete_array > | { > | int datasize; > | double data[]; > | }; > | > | struct named_init { > | int number; > | const wchar_t *name; > | double average; > | }; > | > | typedef const char *ccp; > | > | static inline int > | test_restrict (ccp restrict text) > | { > | // See if C++-style comments work. > | // Iterate through items via the restricted pointer. > | // Also check for declarations in for loops. > | for (unsigned int i = 0; *(text+i) != '\0'; ++i) > | continue; > | return 0; > | } > | > | // Check varargs and va_copy. > | static bool > | test_varargs (const char *format, ...) > | { > | va_list args; > | va_start (args, format); > | va_list args_copy; > | va_copy (args_copy, args); > | > | const char *str = ""; > | int number = 0; > | float fnumber = 0; > | > | while (*format) > | { > | switch (*format++) > | { > | case 's': // string > | str = va_arg (args_copy, const char *); > | break; > | case 'd': // int > | number = va_arg (args_copy, int); > | break; > | case 'f': // float > | fnumber = va_arg (args_copy, double); > | break; > | default: > | break; > | } > | } > | va_end (args_copy); > | va_end (args); > | > | return *str && number && fnumber; > | } > | > | > | // Does the compiler advertise C11 conformance? > | #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L > | # error "Compiler does not advertise C11 conformance" > | #endif > | > | // Check _Alignas. > | char _Alignas (double) aligned_as_double; > | char _Alignas (0) no_special_alignment; > | extern char aligned_as_int; > | char _Alignas (0) _Alignas (int) aligned_as_int; > | > | // Check _Alignof. > | enum > | { > | int_alignment = _Alignof (int), > | int_array_alignment = _Alignof (int[100]), > | char_alignment = _Alignof (char) > | }; > | _Static_assert (0 < -_Alignof (int), "_Alignof is signed"); > | > | // Check _Noreturn. > | int _Noreturn does_not_return (void) { for (;;) continue; } > | > | // Check _Static_assert. > | struct test_static_assert > | { > | int x; > | _Static_assert (sizeof (int) <= sizeof (long int), > | "_Static_assert does not work in struct"); > | long int y; > | }; > | > | // Check UTF-8 literals. > | #define u8 syntax error! > | char const utf8_literal[] = u8"happens to be ASCII" "another string"; > | > | // Check duplicate typedefs. > | typedef long *long_ptr; > | typedef long int *long_ptr; > | typedef long_ptr long_ptr; > | > | // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. > | struct anonymous > | { > | union { > | struct { int i; int j; }; > | struct { int k; long int l; } w; > | }; > | int m; > | } v1; > | > | > | int > | main (int argc, char **argv) > | { > | int ok = 0; > | > | ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); > | > | > | // Check bool. > | _Bool success = false; > | success |= (argc != 0); > | > | // Check restrict. > | if (test_restrict ("String literal") == 0) > | success = true; > | char *restrict newvar = "Another string"; > | > | // Check varargs. > | success &= test_varargs ("s, d' f .", "string", 65, 34.234); > | test_varargs_macros (); > | > | // Check flexible array members. > | struct incomplete_array *ia = > | malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); > | ia->datasize = 10; > | for (int i = 0; i < ia->datasize; ++i) > | ia->data[i] = i * 1.234; > | > | // Check named initializers. > | struct named_init ni = { > | .number = 34, > | .name = L"Test wide string", > | .average = 543.34343, > | }; > | > | ni.number = 58; > | > | int dynamic_array[ni.number]; > | dynamic_array[0] = argv[0][0]; > | dynamic_array[ni.number - 1] = 543; > | > | // work around unused variable warnings > | ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' > | || dynamic_array[ni.number - 1] != 543); > | > | > | _Static_assert ((offsetof (struct anonymous, i) > | == offsetof (struct anonymous, w.k)), > | "Anonymous union alignment botch"); > | v1.i = 2; > | v1.w.k = 5; > | ok |= v1.i != 5; > | > | return ok; > | } > | > configure:8180: /home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang -fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=local-bounds -fsanitize-blacklist=/home/sberg/lo0/core/sanitize-ubsan-excludelist -std=gnu11 -c -g -O2 conftest.c >&5 > configure:8180: $? = 0 > configure:8201: result: -std=gnu11 Change-Id: I9122d0d853d0010155d57cb1d1d56f7c453d5208 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165904 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> (cherry picked from commit 42f6e89) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173098 Tested-by: allotropia jenkins <[email protected]>
...in code newly introduced in 135ce25 "tdf#146487 Don't show generic diagram title when there is an empty title given", which caused CppunitTest_chart2_export2 to fail with > /oox/inc/drawingml/chart/plotareaconverter.hxx:78:62: runtime error: load of value 222, which is not a valid value for type 'bool' > #0 0x7f95cd9ed87c in oox::drawingml::chart::PlotAreaConverter::isSingleSeriesTitle() const /oox/inc/drawingml/chart/plotareaconverter.hxx:78:62 > #1 0x7f95cd9e506f in oox::drawingml::chart::ChartSpaceConverter::convertFromModel(com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, com::sun::star::awt::Point const&) /oox/source/drawingml/chart/chartspaceconverter.cxx:189:53 > #2 0x7f95cd9b6c34 in oox::drawingml::chart::ChartConverter::convertFromModel(oox::core::XmlFilterBase&, oox::drawingml::chart::ChartSpaceModel&, com::sun::star::uno::Reference<com::sun::star::chart2::XChartDocument> const&, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, com::sun::star::awt::Point const&, com::sun::star::awt::Size const&) /oox/source/drawingml/chart/chartconverter.cxx:93:20 > #3 0x7f95ce548f59 in oox::drawingml::Shape::finalizeXShape(oox::core::XmlFilterBase&, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&) /oox/source/drawingml/shape.cxx:2245:50 > #4 0x7f95438150b2 in oox::xls::Shape::finalizeXShape(oox::core::XmlFilterBase&, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&) /sc/source/filter/oox/drawingfragment.cxx:113:30 > #5 0x7f95ce5267bb in oox::drawingml::Shape::createAndInsert(oox::core::XmlFilterBase&, rtl::OUString const&, oox::drawingml::Theme const*, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, bool, bool, basegfx::B2DHomMatrix&, oox::drawingml::FillProperties const&, std::shared_ptr<oox::drawingml::Shape>) /oox/source/drawingml/shape.cxx:1964:9 > #6 0x7f95ce4edb54 in oox::drawingml::Shape::addShape(oox::core::XmlFilterBase&, oox::drawingml::Theme const*, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, basegfx::B2DHomMatrix const&, oox::drawingml::FillProperties const&, std::__debug::map<rtl::OUString, std::shared_ptr<oox::drawingml::Shape>, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, std::shared_ptr<oox::drawingml::Shape> > > >*, std::shared_ptr<oox::drawingml::Shape>) /oox/source/drawingml/shape.cxx:366:41 > #7 0x7f954381ef79 in oox::xls::DrawingFragment::onEndElement() /sc/source/filter/oox/drawingfragment.cxx:335:30 > #8 0x7f95cdcaee54 in oox::core::ContextHandler2Helper::implEndElement(int) /oox/source/core/contexthandler2.cxx:125:9 > #9 0x7f95cdd5c116 in oox::core::FragmentHandler2::endFastElement(int) /oox/source/core/fragmenthandler2.cxx:91:5 > #10 0x7f95caf68fca in (anonymous namespace)::Entity::endElement() /sax/source/fastparser/fastparser.cxx:514:27 > #11 0x7f95caf68998 in sax_fastparser::FastSaxParserImpl::callbackEndElement() /sax/source/fastparser/fastparser.cxx:1331:17 > #12 0x7f95caf58444 in (anonymous namespace)::call_callbackEndElement(void*, unsigned char const*, unsigned char const*, unsigned char const*) /sax/source/fastparser/fastparser.cxx:338:18 > #13 0x7f960adebeda in xmlParseEndTag2 /workdir/UnpackedTarball/libxml2/parser.c:10090:2 > #14 0x7f960ad929b5 in xmlParseTryOrFinish /workdir/UnpackedTarball/libxml2/parser.c:11868:14 > #15 0x7f960ad86334 in xmlParseChunk /workdir/UnpackedTarball/libxml2/parser.c:12151:5 > #16 0x7f95caf53231 in sax_fastparser::FastSaxParserImpl::parse() /sax/source/fastparser/fastparser.cxx:1085:21 > #17 0x7f95caf4cd18 in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:890:9 > #18 0x7f95caf6e950 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:1470:13 > #19 0x7f95cdce50d1 in oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) /oox/source/core/fastparser.cxx:121:15 > #20 0x7f95cdce5868 in oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) /oox/source/core/fastparser.cxx:129:5 > #21 0x7f95cddbb234 in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) /oox/source/core/xmlfilterbase.cxx:414:21 > #22 0x7f95cddb9b8d in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&) /oox/source/core/xmlfilterbase.cxx:344:12 > #23 0x7f95441ceaa8 in oox::xls::WorkbookHelper::importOoxFragment(rtl::Reference<oox::core::FragmentHandler> const&) /sc/source/filter/oox/workbookhelper.cxx:1046:27 > #24 0x7f95442797f1 in oox::xls::WorksheetGlobals::finalizeDrawings() /sc/source/filter/oox/worksheethelper.cxx:1373:9 > #25 0x7f95442789e0 in oox::xls::WorksheetGlobals::finalizeDrawingImport() /sc/source/filter/oox/worksheethelper.cxx:996:5 > #26 0x7f954428744d in oox::xls::WorksheetHelper::finalizeDrawingImport() /sc/source/filter/oox/worksheethelper.cxx:1637:17 > #27 0x7f95441771de in oox::xls::WorkbookFragment::finalizeImport() /sc/source/filter/oox/workbookfragment.cxx:511:18 > #28 0x7f95cdd5b3ae in oox::core::FragmentHandler2::endDocument() /oox/source/core/fragmenthandler2.cxx:53:5 > #29 0x7f95caf4cfc2 in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:896:36 > #30 0x7f95caf6e950 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:1470:13 > #31 0x7f95cdce50d1 in oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) /oox/source/core/fastparser.cxx:121:15 > #32 0x7f95cdce5868 in oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) /oox/source/core/fastparser.cxx:129:5 > #33 0x7f95cddbb234 in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) /oox/source/core/xmlfilterbase.cxx:414:21 > #34 0x7f95cddb9b8d in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&) /oox/source/core/xmlfilterbase.cxx:344:12 > #35 0x7f95435c4daa in oox::xls::ExcelFilter::importDocument() /sc/source/filter/oox/excelfilter.cxx:113:25 > #36 0x7f95cdcf953b in oox::core::FilterBase::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /oox/source/core/filterbase.cxx:488:49 > #37 0x7f95435c7733 in oox::xls::ExcelFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sc/source/filter/oox/excelfilter.cxx:176:25 > #38 0x7f95857c5b40 in SfxObjectShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) /sfx2/source/doc/objstor.cxx:2393:34 > #39 0x7f9585781c6a in SfxObjectShell::DoLoad(SfxMedium*) /sfx2/source/doc/objstor.cxx:761:23 > #40 0x7f95859a9652 in SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sfx2/source/doc/sfxbasemodel.cxx:1980:36 > #41 0x7f95862145e9 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&) /sfx2/source/view/frmload.cxx:720:28 > #42 0x7f95536a9900 in framework::LoadEnv::impl_loadContent() /framework/source/loadenv/loadenv.cxx:1176:37 > #43 0x7f95536a091b in framework::LoadEnv::start() /framework/source/loadenv/loadenv.cxx:412:20 > #44 0x7f9553698f59 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) /framework/source/loadenv/loadenv.cxx:308:5 > #45 0x7f95536946e7 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&) /framework/source/loadenv/loadenv.cxx:168:14 > #46 0x7f955376867d in framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/desktop.cxx:591:16 > #47 0x7f95537688a6 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&) /framework/source/services/desktop.cxx > #48 0x7f9569f7cafa in unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /unotest/source/cpp/macros_test.cxx:71:62 > #49 0x7f9580718c56 in UnoApiTest::loadWithParams(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /test/source/unoapi_test.cxx:126:19 > #50 0x7f9580717ef8 in UnoApiTest::load(rtl::OUString const&, char const*) /test/source/unoapi_test.cxx:108:5 > #51 0x7f9580719254 in UnoApiTest::loadFromFile(std::basic_string_view<char16_t, std::char_traits<char16_t> >, char const*) /test/source/unoapi_test.cxx:132:5 > #52 0x7f95d8bf1018 in testTdf123647::TestBody() /chart2/qa/extras/chart2export2.cxx:1242:5 (<https://ci.libreoffice.org//job/lo_ubsan/3048/>) Change-Id: I870d811e78b8c55b84627ae609f98f623465dd9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162294 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> (cherry picked from commit 3fb9859)
At least with one ASan/UBSan setup of mine using LODE's Clang 12.0.1, ./autogen.sh would occasionally detect -std=gnu11 as the required CC "option to enable C11 features" (which would in turn cause building external/firebird to fail oddly; an issue worth investigations of its own), because Clang would occasionally crash with a SEGV on the corresponding configure test program's first invocation (without -std=gnu11) when invoked with -O2 (and happen to succeed on second invocation with -std=gnu11, so configure thinks that's needed), see below for a relevant config.log excerpt. When CC/CXX are already set (as is the case in this scenario), we could arguably skip the AC_PROG_CC/CXX checks entirely (and thus avoid configure potentially adding -std=gnu11 to CC), but at least AC_PROG_CC also internally sets the GCC shell var, which we use in configure.ac. So better be conservative and just avoid -O2 during AC_PROG_CC/CXX (whatever the autoconf motivation to include it in the first place). > configure:8165: checking for /home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang -fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=local-bounds -fsanitize-blacklist=/home/sberg/lo0/core/sanitize-ubsan-excludelist option to enable C11 features > configure:8180: /home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang -fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=local-bounds -fsanitize-blacklist=/home/sberg/lo0/core/sanitize-ubsan-excludelist -c -g -O2 conftest.c >&5 > PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. > Stack dump: > 0. Program arguments: /home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang -fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=local-bounds -fsanitize-blacklist=/home/sberg/lo0/core/sanitize-ubsan-excludelist -c -g -O2 conftest.c > 1. <eof> parser at end of file > 2. Code generation > #0 0x000055f3a890caf2 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1c3eaf2) > #1 0x000055f3a890a734 llvm::sys::RunSignalHandlers() (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1c3c734) > #2 0x000055f3a887b998 CrashRecoverySignalHandler(int) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1bad998) > #3 0x00007f750d24e520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520) > #4 0x000055f3a93f9cd4 llvm::DIE::getUnitDie() const (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x272bcd4) > #5 0x000055f3a9404574 llvm::DwarfDebug::finishEntityDefinitions() (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2736574) > #6 0x000055f3a941df99 llvm::DwarfDebug::finalizeModuleInfo() (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x274ff99) > #7 0x000055f3a9421128 llvm::DwarfDebug::endModule() (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2753128) > #8 0x000055f3a93f1219 llvm::AsmPrinter::doFinalization(llvm::Module&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2723219) > #9 0x000055f3a82478f5 llvm::FPPassManager::doFinalization(llvm::Module&) (.localalias) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x15798f5) > #10 0x000055f3a8253900 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1585900) > #11 0x000055f3a8bb57d3 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (.constprop.0) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1ee77d3) > #12 0x000055f3a8bb76ea clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1ee96ea) > #13 0x000055f3a9825876 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2b57876) > #14 0x000055f3aa35c549 clang::ParseAST(clang::Sema&, bool, bool) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x368e549) > #15 0x000055f3a91ef2d9 clang::FrontendAction::Execute() (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x25212d9) > #16 0x000055f3a91903a3 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x24c23a3) > #17 0x000055f3a92a2fd8 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x25d4fd8) > #18 0x000055f3a7798815 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0xaca815) > #19 0x000055f3a77961a7 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0xac81a7) > #20 0x000055f3a9039689 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const::'lambda'()>(long) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x236b689) > #21 0x000055f3a887baa7 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1badaa7) > #22 0x000055f3a903a802 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const (.part.0) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x236c802) > #23 0x000055f3a900fbec clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2341bec) > #24 0x000055f3a9010679 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2342679) > #25 0x000055f3a901e8f1 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x23508f1) > #26 0x000055f3a7717e6f main (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0xa49e6f) > #27 0x00007f750d235d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90) > #28 0x00007f750d235e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40) > #29 0x000055f3a7795b55 _start (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0xac7b55) > clang-12: error: clang frontend command failed with exit code 139 (use -v to see invocation) > clang version 12.0.1 (https://github.com/llvm/llvm-project.git fed41342a82f5a3a9201819a82bf7a48313e296b) > Target: x86_64-unknown-linux-gnu > Thread model: posix > InstalledDir: /home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin > clang-12: note: diagnostic msg: > ******************** > > PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: > Preprocessed source(s) and associated run script(s) are located at: > clang-12: note: diagnostic msg: /tmp/conftest-968380.c > clang-12: note: diagnostic msg: /tmp/conftest-968380.sh > clang-12: note: diagnostic msg: > > ******************** > configure:8180: $? = 139 > configure: failed program was: > | /* confdefs.h */ > | #define PACKAGE_NAME "LibreOffice" > | #define PACKAGE_TARNAME "libreoffice" > | #define PACKAGE_VERSION "24.8.0.0.alpha0+" > | #define PACKAGE_STRING "LibreOffice 24.8.0.0.alpha0+" > | #define PACKAGE_BUGREPORT "" > | #define PACKAGE_URL "http://documentfoundation.org/" > | #define LIBO_VERSION_MAJOR 24 > | #define LIBO_VERSION_MINOR 8 > | #define LIBO_VERSION_MICRO 0 > | #define LIBO_VERSION_PATCH 0 > | #define LIBO_THIS_YEAR 2024 > | #define SRCDIR "/home/sberg/lo0/core" > | #define SRC_ROOT "/home/sberg/lo0/core" > | #define BUILDDIR "/home/sberg/lo0/core" > | #define USE_HEADLESS_CODE 1 > | #define ENABLE_HEADLESS 1 > | /* end confdefs.h. */ > | > | /* Does the compiler advertise C89 conformance? > | Do not test the value of __STDC__, because some compilers set it to 0 > | while being otherwise adequately conformant. */ > | #if !defined __STDC__ > | # error "Compiler does not advertise C89 conformance" > | #endif > | > | #include <stddef.h> > | #include <stdarg.h> > | struct stat; > | /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ > | struct buf { int x; }; > | struct buf * (*rcsopen) (struct buf *, struct stat *, int); > | static char *e (p, i) > | char **p; > | int i; > | { > | return p[i]; > | } > | static char *f (char * (*g) (char **, int), char **p, ...) > | { > | char *s; > | va_list v; > | va_start (v,p); > | s = g (p, va_arg (v,int)); > | va_end (v); > | return s; > | } > | > | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has > | function prototypes and stuff, but not \xHH hex character constants. > | These do not provoke an error unfortunately, instead are silently treated > | as an "x". The following induces an error, until -std is added to get > | proper ANSI mode. Curiously \x00 != x always comes out true, for an > | array size at least. It is necessary to write \x00 == 0 to get something > | that is true only with -std. */ > | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; > | > | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters > | inside strings and character constants. */ > | #define FOO(x) 'x' > | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; > | > | int test (int i, double x); > | struct s1 {int (*f) (int a);}; > | struct s2 {int (*f) (double a);}; > | int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), > | int, int); > | > | // Does the compiler advertise C99 conformance? > | #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L > | # error "Compiler does not advertise C99 conformance" > | #endif > | > | #include <stdbool.h> > | extern int puts (const char *); > | extern int printf (const char *, ...); > | extern int dprintf (int, const char *, ...); > | extern void *malloc (size_t); > | > | // Check varargs macros. These examples are taken from C99 6.10.3.5. > | // dprintf is used instead of fprintf to avoid needing to declare > | // FILE and stderr. > | #define debug(...) dprintf (2, __VA_ARGS__) > | #define showlist(...) puts (#__VA_ARGS__) > | #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) > | static void > | test_varargs_macros (void) > | { > | int x = 1234; > | int y = 5678; > | debug ("Flag"); > | debug ("X = %d\n", x); > | showlist (The first, second, and third items.); > | report (x>y, "x is %d but y is %d", x, y); > | } > | > | // Check long long types. > | #define BIG64 18446744073709551615ull > | #define BIG32 4294967295ul > | #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) > | #if !BIG_OK > | #error "your preprocessor is broken" > | #endif > | #if BIG_OK > | #else > | #error "your preprocessor is broken" > | #endif > | static long long int bignum = -9223372036854775807LL; > | static unsigned long long int ubignum = BIG64; > | > | struct incomplete_array > | { > | int datasize; > | double data[]; > | }; > | > | struct named_init { > | int number; > | const wchar_t *name; > | double average; > | }; > | > | typedef const char *ccp; > | > | static inline int > | test_restrict (ccp restrict text) > | { > | // See if C++-style comments work. > | // Iterate through items via the restricted pointer. > | // Also check for declarations in for loops. > | for (unsigned int i = 0; *(text+i) != '\0'; ++i) > | continue; > | return 0; > | } > | > | // Check varargs and va_copy. > | static bool > | test_varargs (const char *format, ...) > | { > | va_list args; > | va_start (args, format); > | va_list args_copy; > | va_copy (args_copy, args); > | > | const char *str = ""; > | int number = 0; > | float fnumber = 0; > | > | while (*format) > | { > | switch (*format++) > | { > | case 's': // string > | str = va_arg (args_copy, const char *); > | break; > | case 'd': // int > | number = va_arg (args_copy, int); > | break; > | case 'f': // float > | fnumber = va_arg (args_copy, double); > | break; > | default: > | break; > | } > | } > | va_end (args_copy); > | va_end (args); > | > | return *str && number && fnumber; > | } > | > | > | // Does the compiler advertise C11 conformance? > | #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L > | # error "Compiler does not advertise C11 conformance" > | #endif > | > | // Check _Alignas. > | char _Alignas (double) aligned_as_double; > | char _Alignas (0) no_special_alignment; > | extern char aligned_as_int; > | char _Alignas (0) _Alignas (int) aligned_as_int; > | > | // Check _Alignof. > | enum > | { > | int_alignment = _Alignof (int), > | int_array_alignment = _Alignof (int[100]), > | char_alignment = _Alignof (char) > | }; > | _Static_assert (0 < -_Alignof (int), "_Alignof is signed"); > | > | // Check _Noreturn. > | int _Noreturn does_not_return (void) { for (;;) continue; } > | > | // Check _Static_assert. > | struct test_static_assert > | { > | int x; > | _Static_assert (sizeof (int) <= sizeof (long int), > | "_Static_assert does not work in struct"); > | long int y; > | }; > | > | // Check UTF-8 literals. > | #define u8 syntax error! > | char const utf8_literal[] = u8"happens to be ASCII" "another string"; > | > | // Check duplicate typedefs. > | typedef long *long_ptr; > | typedef long int *long_ptr; > | typedef long_ptr long_ptr; > | > | // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. > | struct anonymous > | { > | union { > | struct { int i; int j; }; > | struct { int k; long int l; } w; > | }; > | int m; > | } v1; > | > | > | int > | main (int argc, char **argv) > | { > | int ok = 0; > | > | ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); > | > | > | // Check bool. > | _Bool success = false; > | success |= (argc != 0); > | > | // Check restrict. > | if (test_restrict ("String literal") == 0) > | success = true; > | char *restrict newvar = "Another string"; > | > | // Check varargs. > | success &= test_varargs ("s, d' f .", "string", 65, 34.234); > | test_varargs_macros (); > | > | // Check flexible array members. > | struct incomplete_array *ia = > | malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); > | ia->datasize = 10; > | for (int i = 0; i < ia->datasize; ++i) > | ia->data[i] = i * 1.234; > | > | // Check named initializers. > | struct named_init ni = { > | .number = 34, > | .name = L"Test wide string", > | .average = 543.34343, > | }; > | > | ni.number = 58; > | > | int dynamic_array[ni.number]; > | dynamic_array[0] = argv[0][0]; > | dynamic_array[ni.number - 1] = 543; > | > | // work around unused variable warnings > | ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' > | || dynamic_array[ni.number - 1] != 543); > | > | > | _Static_assert ((offsetof (struct anonymous, i) > | == offsetof (struct anonymous, w.k)), > | "Anonymous union alignment botch"); > | v1.i = 2; > | v1.w.k = 5; > | ok |= v1.i != 5; > | > | return ok; > | } > | > configure:8180: /home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang -fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=local-bounds -fsanitize-blacklist=/home/sberg/lo0/core/sanitize-ubsan-excludelist -std=gnu11 -c -g -O2 conftest.c >&5 > configure:8180: $? = 0 > configure:8201: result: -std=gnu11 Change-Id: I9122d0d853d0010155d57cb1d1d56f7c453d5208 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165904 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> (cherry picked from commit 42f6e89) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173098 Tested-by: allotropia jenkins <[email protected]>
...in code newly introduced in 135ce25 "tdf#146487 Don't show generic diagram title when there is an empty title given", which caused CppunitTest_chart2_export2 to fail with > /oox/inc/drawingml/chart/plotareaconverter.hxx:78:62: runtime error: load of value 222, which is not a valid value for type 'bool' > #0 0x7f95cd9ed87c in oox::drawingml::chart::PlotAreaConverter::isSingleSeriesTitle() const /oox/inc/drawingml/chart/plotareaconverter.hxx:78:62 > #1 0x7f95cd9e506f in oox::drawingml::chart::ChartSpaceConverter::convertFromModel(com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, com::sun::star::awt::Point const&) /oox/source/drawingml/chart/chartspaceconverter.cxx:189:53 > #2 0x7f95cd9b6c34 in oox::drawingml::chart::ChartConverter::convertFromModel(oox::core::XmlFilterBase&, oox::drawingml::chart::ChartSpaceModel&, com::sun::star::uno::Reference<com::sun::star::chart2::XChartDocument> const&, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, com::sun::star::awt::Point const&, com::sun::star::awt::Size const&) /oox/source/drawingml/chart/chartconverter.cxx:93:20 > #3 0x7f95ce548f59 in oox::drawingml::Shape::finalizeXShape(oox::core::XmlFilterBase&, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&) /oox/source/drawingml/shape.cxx:2245:50 > #4 0x7f95438150b2 in oox::xls::Shape::finalizeXShape(oox::core::XmlFilterBase&, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&) /sc/source/filter/oox/drawingfragment.cxx:113:30 > #5 0x7f95ce5267bb in oox::drawingml::Shape::createAndInsert(oox::core::XmlFilterBase&, rtl::OUString const&, oox::drawingml::Theme const*, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, bool, bool, basegfx::B2DHomMatrix&, oox::drawingml::FillProperties const&, std::shared_ptr<oox::drawingml::Shape>) /oox/source/drawingml/shape.cxx:1964:9 > #6 0x7f95ce4edb54 in oox::drawingml::Shape::addShape(oox::core::XmlFilterBase&, oox::drawingml::Theme const*, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, basegfx::B2DHomMatrix const&, oox::drawingml::FillProperties const&, std::__debug::map<rtl::OUString, std::shared_ptr<oox::drawingml::Shape>, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, std::shared_ptr<oox::drawingml::Shape> > > >*, std::shared_ptr<oox::drawingml::Shape>) /oox/source/drawingml/shape.cxx:366:41 > #7 0x7f954381ef79 in oox::xls::DrawingFragment::onEndElement() /sc/source/filter/oox/drawingfragment.cxx:335:30 > #8 0x7f95cdcaee54 in oox::core::ContextHandler2Helper::implEndElement(int) /oox/source/core/contexthandler2.cxx:125:9 > #9 0x7f95cdd5c116 in oox::core::FragmentHandler2::endFastElement(int) /oox/source/core/fragmenthandler2.cxx:91:5 > #10 0x7f95caf68fca in (anonymous namespace)::Entity::endElement() /sax/source/fastparser/fastparser.cxx:514:27 > #11 0x7f95caf68998 in sax_fastparser::FastSaxParserImpl::callbackEndElement() /sax/source/fastparser/fastparser.cxx:1331:17 > #12 0x7f95caf58444 in (anonymous namespace)::call_callbackEndElement(void*, unsigned char const*, unsigned char const*, unsigned char const*) /sax/source/fastparser/fastparser.cxx:338:18 > #13 0x7f960adebeda in xmlParseEndTag2 /workdir/UnpackedTarball/libxml2/parser.c:10090:2 > #14 0x7f960ad929b5 in xmlParseTryOrFinish /workdir/UnpackedTarball/libxml2/parser.c:11868:14 > #15 0x7f960ad86334 in xmlParseChunk /workdir/UnpackedTarball/libxml2/parser.c:12151:5 > #16 0x7f95caf53231 in sax_fastparser::FastSaxParserImpl::parse() /sax/source/fastparser/fastparser.cxx:1085:21 > #17 0x7f95caf4cd18 in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:890:9 > #18 0x7f95caf6e950 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:1470:13 > #19 0x7f95cdce50d1 in oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) /oox/source/core/fastparser.cxx:121:15 > #20 0x7f95cdce5868 in oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) /oox/source/core/fastparser.cxx:129:5 > #21 0x7f95cddbb234 in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) /oox/source/core/xmlfilterbase.cxx:414:21 > #22 0x7f95cddb9b8d in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&) /oox/source/core/xmlfilterbase.cxx:344:12 > #23 0x7f95441ceaa8 in oox::xls::WorkbookHelper::importOoxFragment(rtl::Reference<oox::core::FragmentHandler> const&) /sc/source/filter/oox/workbookhelper.cxx:1046:27 > #24 0x7f95442797f1 in oox::xls::WorksheetGlobals::finalizeDrawings() /sc/source/filter/oox/worksheethelper.cxx:1373:9 > #25 0x7f95442789e0 in oox::xls::WorksheetGlobals::finalizeDrawingImport() /sc/source/filter/oox/worksheethelper.cxx:996:5 > #26 0x7f954428744d in oox::xls::WorksheetHelper::finalizeDrawingImport() /sc/source/filter/oox/worksheethelper.cxx:1637:17 > #27 0x7f95441771de in oox::xls::WorkbookFragment::finalizeImport() /sc/source/filter/oox/workbookfragment.cxx:511:18 > #28 0x7f95cdd5b3ae in oox::core::FragmentHandler2::endDocument() /oox/source/core/fragmenthandler2.cxx:53:5 > #29 0x7f95caf4cfc2 in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:896:36 > #30 0x7f95caf6e950 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:1470:13 > #31 0x7f95cdce50d1 in oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) /oox/source/core/fastparser.cxx:121:15 > #32 0x7f95cdce5868 in oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) /oox/source/core/fastparser.cxx:129:5 > #33 0x7f95cddbb234 in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) /oox/source/core/xmlfilterbase.cxx:414:21 > #34 0x7f95cddb9b8d in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&) /oox/source/core/xmlfilterbase.cxx:344:12 > #35 0x7f95435c4daa in oox::xls::ExcelFilter::importDocument() /sc/source/filter/oox/excelfilter.cxx:113:25 > #36 0x7f95cdcf953b in oox::core::FilterBase::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /oox/source/core/filterbase.cxx:488:49 > #37 0x7f95435c7733 in oox::xls::ExcelFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sc/source/filter/oox/excelfilter.cxx:176:25 > #38 0x7f95857c5b40 in SfxObjectShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) /sfx2/source/doc/objstor.cxx:2393:34 > #39 0x7f9585781c6a in SfxObjectShell::DoLoad(SfxMedium*) /sfx2/source/doc/objstor.cxx:761:23 > #40 0x7f95859a9652 in SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sfx2/source/doc/sfxbasemodel.cxx:1980:36 > #41 0x7f95862145e9 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&) /sfx2/source/view/frmload.cxx:720:28 > #42 0x7f95536a9900 in framework::LoadEnv::impl_loadContent() /framework/source/loadenv/loadenv.cxx:1176:37 > #43 0x7f95536a091b in framework::LoadEnv::start() /framework/source/loadenv/loadenv.cxx:412:20 > #44 0x7f9553698f59 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) /framework/source/loadenv/loadenv.cxx:308:5 > #45 0x7f95536946e7 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&) /framework/source/loadenv/loadenv.cxx:168:14 > #46 0x7f955376867d in framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/desktop.cxx:591:16 > #47 0x7f95537688a6 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&) /framework/source/services/desktop.cxx > #48 0x7f9569f7cafa in unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /unotest/source/cpp/macros_test.cxx:71:62 > #49 0x7f9580718c56 in UnoApiTest::loadWithParams(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /test/source/unoapi_test.cxx:126:19 > #50 0x7f9580717ef8 in UnoApiTest::load(rtl::OUString const&, char const*) /test/source/unoapi_test.cxx:108:5 > #51 0x7f9580719254 in UnoApiTest::loadFromFile(std::basic_string_view<char16_t, std::char_traits<char16_t> >, char const*) /test/source/unoapi_test.cxx:132:5 > #52 0x7f95d8bf1018 in testTdf123647::TestBody() /chart2/qa/extras/chart2export2.cxx:1242:5 (<https://ci.libreoffice.org//job/lo_ubsan/3048/>) Change-Id: I870d811e78b8c55b84627ae609f98f623465dd9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162294 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> (cherry picked from commit 3fb9859)
although the actual order doesn't change there is a Delete/Insert of the object in case the order should change. ::Insert will check if sorted and resort if not anyway, so presumably if we just skip the middle-men and resort here if we need to then that is equivalent, but without the invalidation for the already sorted case. #0 SwSortedObjs::Remove (this=0x510ed40, _rAnchoredObj=...) at core/sw/source/core/layout/sortedobjs.cxx:243 #1 0x00007fffce0af130 in SwSortedObjs::Update (this=0x510ed40, _rAnchoredObj=...) at core/sw/source/core/layout/sortedobjs.cxx:282 #2 0x00007fffcdf32c40 in SwAnchoredObject::UpdateObjInSortedList (this=0x51123c0) at core/sw/source/core/layout/anchoredobject.cxx:661 #3 0x00007fffcdf8fc38 in SwFlyFrame::SwClientNotify (this=0x5112260, rMod=..., rHint=...) at core/sw/source/core/layout/fly.cxx:859 #4 0x00007fffcdf9d1bf in SwFlyAtContentFrame::SwClientNotify (this=0x5112260, rMod=..., rHint=...) at core/sw/source/core/layout/flycnt.cxx:112 #5 0x00007fffcd65bca8 in SwModify::CallSwClientNotify (this=0x4e68da0, rHint=...) at core/sw/source/core/attr/calbck.cxx:311 #6 0x00007fffcd65bd71 in sw::BroadcastingModify::CallSwClientNotify (this=0x4e68da0, rHint=...) at core/sw/source/core/attr/calbck.cxx:316 #7 0x00007fffcd65b42f in SwModify::SwClientNotify (this=0x4e68da0, rHint=...) at core/sw/source/core/attr/calbck.cxx:302 #8 0x00007fffcd66771b in SwFormat::SwClientNotify (this=0x4e68da0, rHint=...) at core/sw/source/core/attr/format.cxx:300 #9 0x00007fffcdf4448a in SwFrameFormat::SwClientNotify (this=0x4e68da0, rMod=..., rHint=...) at core/sw/source/core/layout/atrfrm.cxx:2843 #10 0x00007fffcd65be1e in sw::ClientNotifyAttrChg (rModify=..., aSet=..., aOld=..., aNew=...) at core/sw/source/core/attr/calbck.cxx:325 #11 0x00007fffcd66948e in SwFormat::SetFormatAttr (this=0x4e68da0, rSet=SfxItemSet of pool 0x1bcebe0 with parent 0x4e68e68 and Which ranges: [(88, 141), (159, 159), (1014, 1034)] = {...}) at core/sw/source/core/attr/format.cxx:597 #12 0x00007fffce649a2c in SwXFrame::setPropertyValue (this=0x5e47b90, rPropertyName="Size", _rValue=uno::Any("com.sun.star.awt.Size": ...)) at core/sw/source/core/unocore/unoframe.cxx:1867 #13 0x00007fffcdc4d7ea in SwTextBoxHelper::syncProperty (pShape=0x4dce770, nWID=89, nMemberID=0 '\000', rValue=uno::Any("com.sun.star.awt.Size": ...), pObj=0x0) at core/sw/source/core/doc/textboxhelper.cxx:995 #14 0x00007fffcdf2e2d7 in SwAnchoredDrawObject::GetObjBoundRect (this=0x4e69dd0) at core/sw/source/core/layout/anchoreddrawobject.cxx:757 #15 0x00007fffcdf320ca in SwAnchoredObject::GetObjRectWithSpaces (this=0x4e69dd0) at core/sw/source/core/layout/anchoredobject.cxx:575 #16 0x00007fffcdf31eaa in SwAnchoredObject::InvalidateObjPosForConsiderWrapInfluence (this=0x4e69dd0) at core/sw/source/core/layout/anchoredobject.cxx:400 #17 0x00007fffcdf32be5 in SwAnchoredObject::UpdateObjInSortedList (this=0x510e530) at core/sw/source/core/layout/anchoredobject.cxx:654 #18 0x00007fffcdf8fc38 in SwFlyFrame::SwClientNotify (this=0x510e3d0, rMod=..., rHint=...) at core/sw/source/core/layout/fly.cxx:859 #19 0x00007fffcdf9d1bf in SwFlyAtContentFrame::SwClientNotify (this=0x510e3d0, rMod=..., rHint=...) at core/sw/source/core/layout/flycnt.cxx:112 #20 0x00007fffcd65bca8 in SwModify::CallSwClientNotify (this=0x4e364a0, rHint=...) at core/sw/source/core/attr/calbck.cxx:311 #21 0x00007fffcd65bd71 in sw::BroadcastingModify::CallSwClientNotify (this=0x4e364a0, rHint=...) at core/sw/source/core/attr/calbck.cxx:316 #22 0x00007fffcd65b42f in SwModify::SwClientNotify (this=0x4e364a0, rHint=...) at core/sw/source/core/attr/calbck.cxx:302 #23 0x00007fffcd66771b in SwFormat::SwClientNotify (this=0x4e364a0, rHint=...) at core/sw/source/core/attr/format.cxx:300 #24 0x00007fffcdf4448a in SwFrameFormat::SwClientNotify (this=0x4e364a0, rMod=..., rHint=...) at core/sw/source/core/layout/atrfrm.cxx:2843 #25 0x00007fffcd65be1e in sw::ClientNotifyAttrChg (rModify=..., aSet=..., aOld=..., aNew=...) at core/sw/source/core/attr/calbck.cxx:325 #26 0x00007fffcd66948e in SwFormat::SetFormatAttr (this=0x4e364a0, rSet=SfxItemSet of pool 0x1bcebe0 with parent 0x4e36568 and Which ranges: [(88, 141), (159, 159), (1014, 1034)] = {...}) at core/sw/source/core/attr/format.cxx:597 #27 0x00007fffce649a2c in SwXFrame::setPropertyValue (this=0x4a86e10, rPropertyName="Size", _rValue=uno::Any("com.sun.star.awt.Size": ...)) at core/sw/source/core/unocore/unoframe.cxx:1867 #28 0x00007fffcdc4d7ea in SwTextBoxHelper::syncProperty (pShape=0x4dc65f0, nWID=89, nMemberID=0 '\000', rValue=uno::Any("com.sun.star.awt.Size": ...), pObj=0x0) at core/sw/source/core/doc/textboxhelper.cxx:995 #29 0x00007fffcdf2e2d7 in SwAnchoredDrawObject::GetObjBoundRect (this=0x4e3a0d0) at core/sw/source/core/layout/anchoreddrawobject.cxx:757 #30 0x00007fffcdf320ca in SwAnchoredObject::GetObjRectWithSpaces (this=0x4e3a0d0) at core/sw/source/core/layout/anchoredobject.cxx:575 #31 0x00007fffcdf815b3 in (anonymous namespace)::IsNextContentFullPage (rThis=...) at core/sw/source/core/layout/flowfrm.cxx:217 #32 0x00007fffcdf81002 in SwFlowFrame::IsKeep (this=0x4e5a630, rKeep=..., rBreak=..., bCheckIfLastRowShouldKeep=false) at core/sw/source/core/layout/flowfrm.cxx:259 Change-Id: If2191e8b99d1b0347bab54a704013ce0a9a19410 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176992 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> (cherry picked from commit f2cf4d9)
although the actual order doesn't change there is a Delete/Insert of the object in case the order should change. ::Insert will check if sorted and resort if not anyway, so presumably if we just skip the middle-men and resort here if we need to then that is equivalent, but without the invalidation for the already sorted case. #0 SwSortedObjs::Remove (this=0x510ed40, _rAnchoredObj=...) at core/sw/source/core/layout/sortedobjs.cxx:243 #1 0x00007fffce0af130 in SwSortedObjs::Update (this=0x510ed40, _rAnchoredObj=...) at core/sw/source/core/layout/sortedobjs.cxx:282 #2 0x00007fffcdf32c40 in SwAnchoredObject::UpdateObjInSortedList (this=0x51123c0) at core/sw/source/core/layout/anchoredobject.cxx:661 #3 0x00007fffcdf8fc38 in SwFlyFrame::SwClientNotify (this=0x5112260, rMod=..., rHint=...) at core/sw/source/core/layout/fly.cxx:859 #4 0x00007fffcdf9d1bf in SwFlyAtContentFrame::SwClientNotify (this=0x5112260, rMod=..., rHint=...) at core/sw/source/core/layout/flycnt.cxx:112 #5 0x00007fffcd65bca8 in SwModify::CallSwClientNotify (this=0x4e68da0, rHint=...) at core/sw/source/core/attr/calbck.cxx:311 #6 0x00007fffcd65bd71 in sw::BroadcastingModify::CallSwClientNotify (this=0x4e68da0, rHint=...) at core/sw/source/core/attr/calbck.cxx:316 #7 0x00007fffcd65b42f in SwModify::SwClientNotify (this=0x4e68da0, rHint=...) at core/sw/source/core/attr/calbck.cxx:302 #8 0x00007fffcd66771b in SwFormat::SwClientNotify (this=0x4e68da0, rHint=...) at core/sw/source/core/attr/format.cxx:300 #9 0x00007fffcdf4448a in SwFrameFormat::SwClientNotify (this=0x4e68da0, rMod=..., rHint=...) at core/sw/source/core/layout/atrfrm.cxx:2843 #10 0x00007fffcd65be1e in sw::ClientNotifyAttrChg (rModify=..., aSet=..., aOld=..., aNew=...) at core/sw/source/core/attr/calbck.cxx:325 #11 0x00007fffcd66948e in SwFormat::SetFormatAttr (this=0x4e68da0, rSet=SfxItemSet of pool 0x1bcebe0 with parent 0x4e68e68 and Which ranges: [(88, 141), (159, 159), (1014, 1034)] = {...}) at core/sw/source/core/attr/format.cxx:597 #12 0x00007fffce649a2c in SwXFrame::setPropertyValue (this=0x5e47b90, rPropertyName="Size", _rValue=uno::Any("com.sun.star.awt.Size": ...)) at core/sw/source/core/unocore/unoframe.cxx:1867 #13 0x00007fffcdc4d7ea in SwTextBoxHelper::syncProperty (pShape=0x4dce770, nWID=89, nMemberID=0 '\000', rValue=uno::Any("com.sun.star.awt.Size": ...), pObj=0x0) at core/sw/source/core/doc/textboxhelper.cxx:995 #14 0x00007fffcdf2e2d7 in SwAnchoredDrawObject::GetObjBoundRect (this=0x4e69dd0) at core/sw/source/core/layout/anchoreddrawobject.cxx:757 #15 0x00007fffcdf320ca in SwAnchoredObject::GetObjRectWithSpaces (this=0x4e69dd0) at core/sw/source/core/layout/anchoredobject.cxx:575 #16 0x00007fffcdf31eaa in SwAnchoredObject::InvalidateObjPosForConsiderWrapInfluence (this=0x4e69dd0) at core/sw/source/core/layout/anchoredobject.cxx:400 #17 0x00007fffcdf32be5 in SwAnchoredObject::UpdateObjInSortedList (this=0x510e530) at core/sw/source/core/layout/anchoredobject.cxx:654 #18 0x00007fffcdf8fc38 in SwFlyFrame::SwClientNotify (this=0x510e3d0, rMod=..., rHint=...) at core/sw/source/core/layout/fly.cxx:859 #19 0x00007fffcdf9d1bf in SwFlyAtContentFrame::SwClientNotify (this=0x510e3d0, rMod=..., rHint=...) at core/sw/source/core/layout/flycnt.cxx:112 #20 0x00007fffcd65bca8 in SwModify::CallSwClientNotify (this=0x4e364a0, rHint=...) at core/sw/source/core/attr/calbck.cxx:311 #21 0x00007fffcd65bd71 in sw::BroadcastingModify::CallSwClientNotify (this=0x4e364a0, rHint=...) at core/sw/source/core/attr/calbck.cxx:316 #22 0x00007fffcd65b42f in SwModify::SwClientNotify (this=0x4e364a0, rHint=...) at core/sw/source/core/attr/calbck.cxx:302 #23 0x00007fffcd66771b in SwFormat::SwClientNotify (this=0x4e364a0, rHint=...) at core/sw/source/core/attr/format.cxx:300 #24 0x00007fffcdf4448a in SwFrameFormat::SwClientNotify (this=0x4e364a0, rMod=..., rHint=...) at core/sw/source/core/layout/atrfrm.cxx:2843 #25 0x00007fffcd65be1e in sw::ClientNotifyAttrChg (rModify=..., aSet=..., aOld=..., aNew=...) at core/sw/source/core/attr/calbck.cxx:325 #26 0x00007fffcd66948e in SwFormat::SetFormatAttr (this=0x4e364a0, rSet=SfxItemSet of pool 0x1bcebe0 with parent 0x4e36568 and Which ranges: [(88, 141), (159, 159), (1014, 1034)] = {...}) at core/sw/source/core/attr/format.cxx:597 #27 0x00007fffce649a2c in SwXFrame::setPropertyValue (this=0x4a86e10, rPropertyName="Size", _rValue=uno::Any("com.sun.star.awt.Size": ...)) at core/sw/source/core/unocore/unoframe.cxx:1867 #28 0x00007fffcdc4d7ea in SwTextBoxHelper::syncProperty (pShape=0x4dc65f0, nWID=89, nMemberID=0 '\000', rValue=uno::Any("com.sun.star.awt.Size": ...), pObj=0x0) at core/sw/source/core/doc/textboxhelper.cxx:995 #29 0x00007fffcdf2e2d7 in SwAnchoredDrawObject::GetObjBoundRect (this=0x4e3a0d0) at core/sw/source/core/layout/anchoreddrawobject.cxx:757 #30 0x00007fffcdf320ca in SwAnchoredObject::GetObjRectWithSpaces (this=0x4e3a0d0) at core/sw/source/core/layout/anchoredobject.cxx:575 #31 0x00007fffcdf815b3 in (anonymous namespace)::IsNextContentFullPage (rThis=...) at core/sw/source/core/layout/flowfrm.cxx:217 #32 0x00007fffcdf81002 in SwFlowFrame::IsKeep (this=0x4e5a630, rKeep=..., rBreak=..., bCheckIfLastRowShouldKeep=false) at core/sw/source/core/layout/flowfrm.cxx:259 Change-Id: If2191e8b99d1b0347bab54a704013ce0a9a19410 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176992 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> (cherry picked from commit f2cf4d9)
on loading tdf97831-15.xlsx #0 0x00007fffebea8664 in __pthread_kill_implementation () at /lib64/libc.so.6 #1 0x00007fffebe4fc4e in raise () at /lib64/libc.so.6 #2 0x00007fffebe37902 in abort () at /lib64/libc.so.6 #3 0x00007fffebaa84e9 in __gnu_debug::_Error_formatter::_M_error() const [clone .cold] () at /lib64/libstdc++.so.6 #4 0x00007fffa8d75183 in __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<unsigned int const*, std::__cxx1998::vector<unsigned int, std::allocator<unsigned int> > >, std::__debug::vector<unsigned int, std::allocator<unsigned int> >, std::forward_iterator_tag>::operator++ (this=0x7fffffff9360) at /usr/include/c++/14/debug/safe_iterator.h:392 #5 0x00007fffa8d73da2 in __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<unsigned int const*, std::__cxx1998::vector<unsigned int, std::allocator<unsigned int> > >, std::__debug::vector<unsigned int, std::allocator<unsigned int> >, std::bidirectional_iterator_tag>::operator++ (this=0x7fffffff9360) at /usr/include/c++/14/debug/safe_iterator.h:679 #6 0x00007fffa8d71fd2 in __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<unsigned int const*, std::__cxx1998::vector<unsigned int, std::allocator<unsigned int> > >, std::__debug::vector<unsigned int, std::allocator<unsigned int> >, std::random_access_iterator_tag>::operator++ (this=0x7fffffff9360) at /usr/include/c++/14/debug/safe_iterator.h:849 #7 0x00007fffa90d204e in ScDocument::GetCondResult (this=0x18fbcb0, rCell=..., rPos=..., rList=..., rIndex=...) at co-24.04/sc/source/core/data/documen4.cxx:816 #8 0x00007fffa90d1ea1 in ScDocument::GetCondResult (this=0x18fbcb0, nCol=7, nRow=1, nTab=0, pCell=0x7fffffff9420) at co-24.04/sc/source/core/data/documen4.cxx:809 #9 0x00007fffa8f2740d in ScColumn::GetNeededSize (this=0x7fffd000b4d0, nRow=1, pDev=0x1fa6690, nPPTX=0.064757526036325508, nPPTY=0.067000000000000004, rZoomX=..., rZoomY=..., bWidth=false, rOptions=..., ppPatternChange=0x7fffffff9ba8, bInPrintTwips=false) at co-24.04/sc/source/core/data/column2.cxx:139 #10 0x00007fffa8f2b887 in ScColumn::GetOptimalHeight (this=0x7fffd000b4d0, rCxt=..., nStartRow=0, nEndRow=24, nMinHeight=256, nMinStart=0) at co-24.04/sc/source/core/data/column2.cxx:1084 #11 0x00007fffa94a28b7 in (anonymous namespace)::GetOptimalHeightsInColumn (rCxt=..., rCol=..., nStartRow=0, nEndRow=24, pProgress=0x0, nProgressStart=0) at co-24.04/sc/source/core/data/table1.cxx:120 #12 0x00007fffa94a47f2 in ScTable::SetOptimalHeight (this=0x1f584a0, rCxt=..., nSt where things go wrong earlier with: #2 0x00007fffacd716c3 in std::__new_allocator<unsigned int>::deallocate (this=0x7fff9c1d2030, __p=0x7fff9c37acf0, __n=1) at /usr/include/c++/14/bits/new_allocator.h:172 #3 0x00007fffacd65215 in std::allocator<unsigned int>::deallocate (this=0x7fff9c1d2030, __p=0x7fff9c37acf0, __n=1) at /usr/include/c++/14/bits/allocator.h:208 #4 std::allocator_traits<std::allocator<unsigned int> >::deallocate (__a=..., __p=0x7fff9c37acf0, __n=1) at /usr/include/c++/14/bits/alloc_traits.h:513 #5 std::__cxx1998::_Vector_base<unsigned int, std::allocator<unsigned int> >::_M_deallocate (this=0x7fff9c1d2030, __p=0x7fff9c37acf0, __n=1) at /usr/include/c++/14/bits/stl_vector.h:389 #6 0x00007fffacd60b88 in std::__cxx1998::_Vector_base<unsigned int, std::allocator<unsigned int> >::~_Vector_base (this=0x7fff9c1d2030, __in_chrg=<optimized out>) at /usr/include/c++/14/bits/stl_vector.h:368 #7 0x00007fffacd60bef in std::__cxx1998::vector<unsigned int, std::allocator<unsigned int> >::~vector (this=0x7fff9c1d2030, __in_chrg=<optimized out>) at /usr/include/c++/14/bits/stl_vector.h:738 #8 0x00007fffacd5ecd6 in std::__debug::vector<unsigned int, std::allocator<unsigned int> >::~vector (this=0x7fff9c1d2018, __in_chrg=<optimized out>) at /usr/include/c++/14/debug/vector:245 #9 0x00007fffacd5feb6 in o3tl::sorted_vector<unsigned int, std::less<unsigned int>, o3tl::find_unique, true>::~sorted_vector (this=0x7fff9c1d2018, __in_chrg=<optimized out>) at co-24.04/include/o3tl/sorted_vector.hxx:39 #10 0x00007fffacd7a71c in ScCondFormatItem::~ScCondFormatItem (this=0x7fff9c1d2000, __in_chrg=<optimized out>) at co-24.04/sc/source/core/data/attrib.cxx:722 #11 0x00007fffacd7a748 in ScCondFormatItem::~ScCondFormatItem (this=0x7fff9c1d2000, __in_chrg=<optimized out>) at co-24.04/sc/source/core/data/attrib.cxx:722 #12 0x00007fffef638513 in implCleanupItemEntry (rPool=..., pSource=0x7fff9c1d2000) at co-24.04/svl/source/items/itemset.cxx:473 #13 0x00007fffef638e00 in SfxItemSet::ClearAllItemsImpl (this=0x7fffffff8d38) at co-24.04/svl/source/items/itemset.cxx:643 #14 0x00007fffef638a02 in SfxItemSet::~SfxItemSet (this=0x7fffffff8d38, __in_chrg=<optimized out>) at co-24.04/svl/source/items/itemset.cxx:562 #15 0x00007fffacd5f7d0 in SfxSetItem::~SfxSetItem (this=0x7fffffff8d20, __in_chrg=<optimized out>) at co-24.04/include/svl/setitem.hxx:27 #16 0x00007fffacd5f88e in ScPatternAttr::~ScPatternAttr (this=0x7fffffff8d20, __in_chrg=<optimized out>) at co-24.04/sc/inc/patattr.hxx:54 #17 0x00007fffaceab497 in ScColumn::ApplyAttr (this=0x7fff9c027960, nRow=1, rAttr=...) at co-24.04/sc/source/core/data/column.cxx:573 #18 0x00007fffacf38508 in ScColumn::SetNumberFormat (this=0x7fff9c027960, nRow=1, nNumberFormat=99) at co-24.04/sc/source/core/data/column2.cxx:3302 #19 0x00007fffad4c3b55 in ScTable::SetNumberFormat (this=0x1d93840, nCol=7, nRow=1, nNumberFormat=99) at co-24.04/sc/source/core/data/table2.cxx:2315 #20 0x00007fffad114bfa in ScDocument::SetNumberFormat (this=0x1c74100, rPos=..., nNumberFormat=99) at co-24.04/sc/source/core/data/document.cxx:3727 #21 0x00007fffad356c65 in ScFormulaCell::InterpretTail (this=0x1cf9800, rContext=..., eTailParam=ScFormulaCell::SCITP_NORMAL) at co-24.04/sc/source/core/data/formulacell.cxx:2157 #22 0x00007fffad354e67 in ScFormulaCell::Interpret (this=0x1cf9800, nStartOffset=-1, nEndOffset=-1) at co-24.04/sc/source/core/data/formulacell.cxx:1619 #23 0x00007fffacf8e59f in ScFormulaCell::MaybeInterpret (this=0x1cf9800) at co-24.04/sc/inc/formulacell.hxx:470 #24 0x00007fffad358dd4 in ScFormulaCell::IsValue (this=0x1cf9800) at co-24.04/sc/source/core/data/formulacell.cxx:2762 #25 0x00007fffad025e1b in lcl_GetCellContent (rCell=..., bIsStr1=false, rArg=@0x7fffffff9208: 0, rArgStr="", pDoc=0x1c74100) at co-24.04/sc/source/core/data/conditio.cxx:764 #26 0x00007fffad0286c5 in ScConditionEntry::IsCellValid (this=0x7fff9c1c73f0, rCell=..., rPos=...) at co-24.04/sc/source/core/data/conditio.cxx:1263 #27 0x00007fffad02b18c in ScConditionalFormat::GetCellStyle (this=0x7fff9c02c1d0, rCell=..., rPos=...) at co-24.04/sc/source/core/data/conditio.cxx:1863 #28 0x00007fffad0d20f8 in ScDocument::GetCondResult (this=0x1c74100, rCell=..., rPos=..., rList=..., rIndex=...) at co-24.04/sc/source/core/data/documen4.cxx:827 #29 0x00007fffad0d1f91 in ScDocument::GetCondResult (this=0x1c74100, nCol=7, nRow=1, nTab=0, pCell=0x7fffffff9420) at co-24.04/sc/source/core/data/documen4.cxx:809 very probably this is a problem since ItemSet rework of: commit 2b4cb63 CommitDate: Tue Nov 21 16:08:57 2023 +0100 Cleanup some ScPatternAttr specific stuff or similar of that sequence, and likely fixed in upstream later by: Author: Armin Le Grand (allotropia) <[email protected]> CommitDate: Thu Dec 28 19:38:15 2023 +0100 Decouple ScPatternAttr from SfxItemPool but that's a very sizable rework, so here apply a conservative simpler workaround to avoid the crash. Change-Id: I309953015d39bce4796a2cf99666603b00c34d24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178579 Reviewed-by: Andras Timar <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]>
on loading tdf97831-15.xlsx #0 0x00007fffebea8664 in __pthread_kill_implementation () at /lib64/libc.so.6 #1 0x00007fffebe4fc4e in raise () at /lib64/libc.so.6 #2 0x00007fffebe37902 in abort () at /lib64/libc.so.6 #3 0x00007fffebaa84e9 in __gnu_debug::_Error_formatter::_M_error() const [clone .cold] () at /lib64/libstdc++.so.6 #4 0x00007fffa8d75183 in __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<unsigned int const*, std::__cxx1998::vector<unsigned int, std::allocator<unsigned int> > >, std::__debug::vector<unsigned int, std::allocator<unsigned int> >, std::forward_iterator_tag>::operator++ (this=0x7fffffff9360) at /usr/include/c++/14/debug/safe_iterator.h:392 #5 0x00007fffa8d73da2 in __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<unsigned int const*, std::__cxx1998::vector<unsigned int, std::allocator<unsigned int> > >, std::__debug::vector<unsigned int, std::allocator<unsigned int> >, std::bidirectional_iterator_tag>::operator++ (this=0x7fffffff9360) at /usr/include/c++/14/debug/safe_iterator.h:679 #6 0x00007fffa8d71fd2 in __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<unsigned int const*, std::__cxx1998::vector<unsigned int, std::allocator<unsigned int> > >, std::__debug::vector<unsigned int, std::allocator<unsigned int> >, std::random_access_iterator_tag>::operator++ (this=0x7fffffff9360) at /usr/include/c++/14/debug/safe_iterator.h:849 #7 0x00007fffa90d204e in ScDocument::GetCondResult (this=0x18fbcb0, rCell=..., rPos=..., rList=..., rIndex=...) at co-24.04/sc/source/core/data/documen4.cxx:816 #8 0x00007fffa90d1ea1 in ScDocument::GetCondResult (this=0x18fbcb0, nCol=7, nRow=1, nTab=0, pCell=0x7fffffff9420) at co-24.04/sc/source/core/data/documen4.cxx:809 #9 0x00007fffa8f2740d in ScColumn::GetNeededSize (this=0x7fffd000b4d0, nRow=1, pDev=0x1fa6690, nPPTX=0.064757526036325508, nPPTY=0.067000000000000004, rZoomX=..., rZoomY=..., bWidth=false, rOptions=..., ppPatternChange=0x7fffffff9ba8, bInPrintTwips=false) at co-24.04/sc/source/core/data/column2.cxx:139 #10 0x00007fffa8f2b887 in ScColumn::GetOptimalHeight (this=0x7fffd000b4d0, rCxt=..., nStartRow=0, nEndRow=24, nMinHeight=256, nMinStart=0) at co-24.04/sc/source/core/data/column2.cxx:1084 #11 0x00007fffa94a28b7 in (anonymous namespace)::GetOptimalHeightsInColumn (rCxt=..., rCol=..., nStartRow=0, nEndRow=24, pProgress=0x0, nProgressStart=0) at co-24.04/sc/source/core/data/table1.cxx:120 #12 0x00007fffa94a47f2 in ScTable::SetOptimalHeight (this=0x1f584a0, rCxt=..., nSt where things go wrong earlier with: #2 0x00007fffacd716c3 in std::__new_allocator<unsigned int>::deallocate (this=0x7fff9c1d2030, __p=0x7fff9c37acf0, __n=1) at /usr/include/c++/14/bits/new_allocator.h:172 #3 0x00007fffacd65215 in std::allocator<unsigned int>::deallocate (this=0x7fff9c1d2030, __p=0x7fff9c37acf0, __n=1) at /usr/include/c++/14/bits/allocator.h:208 #4 std::allocator_traits<std::allocator<unsigned int> >::deallocate (__a=..., __p=0x7fff9c37acf0, __n=1) at /usr/include/c++/14/bits/alloc_traits.h:513 #5 std::__cxx1998::_Vector_base<unsigned int, std::allocator<unsigned int> >::_M_deallocate (this=0x7fff9c1d2030, __p=0x7fff9c37acf0, __n=1) at /usr/include/c++/14/bits/stl_vector.h:389 #6 0x00007fffacd60b88 in std::__cxx1998::_Vector_base<unsigned int, std::allocator<unsigned int> >::~_Vector_base (this=0x7fff9c1d2030, __in_chrg=<optimized out>) at /usr/include/c++/14/bits/stl_vector.h:368 #7 0x00007fffacd60bef in std::__cxx1998::vector<unsigned int, std::allocator<unsigned int> >::~vector (this=0x7fff9c1d2030, __in_chrg=<optimized out>) at /usr/include/c++/14/bits/stl_vector.h:738 #8 0x00007fffacd5ecd6 in std::__debug::vector<unsigned int, std::allocator<unsigned int> >::~vector (this=0x7fff9c1d2018, __in_chrg=<optimized out>) at /usr/include/c++/14/debug/vector:245 #9 0x00007fffacd5feb6 in o3tl::sorted_vector<unsigned int, std::less<unsigned int>, o3tl::find_unique, true>::~sorted_vector (this=0x7fff9c1d2018, __in_chrg=<optimized out>) at co-24.04/include/o3tl/sorted_vector.hxx:39 #10 0x00007fffacd7a71c in ScCondFormatItem::~ScCondFormatItem (this=0x7fff9c1d2000, __in_chrg=<optimized out>) at co-24.04/sc/source/core/data/attrib.cxx:722 #11 0x00007fffacd7a748 in ScCondFormatItem::~ScCondFormatItem (this=0x7fff9c1d2000, __in_chrg=<optimized out>) at co-24.04/sc/source/core/data/attrib.cxx:722 #12 0x00007fffef638513 in implCleanupItemEntry (rPool=..., pSource=0x7fff9c1d2000) at co-24.04/svl/source/items/itemset.cxx:473 #13 0x00007fffef638e00 in SfxItemSet::ClearAllItemsImpl (this=0x7fffffff8d38) at co-24.04/svl/source/items/itemset.cxx:643 #14 0x00007fffef638a02 in SfxItemSet::~SfxItemSet (this=0x7fffffff8d38, __in_chrg=<optimized out>) at co-24.04/svl/source/items/itemset.cxx:562 #15 0x00007fffacd5f7d0 in SfxSetItem::~SfxSetItem (this=0x7fffffff8d20, __in_chrg=<optimized out>) at co-24.04/include/svl/setitem.hxx:27 #16 0x00007fffacd5f88e in ScPatternAttr::~ScPatternAttr (this=0x7fffffff8d20, __in_chrg=<optimized out>) at co-24.04/sc/inc/patattr.hxx:54 #17 0x00007fffaceab497 in ScColumn::ApplyAttr (this=0x7fff9c027960, nRow=1, rAttr=...) at co-24.04/sc/source/core/data/column.cxx:573 #18 0x00007fffacf38508 in ScColumn::SetNumberFormat (this=0x7fff9c027960, nRow=1, nNumberFormat=99) at co-24.04/sc/source/core/data/column2.cxx:3302 #19 0x00007fffad4c3b55 in ScTable::SetNumberFormat (this=0x1d93840, nCol=7, nRow=1, nNumberFormat=99) at co-24.04/sc/source/core/data/table2.cxx:2315 #20 0x00007fffad114bfa in ScDocument::SetNumberFormat (this=0x1c74100, rPos=..., nNumberFormat=99) at co-24.04/sc/source/core/data/document.cxx:3727 #21 0x00007fffad356c65 in ScFormulaCell::InterpretTail (this=0x1cf9800, rContext=..., eTailParam=ScFormulaCell::SCITP_NORMAL) at co-24.04/sc/source/core/data/formulacell.cxx:2157 #22 0x00007fffad354e67 in ScFormulaCell::Interpret (this=0x1cf9800, nStartOffset=-1, nEndOffset=-1) at co-24.04/sc/source/core/data/formulacell.cxx:1619 #23 0x00007fffacf8e59f in ScFormulaCell::MaybeInterpret (this=0x1cf9800) at co-24.04/sc/inc/formulacell.hxx:470 #24 0x00007fffad358dd4 in ScFormulaCell::IsValue (this=0x1cf9800) at co-24.04/sc/source/core/data/formulacell.cxx:2762 #25 0x00007fffad025e1b in lcl_GetCellContent (rCell=..., bIsStr1=false, rArg=@0x7fffffff9208: 0, rArgStr="", pDoc=0x1c74100) at co-24.04/sc/source/core/data/conditio.cxx:764 #26 0x00007fffad0286c5 in ScConditionEntry::IsCellValid (this=0x7fff9c1c73f0, rCell=..., rPos=...) at co-24.04/sc/source/core/data/conditio.cxx:1263 #27 0x00007fffad02b18c in ScConditionalFormat::GetCellStyle (this=0x7fff9c02c1d0, rCell=..., rPos=...) at co-24.04/sc/source/core/data/conditio.cxx:1863 #28 0x00007fffad0d20f8 in ScDocument::GetCondResult (this=0x1c74100, rCell=..., rPos=..., rList=..., rIndex=...) at co-24.04/sc/source/core/data/documen4.cxx:827 #29 0x00007fffad0d1f91 in ScDocument::GetCondResult (this=0x1c74100, nCol=7, nRow=1, nTab=0, pCell=0x7fffffff9420) at co-24.04/sc/source/core/data/documen4.cxx:809 very probably this is a problem since ItemSet rework of: commit 2b4cb63 CommitDate: Tue Nov 21 16:08:57 2023 +0100 Cleanup some ScPatternAttr specific stuff or similar of that sequence, and likely fixed in upstream later by: Author: Armin Le Grand (allotropia) <[email protected]> CommitDate: Thu Dec 28 19:38:15 2023 +0100 Decouple ScPatternAttr from SfxItemPool but that's a very sizable rework, so here apply a conservative simpler workaround to avoid the crash. Change-Id: I309953015d39bce4796a2cf99666603b00c34d24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178579 Reviewed-by: Andras Timar <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]>
Instead of deleting the QDialog owned by the QtInstanceDialog in the QtInstanceDialog dtor right away by calling std::unique_ptr<QDialog>::reset, instead mark the object for deletion by calling QObject::deleteLater [1] on the dialog object, which schedules the object for deletion when control returns to the event loop. Also switch QtInstanceDialog::m_pDialog from a unique_ptr to a plain QDialog*. This fixes crashes seen with the current qtbase git dev branch after qtbase commit commit 84a5f50c7766c99f62b22bb4388137e0aa8dd13d Author: Shawn Rutledge <[email protected]> Date: Tue Nov 12 10:04:31 2024 +0100 Move QContextMenuEvent synthesis from QWidgetWindow to QWindow The crash was quite reproducible for me by running LO with the qt6 VCL plugin and SAL_VCL_QT_USE_WELDED_WIDGETS=1 (to enable use of native Qt widgets), opening the "Help" -> "About LibreOfficeDev" dialog and closing it by clicking the "Close" button with the left mouse button. Backtrace of the crash: (rr) bt #0 0x0000000000000000 in ??? () #1 0x000019667a96b92f in QWidgetWindow::handleMouseEvent (this=0x5648961bd080, event=0x7ffe9cb16b98) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:675 #2 0x000019667a96a145 in QWidgetWindow::event (this=0x5648961bd080, event=0x7ffe9cb16b98) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:292 #3 0x000019667a86fe10 in QApplicationPrivate::notify_helper (this=0x56488e07aae0, receiver=0x5648961bd080, e=0x7ffe9cb16b98) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3304 #4 0x000019667a873d2d in QApplication::notify (this=0x56488e067420, receiver=0x5648961bd080, e=0x7ffe9cb16b98) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3254 #5 0x00006f736e25acc9 in QCoreApplication::notifyInternal2 (receiver=0x5648961bd080, event=0x7ffe9cb16b98) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1122 #6 0x00006f736e25bb39 in QCoreApplication::sendSpontaneousEvent (receiver=0x5648961bd080, event=0x7ffe9cb16b98) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1578 #7 0x0000555757871f72 in QGuiApplicationPrivate::processMouseEvent (e=0x5f6d64003360) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:2485 #8 0x0000555757871136 in QGuiApplicationPrivate::processWindowSystemEvent (e=0x5f6d64003360) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:2212 #9 0x0000555757958a4d in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1113 #10 0x00005557579588fe in QWindowSystemInterface::flushWindowSystemEvents (flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1082 #11 0x0000393946e55875 in QtWaylandClient::QWaylandDisplay::flushRequests (this=0x56488e0ca590) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddisplay.cpp:524 #12 0x0000393946e5a946 in QtWaylandClient::QWaylandDisplay::qt_static_metacall (_o=0x56488e0ca590, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0x7ffe9cb172a0) at qtwayland/src/client/WaylandClient_autogen/include/moc_qwaylanddisplay_p.cpp:95 #13 0x00006f736e331954 in doActivate<false> (sender=0x56488e06c0e0, signal_index=4, argv=0x7ffe9cb172a0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4151 #14 0x00006f736e3273e3 in QMetaObject::activate (sender=0x56488e06c0e0, m=0x6f736ec1ec68 <QAbstractEventDispatcher::staticMetaObject>, local_signal_index=1, argv=0x0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4199 #15 0x00006f736e243c79 in QAbstractEventDispatcher::awake (this=0x56488e06c0e0) at qtbase/src/corelib/Core_autogen/include/moc_qabstracteventdispatcher.cpp:129 #16 0x00006f736e84d1e8 in QEventDispatcherGlib::processEvents (this=0x56488e06c0e0, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:406 #17 0x0000555758154088 in QPAEventDispatcherGlib::processEvents (this=0x56488e06c0e0, flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:89 #18 0x00006a0d3b6d9b82 in QtInstance::ImplYield (this=0x56488e111bf0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:464 #19 0x00006a0d3b6dcc01 in QtInstance::DoYield (this=0x56488e111bf0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:475 #20 0x00005abe4e4b26e6 in ImplYield (i_bWait=true, i_bAllEvents=false) at vcl/source/app/svapp.cxx:385 #21 0x00005abe4e4b207f in Application::Yield () at vcl/source/app/svapp.cxx:473 #22 0x00005abe4e4b1e60 in Application::Execute () at vcl/source/app/svapp.cxx:360 #23 0x00004759668eccab in desktop::Desktop::Main (this=0x7ffe9cb18ec8) at desktop/source/app/app.cxx:1679 #24 0x00005abe4e4d3bc6 in ImplSVMain () at vcl/source/app/svmain.cxx:230 #25 0x00005abe4e4d57b9 in SVMain () at vcl/source/app/svmain.cxx:248 #26 0x00004759669665da in soffice_main () at desktop/source/app/sofficemain.cxx:121 #27 0x000056486abf0a6d in sal_main () at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51 #28 0x000056486abf0a47 in main (argc=1, argv=0x7ffe9cb190d8) at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49 The segfault happens when calling d->maybeSynthesizeContextMenuEvent(event); , i.e the virtual QWindowPrivate::maybeSynthesizeContextMenuEvent. This is because the QWidgetWindow object and its QWidgetPrivate have already been deleted when processing an earlier event triggered by the mouse click, see backtrace below. Not deleting the object right away but marking it for deletion later makes sure the object is still valid when the event gets processed, and then deleted afterwards. Backtrace of how the QWindowPrivate object got deleted earlier (reverse-debugged with rr) - see frame 17 for the dtor (i.e. the code that was adjusted in this commit now to fix the problem): Thread 1 hit Breakpoint 1.1, QWindowPrivate::~QWindowPrivate (this=0x564896397450) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindow.cpp:211 211 QWindowPrivate::~QWindowPrivate() (rr) p this $6 = (QWindowPrivate *) 0x564896397450 (rr) bt #0 QWindowPrivate::~QWindowPrivate (this=0x564896397450) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindow.cpp:211 #1 0x000019667a96f039 in QWidgetWindowPrivate::~QWidgetWindowPrivate (this=0x564896397450) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:34 #2 0x000019667a96f05d in QWidgetWindowPrivate::~QWidgetWindowPrivate (this=0x564896397450) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:34 #3 0x00006f736e33a7e8 in QScopedPointerDeleter<QObjectData>::cleanup (pointer=0x564896397450) at qtbase/src/corelib/tools/qscopedpointer.h:24 #4 0x00006f736e32e134 in QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::~QScopedPointer (this=0x5648961bd088) at qtbase/src/corelib/tools/qscopedpointer.h:81 #5 0x00006f736e31cdb2 in QObject::~QObject (this=0x5648961bd080) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:1149 #6 0x00005557579435ec in QWindow::~QWindow (this=0x5648961bd080) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindow.cpp:206 #7 0x000019667a969be6 in QWidgetWindow::~QWidgetWindow (this=0x5648961bd080) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:179 #8 0x000019667a969c2d in QWidgetWindow::~QWidgetWindow (this=0x5648961bd080) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:160 #9 0x000019667a915351 in QWidgetPrivate::deleteTLSysExtra (this=0x564894d40bf0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:1711 #10 0x000019667a914f86 in QWidget::destroy (this=0x56488f3e8100, destroyWindow=true, destroySubWindows=true) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:12612 #11 0x000019667a914504 in QWidget::~QWidget (this=0x56488f3e8100) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:1565 #12 0x000019667ad11705 in QDialog::~QDialog (this=0x56488f3e8100) at /home/michi/development/git/qt5/qtbase/src/widgets/dialogs/qdialog.cpp:394 #13 0x000019667ad1174d in QDialog::~QDialog (this=0x56488f3e8100) at /home/michi/development/git/qt5/qtbase/src/widgets/dialogs/qdialog.cpp:386 #14 0x00006a0d3b71e358 in std::default_delete<QDialog>::operator() (this=0x5648963f9fb0, __ptr=0x56488f3e8100) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:93 #15 0x00006a0d3b71e478 in std::__uniq_ptr_impl<QDialog, std::default_delete<QDialog> >::reset (this=0x5648963f9fb0, __p=0x0) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:205 #16 0x00006a0d3b71e40d in std::unique_ptr<QDialog, std::default_delete<QDialog> >::reset (this=0x5648963f9fb0, __p=0x0) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:504 #17 0x00006a0d3b71b550 in QtInstanceDialog::~QtInstanceDialog()::$_0::operator()() const (this=0x7ffe9cb13630) at vcl/qt6/../qt5/QtInstanceDialog.cxx:30 #18 0x00006a0d3b71b525 in std::__invoke_impl<void, QtInstanceDialog::~QtInstanceDialog()::$_0&>(std::__invoke_other, QtInstanceDialog::~QtInstanceDialog()::$_0&) (__f=...) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/invoke.h:61 #19 0x00006a0d3b71b4d5 in std::__invoke_r<void, QtInstanceDialog::~QtInstanceDialog()::$_0&>(QtInstanceDialog::~QtInstanceDialog()::$_0&) (__fn=...) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/invoke.h:111 #20 0x00006a0d3b71b3fd in std::_Function_handler<void(), QtInstanceDialog::~QtInstanceDialog()::$_0>::_M_invoke (__functor=...) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/std_function.h:290 #21 0x00006a0d3b6e278e in std::function<void()>::operator() (this=0x7ffe9cb13630) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/std_function.h:591 #22 0x00006a0d3b6da31a in QtInstance::RunInMainThread (this=0x56488e111bf0, func=...) at vcl/qt6/../qt5/QtInstance.cxx:226 #23 0x00006a0d3b71947b in QtInstanceDialog::~QtInstanceDialog (this=0x5648963f9f90, vtt=0x6a0d3b98fec8 <VTT for QtInstanceDialog>) at vcl/qt6/../qt5/QtInstanceDialog.cxx:30 #24 0x00006a0d3b7195a0 in QtInstanceDialog::~QtInstanceDialog (this=0x5648963f9f90) at vcl/qt6/../qt5/QtInstanceDialog.cxx:28 #25 0x00006a0d3b7196a9 in QtInstanceDialog::~QtInstanceDialog (this=0x5648963f9f90) at vcl/qt6/../qt5/QtInstanceDialog.cxx:28 #26 0x00005abe4e4746f8 in std::default_delete<weld::Dialog>::operator() (this=0x564896171890, __ptr=0x5648963fa1f8) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:93 #27 0x00005abe4e4faefd in std::_Sp_counted_deleter<weld::Dialog*, std::default_delete<weld::Dialog>, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_M_dispose (this=0x564896171880) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:527 #28 0x00005abe4da1978a in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x564896171880) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:346 #29 0x00005abe4da19706 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x5648961a7cb8) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:1069 #30 0x00005abe4db3d6e9 in std::__shared_ptr<weld::Dialog, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=0x5648961a7cb0) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:1525 #31 0x00005abe4db2e905 in std::shared_ptr<weld::Dialog>::~shared_ptr (this=0x5648961a7cb0) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr.h:175 #32 0x00005abe4e4f6a7b in weld::GenericDialogController::~GenericDialogController (this=0x5648961a7c90) at vcl/source/app/weldutils.cxx:58 #33 0x000000444e3b8ce9 in AboutDialog::~AboutDialog (this=0x5648961a7c90) at cui/source/dialogs/about.cxx:142 #34 0x000000444e5787b6 in std::destroy_at<AboutDialog> (__location=0x5648961a7c90) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/stl_construct.h:88 #35 0x000000444e578795 in std::_Destroy<AboutDialog> (__pointer=0x5648961a7c90) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/stl_construct.h:149 #36 0x000000444e57862f in std::allocator_traits<std::allocator<void> >::destroy<AboutDialog> (__p=0x5648961a7c90) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/alloc_traits.h:708 #37 std::_Sp_counted_ptr_inplace<AboutDialog, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_M_dispose (this=0x5648961a7c80) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:616 #38 0x00006a0d3b661e5a in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release_last_use (this=0x5648961a7c80) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:175 #39 0x00006a0d3b661e35 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release_last_use_cold (this=0x5648961a7c80) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:199 #40 0x00006a0d3b661e11 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x5648961a7c80) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:353 #41 0x00006a0d3b661cf6 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x7ffe9cb13a30) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:1069 #42 0x00006a0d3b71ea39 in std::__shared_ptr<weld::DialogController, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=0x7ffe9cb13a28) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:1525 #43 0x00006a0d3b71da14 in std::__shared_ptr<weld::DialogController, (__gnu_cxx::_Lock_policy)2>::reset (this=0x7ffe9cb13ae8) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:1643 #44 0x00006a0d3b71ae1c in QtInstanceDialog::dialogFinished (this=0x5648963f9f90, nResult=7) at vcl/qt6/../qt5/QtInstanceDialog.cxx:198 #45 0x00006a0d3b71e9a6 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<int>, void, void (QtInstanceDialog::*)(int)>::call(void (QtInstanceDialog::*)(int), QtInstanceDialog*, void**)::{lambda()#1}::operator()() const (this=0x7ffe9cb13bd0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:127 #46 0x00006a0d3b71e8c9 in QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<int>, void, void (QtInstanceDialog::*)(int)>::call(void (QtInstanceDialog::*)(int), QtInstanceDialog*, void**)::{lambda()#1}>(void**, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<int>, void, void (QtInstanceDialog::*)(int)>::call(void (QtInstanceDialog::*)(int), QtInstanceDialog*, void**)::{lambda()#1}&&) (args=0x7ffe9cb13fa0, fn=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:65 #47 0x00006a0d3b71e803 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<int>, void, void (QtInstanceDialog::*)(int)>::call (f=&virtual QtInstanceDialog::dialogFinished(int), o=0x5648963f9f90, arg=0x7ffe9cb13fa0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:126 #48 0x00006a0d3b71e77d in QtPrivate::FunctionPointer<void (QtInstanceDialog::*)(int)>::call<QtPrivate::List<int>, void> (f=&virtual QtInstanceDialog::dialogFinished(int), o=0x5648963f9f90, arg=0x7ffe9cb13fa0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:174 #49 0x00006a0d3b71e6a6 in QtPrivate::QCallableObject<void (QtInstanceDialog::*)(int), QtPrivate::List<int>, void>::impl (which=1, this_=0x5648961544d0, r=0x5648963f9f90, a=0x7ffe9cb13fa0, ret=0x0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:545 #50 0x00006f736e271f82 in QtPrivate::QSlotObjectBase::call (this=0x5648961544d0, r=0x5648963f9f90, a=0x7ffe9cb13fa0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:461 #51 0x00006f736e331854 in doActivate<false> (sender=0x56488f3e8100, signal_index=7, argv=0x7ffe9cb13fa0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4139 #52 0x00006f736e3273e3 in QMetaObject::activate (sender=0x56488f3e8100, m=0x19667b4289a8 <QDialog::staticMetaObject>, local_signal_index=0, argv=0x7ffe9cb13fa0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4199 #53 0x000019667a86520b in QMetaObject::activate<void, int> (sender=0x56488f3e8100, mo=0x19667b4289a8 <QDialog::staticMetaObject>, local_signal_index=0, ret=0x0, args=@0x7ffe9cb13fe4: 7) at qtbase/src/corelib/kernel/qobjectdefs.h:306 #54 0x000019667ad11f28 in QDialog::finished (this=0x56488f3e8100, _t1=7) at qtbase/src/widgets/Widgets_autogen/include/moc_qdialog.cpp:191 #55 0x000019667ad11e55 in QDialog::done (this=0x56488f3e8100, r=7) at /home/michi/development/git/qt5/qtbase/src/widgets/dialogs/qdialog.cpp:617 #56 0x00006a0d3b71b173 in QtInstanceDialog::handleButtonClick (rDialog=..., rButton=...) at vcl/qt6/../qt5/QtInstanceDialog.cxx:226 #57 0x00006a0d3b658b0c in QtBuilder::tweakInsertedChild(QObject*, QObject*, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >)::$_0::operator()() const (this=0x5648961351a0) at vcl/qt6/../qt5/QtBuilder.cxx:528 #58 0x00006a0d3b658ae8 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, QtBuilder::tweakInsertedChild(QObject*, QObject*, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_v--Type <RET> for more, q to quit, c to continue without paging-- iew<char, std::char_traits<char> >)::$_0>::call(QtBuilder::tweakInsertedChild(QObject*, QObject*, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >)::$_0&, void**)::{lambda()#1}::operator()() const (this=0x7ffe9cb14370) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:116 #59 0x00006a0d3b658ac9 in QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, QtBuilder::tweakInsertedChild(QObject*, QObject*, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >)::$_0>::call(QtBuilder::tweakInsertedChild(QObject*, QObject*, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >)::$_0&, void**)::{lambda()#1}>(void**, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, QtBuilder::tweakInsertedChild(QObject*, QObject*, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >)::$_0>::call(QtBuilder::tweakInsertedChild(QObject*, QObject*, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >)::$_0&, void**)::{lambda()#1}&&) (args=0x7ffe9cb146d0, fn=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:65 #60 0x00006a0d3b658a92 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, QtBuilder::tweakInsertedChild(QObject*, QObject*, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >)::$_0>::call(QtBuilder::tweakInsertedChild(QObject*, QObject*, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >)::$_0&, void**) (f=..., arg=0x7ffe9cb146d0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:115 #61 0x00006a0d3b658a41 in QtPrivate::FunctorCallable<QtBuilder::tweakInsertedChild(QObject*, QObject*, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >)::$_0>::call<QtPrivate::List<>, void>(QtBuilder::tweakInsertedChild(QObject*, QObject*, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >)::$_0&, void*, void**) (f=..., arg=0x7ffe9cb146d0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:337 #62 0x00006a0d3b6589e8 in QtPrivate::QCallableObject<QtBuilder::tweakInsertedChild(QObject*, QObject*, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >)::$_0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x564896135190, r=0x56488f3e8100, a=0x7ffe9cb146d0, ret=0x0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:547 #63 0x00006f736e271f82 in QtPrivate::QSlotObjectBase::call (this=0x564896135190, r=0x56488f3e8100, a=0x7ffe9cb146d0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:461 #64 0x00006f736e331854 in doActivate<false> (sender=0x56489581c360, signal_index=9, argv=0x7ffe9cb146d0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4139 #65 0x00006f736e3273e3 in QMetaObject::activate (sender=0x56489581c360, m=0x19667b414930 <QAbstractButton::staticMetaObject>, local_signal_index=2, argv=0x7ffe9cb146d0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4199 #66 0x000019667a86538b in QMetaObject::activate<void, bool> (sender=0x56489581c360, mo=0x19667b414930 <QAbstractButton::staticMetaObject>, local_signal_index=2, ret=0x0, args=@0x7ffe9cb14717: false) at qtbase/src/corelib/kernel/qobjectdefs.h:306 #67 0x000019667aab4f52 in QAbstractButton::clicked (this=0x56489581c360, _t1=false) at qtbase/src/widgets/Widgets_autogen/include/moc_qabstractbutton.cpp:253 #68 0x000019667aab4e67 in QAbstractButtonPrivate::emitClicked (this=0x564893f024d0) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qabstractbutton.cpp:381 #69 0x000019667aab4cc1 in QAbstractButtonPrivate::click (this=0x564893f024d0) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qabstractbutton.cpp:374 #70 0x000019667aab616f in QAbstractButton::mouseReleaseEvent (this=0x56489581c360, e=0x7ffe9cb15ad0) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qabstractbutton.cpp:976 #71 0x000019667a92c6fd in QWidget::event (this=0x56489581c360, event=0x7ffe9cb15ad0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:8971 #72 0x000019667aab5f8c in QAbstractButton::event (this=0x56489581c360, e=0x7ffe9cb15ad0) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qabstractbutton.cpp:933 #73 0x000019667ac2dfb1 in QPushButton::event (this=0x56489581c360, e=0x7ffe9cb15ad0) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qpushbutton.cpp:684 #74 0x000019667a86fe10 in QApplicationPrivate::notify_helper (this=0x56488e07aae0, receiver=0x56489581c360, e=0x7ffe9cb15ad0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3304 #75 0x000019667a871ae2 in QApplication::notify (this=0x56488e067420, receiver=0x56489581c360, e=0x7ffe9cb15ad0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2781 #76 0x00006f736e25acc9 in QCoreApplication::notifyInternal2 (receiver=0x56489581c360, event=0x7ffe9cb15ad0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1122 #77 0x00006f736e25bb39 in QCoreApplication::sendSpontaneousEvent (receiver=0x56489581c360, event=0x7ffe9cb15ad0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1578 #78 0x000019667a870737 in QApplicationPrivate::sendMouseEvent (receiver=0x56489581c360, event=0x7ffe9cb15ad0, alienWidget=0x56489581c360, nativeWidget=0x56488f3e8100, buttonDown=0x19667b45b488 <qt_button_down>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2362 #79 0x000019667a96b8bb in QWidgetWindow::handleMouseEvent (this=0x5648961bd080, event=0x7ffe9cb16b98) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:664 #80 0x000019667a96a145 in QWidgetWindow::event (this=0x5648961bd080, event=0x7ffe9cb16b98) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:292 #81 0x000019667a86fe10 in QApplicationPrivate::notify_helper (this=0x56488e07aae0, receiver=0x5648961bd080, e=0x7ffe9cb16b98) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3304 #82 0x000019667a873d2d in QApplication::notify (this=0x56488e067420, receiver=0x5648961bd080, e=0x7ffe9cb16b98) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3254 #83 0x00006f736e25acc9 in QCoreApplication::notifyInternal2 (receiver=0x5648961bd080, event=0x7ffe9cb16b98) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1122 #84 0x00006f736e25bb39 in QCoreApplication::sendSpontaneousEvent (receiver=0x5648961bd080, event=0x7ffe9cb16b98) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1578 #85 0x0000555757871f72 in QGuiApplicationPrivate::processMouseEvent (e=0x5f6d64003360) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:2485 #86 0x0000555757871136 in QGuiApplicationPrivate::processWindowSystemEvent (e=0x5f6d64003360) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:2212 #87 0x0000555757958a4d in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1113 #88 0x00005557579588fe in QWindowSystemInterface::flushWindowSystemEvents (flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1082 #89 0x0000393946e55875 in QtWaylandClient::QWaylandDisplay::flushRequests (this=0x56488e0ca590) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddisplay.cpp:524 #90 0x0000393946e5a946 in QtWaylandClient::QWaylandDisplay::qt_static_metacall (_o=0x56488e0ca590, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0x7ffe9cb172a0) at qtwayland/src/client/WaylandClient_autogen/include/moc_qwaylanddisplay_p.cpp:95 #91 0x00006f736e331954 in doActivate<false> (sender=0x56488e06c0e0, signal_index=4, argv=0x7ffe9cb172a0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4151 #92 0x00006f736e3273e3 in QMetaObject::activate (sender=0x56488e06c0e0, m=0x6f736ec1ec68 <QAbstractEventDispatcher::staticMetaObject>, local_signal_index=1, argv=0x0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4199 #93 0x00006f736e243c79 in QAbstractEventDispatcher::awake (this=0x56488e06c0e0) at qtbase/src/corelib/Core_autogen/include/moc_qabstracteventdispatcher.cpp:129 #94 0x00006f736e84d1e8 in QEventDispatcherGlib::processEvents (this=0x56488e06c0e0, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:406 #95 0x0000555758154088 in QPAEventDispatcherGlib::processEvents (this=0x56488e06c0e0, flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:89 #96 0x00006a0d3b6d9b82 in QtInstance::ImplYield (this=0x56488e111bf0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:464 #97 0x00006a0d3b6dcc01 in QtInstance::DoYield (this=0x56488e111bf0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:475 #98 0x00005abe4e4b26e6 in ImplYield (i_bWait=true, i_bAllEvents=false) at vcl/source/app/svapp.cxx:385 #99 0x00005abe4e4b207f in Application::Yield () at vcl/source/app/svapp.cxx:473 #100 0x00005abe4e4b1e60 in Application::Execute () at vcl/source/app/svapp.cxx:360 #101 0x00004759668eccab in desktop::Desktop::Main (this=0x7ffe9cb18ec8) at desktop/source/app/app.cxx:1679 #102 0x00005abe4e4d3bc6 in ImplSVMain () at vcl/source/app/svmain.cxx:230 #103 0x00005abe4e4d57b9 in SVMain () at vcl/source/app/svmain.cxx:248 #104 0x00004759669665da in soffice_main () at desktop/source/app/sofficemain.cxx:121 #105 0x000056486abf0a6d in sal_main () at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51 #106 0x000056486abf0a47 in main (argc=1, argv=0x7ffe9cb190d8) at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49 [1] https://code.qt.io/cgit/qt/qtbase.git/commit/?id=84a5f50c7766c99f62b22bb4388137e0aa8dd13d Change-Id: I3f547c1b1c1581d2f3ae092f2034d930640b0f48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179312 Reviewed-by: Michael Weghorn <[email protected]> Tested-by: Jenkins
Instead of deleting the QDialog owned by the QtInstanceDialog in the QtInstanceDialog dtor right away by calling std::unique_ptr<QDialog>::reset, instead mark the object for deletion by calling QObject::deleteLater [1] on the dialog object, which schedules the object for deletion when control returns to the event loop. Also switch QtInstanceDialog::m_pDialog from a unique_ptr to a plain QDialog*. This fixes crashes seen with the current qtbase git dev branch after qtbase commit commit 84a5f50c7766c99f62b22bb4388137e0aa8dd13d Author: Shawn Rutledge <[email protected]> Date: Tue Nov 12 10:04:31 2024 +0100 Move QContextMenuEvent synthesis from QWidgetWindow to QWindow The crash was quite reproducible for me by running LO with the qt6 VCL plugin and SAL_VCL_QT_USE_WELDED_WIDGETS=1 (to enable use of native Qt widgets), opening the "Help" -> "About LibreOfficeDev" dialog and closing it by clicking the "Close" button with the left mouse button. Backtrace of the crash: (rr) bt #0 0x0000000000000000 in ??? () #1 0x000019667a96b92f in QWidgetWindow::handleMouseEvent (this=0x5648961bd080, event=0x7ffe9cb16b98) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:675 #2 0x000019667a96a145 in QWidgetWindow::event (this=0x5648961bd080, event=0x7ffe9cb16b98) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:292 #3 0x000019667a86fe10 in QApplicationPrivate::notify_helper (this=0x56488e07aae0, receiver=0x5648961bd080, e=0x7ffe9cb16b98) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3304 #4 0x000019667a873d2d in QApplication::notify (this=0x56488e067420, receiver=0x5648961bd080, e=0x7ffe9cb16b98) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3254 #5 0x00006f736e25acc9 in QCoreApplication::notifyInternal2 (receiver=0x5648961bd080, event=0x7ffe9cb16b98) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1122 #6 0x00006f736e25bb39 in QCoreApplication::sendSpontaneousEvent (receiver=0x5648961bd080, event=0x7ffe9cb16b98) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1578 #7 0x0000555757871f72 in QGuiApplicationPrivate::processMouseEvent (e=0x5f6d64003360) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:2485 #8 0x0000555757871136 in QGuiApplicationPrivate::processWindowSystemEvent (e=0x5f6d64003360) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:2212 #9 0x0000555757958a4d in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1113 #10 0x00005557579588fe in QWindowSystemInterface::flushWindowSystemEvents (flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1082 #11 0x0000393946e55875 in QtWaylandClient::QWaylandDisplay::flushRequests (this=0x56488e0ca590) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddisplay.cpp:524 #12 0x0000393946e5a946 in QtWaylandClient::QWaylandDisplay::qt_static_metacall (_o=0x56488e0ca590, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0x7ffe9cb172a0) at qtwayland/src/client/WaylandClient_autogen/include/moc_qwaylanddisplay_p.cpp:95 #13 0x00006f736e331954 in doActivate<false> (sender=0x56488e06c0e0, signal_index=4, argv=0x7ffe9cb172a0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4151 #14 0x00006f736e3273e3 in QMetaObject::activate (sender=0x56488e06c0e0, m=0x6f736ec1ec68 <QAbstractEventDispatcher::staticMetaObject>, local_signal_index=1, argv=0x0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4199 #15 0x00006f736e243c79 in QAbstractEventDispatcher::awake (this=0x56488e06c0e0) at qtbase/src/corelib/Core_autogen/include/moc_qabstracteventdispatcher.cpp:129 #16 0x00006f736e84d1e8 in QEventDispatcherGlib::processEvents (this=0x56488e06c0e0, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:406 #17 0x0000555758154088 in QPAEventDispatcherGlib::processEvents (this=0x56488e06c0e0, flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:89 #18 0x00006a0d3b6d9b82 in QtInstance::ImplYield (this=0x56488e111bf0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:464 #19 0x00006a0d3b6dcc01 in QtInstance::DoYield (this=0x56488e111bf0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:475 #20 0x00005abe4e4b26e6 in ImplYield (i_bWait=true, i_bAllEvents=false) at vcl/source/app/svapp.cxx:385 #21 0x00005abe4e4b207f in Application::Yield () at vcl/source/app/svapp.cxx:473 #22 0x00005abe4e4b1e60 in Application::Execute () at vcl/source/app/svapp.cxx:360 #23 0x00004759668eccab in desktop::Desktop::Main (this=0x7ffe9cb18ec8) at desktop/source/app/app.cxx:1679 #24 0x00005abe4e4d3bc6 in ImplSVMain () at vcl/source/app/svmain.cxx:230 #25 0x00005abe4e4d57b9 in SVMain () at vcl/source/app/svmain.cxx:248 #26 0x00004759669665da in soffice_main () at desktop/source/app/sofficemain.cxx:121 #27 0x000056486abf0a6d in sal_main () at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51 #28 0x000056486abf0a47 in main (argc=1, argv=0x7ffe9cb190d8) at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49 The segfault happens when calling d->maybeSynthesizeContextMenuEvent(event); , i.e the virtual QWindowPrivate::maybeSynthesizeContextMenuEvent. This is because the QWidgetWindow object and its QWidgetPrivate have already been deleted when processing an earlier event triggered by the mouse click, see backtrace below. Not deleting the object right away but marking it for deletion later makes sure the object is still valid when the event gets processed, and then deleted afterwards. Backtrace of how the QWindowPrivate object got deleted earlier (reverse-debugged with rr) - see frame 17 for the dtor (i.e. the code that was adjusted in this commit now to fix the problem): Thread 1 hit Breakpoint 1.1, QWindowPrivate::~QWindowPrivate (this=0x564896397450) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindow.cpp:211 211 QWindowPrivate::~QWindowPrivate() (rr) p this $6 = (QWindowPrivate *) 0x564896397450 (rr) bt #0 QWindowPrivate::~QWindowPrivate (this=0x564896397450) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindow.cpp:211 #1 0x000019667a96f039 in QWidgetWindowPrivate::~QWidgetWindowPrivate (this=0x564896397450) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:34 #2 0x000019667a96f05d in QWidgetWindowPrivate::~QWidgetWindowPrivate (this=0x564896397450) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:34 #3 0x00006f736e33a7e8 in QScopedPointerDeleter<QObjectData>::cleanup (pointer=0x564896397450) at qtbase/src/corelib/tools/qscopedpointer.h:24 #4 0x00006f736e32e134 in QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::~QScopedPointer (this=0x5648961bd088) at qtbase/src/corelib/tools/qscopedpointer.h:81 #5 0x00006f736e31cdb2 in QObject::~QObject (this=0x5648961bd080) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:1149 #6 0x00005557579435ec in QWindow::~QWindow (this=0x5648961bd080) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindow.cpp:206 #7 0x000019667a969be6 in QWidgetWindow::~QWidgetWindow (this=0x5648961bd080) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:179 #8 0x000019667a969c2d in QWidgetWindow::~QWidgetWindow (this=0x5648961bd080) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:160 #9 0x000019667a915351 in QWidgetPrivate::deleteTLSysExtra (this=0x564894d40bf0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:1711 #10 0x000019667a914f86 in QWidget::destroy (this=0x56488f3e8100, destroyWindow=true, destroySubWindows=true) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:12612 #11 0x000019667a914504 in QWidget::~QWidget (this=0x56488f3e8100) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:1565 #12 0x000019667ad11705 in QDialog::~QDialog (this=0x56488f3e8100) at /home/michi/development/git/qt5/qtbase/src/widgets/dialogs/qdialog.cpp:394 #13 0x000019667ad1174d in QDialog::~QDialog (this=0x56488f3e8100) at /home/michi/development/git/qt5/qtbase/src/widgets/dialogs/qdialog.cpp:386 #14 0x00006a0d3b71e358 in std::default_delete<QDialog>::operator() (this=0x5648963f9fb0, __ptr=0x56488f3e8100) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:93 #15 0x00006a0d3b71e478 in std::__uniq_ptr_impl<QDialog, std::default_delete<QDialog> >::reset (this=0x5648963f9fb0, __p=0x0) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:205 #16 0x00006a0d3b71e40d in std::unique_ptr<QDialog, std::default_delete<QDialog> >::reset (this=0x5648963f9fb0, __p=0x0) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:504 #17 0x00006a0d3b71b550 in QtInstanceDialog::~QtInstanceDialog()::$_0::operator()() const (this=0x7ffe9cb13630) at vcl/qt6/../qt5/QtInstanceDialog.cxx:30 #18 0x00006a0d3b71b525 in std::__invoke_impl<void, QtInstanceDialog::~QtInstanceDialog()::$_0&>(std::__invoke_other, QtInstanceDialog::~QtInstanceDialog()::$_0&) (__f=...) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/invoke.h:61 #19 0x00006a0d3b71b4d5 in std::__invoke_r<void, QtInstanceDialog::~QtInstanceDialog()::$_0&>(QtInstanceDialog::~QtInstanceDialog()::$_0&) (__fn=...) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/invoke.h:111 #20 0x00006a0d3b71b3fd in std::_Function_handler<void(), QtInstanceDialog::~QtInstanceDialog()::$_0>::_M_invoke (__functor=...) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/std_function.h:290 #21 0x00006a0d3b6e278e in std::function<void()>::operator() (this=0x7ffe9cb13630) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/std_function.h:591 #22 0x00006a0d3b6da31a in QtInstance::RunInMainThread (this=0x56488e111bf0, func=...) at vcl/qt6/../qt5/QtInstance.cxx:226 #23 0x00006a0d3b71947b in QtInstanceDialog::~QtInstanceDialog (this=0x5648963f9f90, vtt=0x6a0d3b98fec8 <VTT for QtInstanceDialog>) at vcl/qt6/../qt5/QtInstanceDialog.cxx:30 #24 0x00006a0d3b7195a0 in QtInstanceDialog::~QtInstanceDialog (this=0x5648963f9f90) at vcl/qt6/../qt5/QtInstanceDialog.cxx:28 #25 0x00006a0d3b7196a9 in QtInstanceDialog::~QtInstanceDialog (this=0x5648963f9f90) at vcl/qt6/../qt5/QtInstanceDialog.cxx:28 #26 0x00005abe4e4746f8 in std::default_delete<weld::Dialog>::operator() (this=0x564896171890, __ptr=0x5648963fa1f8) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:93 #27 0x00005abe4e4faefd in std::_Sp_counted_deleter<weld::Dialog*, std::default_delete<weld::Dialog>, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_M_dispose (this=0x564896171880) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:527 #28 0x00005abe4da1978a in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x564896171880) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:346 #29 0x00005abe4da19706 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x5648961a7cb8) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:1069 #30 0x00005abe4db3d6e9 in std::__shared_ptr<weld::Dialog, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=0x5648961a7cb0) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:1525 #31 0x00005abe4db2e905 in std::shared_ptr<weld::Dialog>::~shared_ptr (this=0x5648961a7cb0) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr.h:175 #32 0x00005abe4e4f6a7b in weld::GenericDialogController::~GenericDialogController (this=0x5648961a7c90) at vcl/source/app/weldutils.cxx:58 #33 0x000000444e3b8ce9 in AboutDialog::~AboutDialog (this=0x5648961a7c90) at cui/source/dialogs/about.cxx:142 #34 0x000000444e5787b6 in std::destroy_at<AboutDialog> (__location=0x5648961a7c90) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/stl_construct.h:88 #35 0x000000444e578795 in std::_Destroy<AboutDialog> (__pointer=0x5648961a7c90) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/stl_construct.h:149 #36 0x000000444e57862f in std::allocator_traits<std::allocator<void> >::destroy<AboutDialog> (__p=0x5648961a7c90) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/alloc_traits.h:708 #37 std::_Sp_counted_ptr_inplace<AboutDialog, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_M_dispose (this=0x5648961a7c80) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:616 #38 0x00006a0d3b661e5a in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release_last_use (this=0x5648961a7c80) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:175 #39 0x00006a0d3b661e35 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release_last_use_cold (this=0x5648961a7c80) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:199 #40 0x00006a0d3b661e11 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x5648961a7c80) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:353 #41 0x00006a0d3b661cf6 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x7ffe9cb13a30) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:1069 #42 0x00006a0d3b71ea39 in std::__shared_ptr<weld::DialogController, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=0x7ffe9cb13a28) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:1525 #43 0x00006a0d3b71da14 in std::__shared_ptr<weld::DialogController, (__gnu_cxx::_Lock_policy)2>::reset (this=0x7ffe9cb13ae8) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/shared_ptr_base.h:1643 #44 0x00006a0d3b71ae1c in QtInstanceDialog::dialogFinished (this=0x5648963f9f90, nResult=7) at vcl/qt6/../qt5/QtInstanceDialog.cxx:198 #45 0x00006a0d3b71e9a6 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<int>, void, void (QtInstanceDialog::*)(int)>::call(void (QtInstanceDialog::*)(int), QtInstanceDialog*, void**)::{lambda()#1}::operator()() const (this=0x7ffe9cb13bd0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:127 #46 0x00006a0d3b71e8c9 in QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<int>, void, void (QtInstanceDialog::*)(int)>::call(void (QtInstanceDialog::*)(int), QtInstanceDialog*, void**)::{lambda()#1}>(void**, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<int>, void, void (QtInstanceDialog::*)(int)>::call(void (QtInstanceDialog::*)(int), QtInstanceDialog*, void**)::{lambda()#1}&&) (args=0x7ffe9cb13fa0, fn=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:65 #47 0x00006a0d3b71e803 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<int>, void, void (QtInstanceDialog::*)(int)>::call (f=&virtual QtInstanceDialog::dialogFinished(int), o=0x5648963f9f90, arg=0x7ffe9cb13fa0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:126 #48 0x00006a0d3b71e77d in QtPrivate::FunctionPointer<void (QtInstanceDialog::*)(int)>::call<QtPrivate::List<int>, void> (f=&virtual QtInstanceDialog::dialogFinished(int), o=0x5648963f9f90, arg=0x7ffe9cb13fa0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:174 #49 0x00006a0d3b71e6a6 in QtPrivate::QCallableObject<void (QtInstanceDialog::*)(int), QtPrivate::List<int>, void>::impl (which=1, this_=0x5648961544d0, r=0x5648963f9f90, a=0x7ffe9cb13fa0, ret=0x0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:545 #50 0x00006f736e271f82 in QtPrivate::QSlotObjectBase::call (this=0x5648961544d0, r=0x5648963f9f90, a=0x7ffe9cb13fa0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:461 #51 0x00006f736e331854 in doActivate<false> (sender=0x56488f3e8100, signal_index=7, argv=0x7ffe9cb13fa0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4139 #52 0x00006f736e3273e3 in QMetaObject::activate (sender=0x56488f3e8100, m=0x19667b4289a8 <QDialog::staticMetaObject>, local_signal_index=0, argv=0x7ffe9cb13fa0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4199 #53 0x000019667a86520b in QMetaObject::activate<void, int> (sender=0x56488f3e8100, mo=0x19667b4289a8 <QDialog::staticMetaObject>, local_signal_index=0, ret=0x0, args=@0x7ffe9cb13fe4: 7) at qtbase/src/corelib/kernel/qobjectdefs.h:306 #54 0x000019667ad11f28 in QDialog::finished (this=0x56488f3e8100, _t1=7) at qtbase/src/widgets/Widgets_autogen/include/moc_qdialog.cpp:191 #55 0x000019667ad11e55 in QDialog::done (this=0x56488f3e8100, r=7) at /home/michi/development/git/qt5/qtbase/src/widgets/dialogs/qdialog.cpp:617 #56 0x00006a0d3b71b173 in QtInstanceDialog::handleButtonClick (rDialog=..., rButton=...) at vcl/qt6/../qt5/QtInstanceDialog.cxx:226 #57 0x00006a0d3b658b0c in QtBuilder::tweakInsertedChild(QObject*, QObject*, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >)::$_0::operator()() const (this=0x5648961351a0) at vcl/qt6/../qt5/QtBuilder.cxx:528 #58 0x00006a0d3b658ae8 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, QtBuilder::tweakInsertedChild(QObject*, QObject*, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_v--Type <RET> for more, q to quit, c to continue without paging-- iew<char, std::char_traits<char> >)::$_0>::call(QtBuilder::tweakInsertedChild(QObject*, QObject*, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >)::$_0&, void**)::{lambda()#1}::operator()() const (this=0x7ffe9cb14370) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:116 #59 0x00006a0d3b658ac9 in QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, QtBuilder::tweakInsertedChild(QObject*, QObject*, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >)::$_0>::call(QtBuilder::tweakInsertedChild(QObject*, QObject*, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >)::$_0&, void**)::{lambda()#1}>(void**, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, QtBuilder::tweakInsertedChild(QObject*, QObject*, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >)::$_0>::call(QtBuilder::tweakInsertedChild(QObject*, QObject*, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >)::$_0&, void**)::{lambda()#1}&&) (args=0x7ffe9cb146d0, fn=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:65 #60 0x00006a0d3b658a92 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, QtBuilder::tweakInsertedChild(QObject*, QObject*, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >)::$_0>::call(QtBuilder::tweakInsertedChild(QObject*, QObject*, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >)::$_0&, void**) (f=..., arg=0x7ffe9cb146d0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:115 #61 0x00006a0d3b658a41 in QtPrivate::FunctorCallable<QtBuilder::tweakInsertedChild(QObject*, QObject*, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >)::$_0>::call<QtPrivate::List<>, void>(QtBuilder::tweakInsertedChild(QObject*, QObject*, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >)::$_0&, void*, void**) (f=..., arg=0x7ffe9cb146d0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:337 #62 0x00006a0d3b6589e8 in QtPrivate::QCallableObject<QtBuilder::tweakInsertedChild(QObject*, QObject*, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >)::$_0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x564896135190, r=0x56488f3e8100, a=0x7ffe9cb146d0, ret=0x0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:547 #63 0x00006f736e271f82 in QtPrivate::QSlotObjectBase::call (this=0x564896135190, r=0x56488f3e8100, a=0x7ffe9cb146d0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:461 #64 0x00006f736e331854 in doActivate<false> (sender=0x56489581c360, signal_index=9, argv=0x7ffe9cb146d0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4139 #65 0x00006f736e3273e3 in QMetaObject::activate (sender=0x56489581c360, m=0x19667b414930 <QAbstractButton::staticMetaObject>, local_signal_index=2, argv=0x7ffe9cb146d0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4199 #66 0x000019667a86538b in QMetaObject::activate<void, bool> (sender=0x56489581c360, mo=0x19667b414930 <QAbstractButton::staticMetaObject>, local_signal_index=2, ret=0x0, args=@0x7ffe9cb14717: false) at qtbase/src/corelib/kernel/qobjectdefs.h:306 #67 0x000019667aab4f52 in QAbstractButton::clicked (this=0x56489581c360, _t1=false) at qtbase/src/widgets/Widgets_autogen/include/moc_qabstractbutton.cpp:253 #68 0x000019667aab4e67 in QAbstractButtonPrivate::emitClicked (this=0x564893f024d0) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qabstractbutton.cpp:381 #69 0x000019667aab4cc1 in QAbstractButtonPrivate::click (this=0x564893f024d0) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qabstractbutton.cpp:374 #70 0x000019667aab616f in QAbstractButton::mouseReleaseEvent (this=0x56489581c360, e=0x7ffe9cb15ad0) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qabstractbutton.cpp:976 #71 0x000019667a92c6fd in QWidget::event (this=0x56489581c360, event=0x7ffe9cb15ad0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:8971 #72 0x000019667aab5f8c in QAbstractButton::event (this=0x56489581c360, e=0x7ffe9cb15ad0) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qabstractbutton.cpp:933 #73 0x000019667ac2dfb1 in QPushButton::event (this=0x56489581c360, e=0x7ffe9cb15ad0) at /home/michi/development/git/qt5/qtbase/src/widgets/widgets/qpushbutton.cpp:684 #74 0x000019667a86fe10 in QApplicationPrivate::notify_helper (this=0x56488e07aae0, receiver=0x56489581c360, e=0x7ffe9cb15ad0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3304 #75 0x000019667a871ae2 in QApplication::notify (this=0x56488e067420, receiver=0x56489581c360, e=0x7ffe9cb15ad0) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2781 #76 0x00006f736e25acc9 in QCoreApplication::notifyInternal2 (receiver=0x56489581c360, event=0x7ffe9cb15ad0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1122 #77 0x00006f736e25bb39 in QCoreApplication::sendSpontaneousEvent (receiver=0x56489581c360, event=0x7ffe9cb15ad0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1578 #78 0x000019667a870737 in QApplicationPrivate::sendMouseEvent (receiver=0x56489581c360, event=0x7ffe9cb15ad0, alienWidget=0x56489581c360, nativeWidget=0x56488f3e8100, buttonDown=0x19667b45b488 <qt_button_down>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2362 #79 0x000019667a96b8bb in QWidgetWindow::handleMouseEvent (this=0x5648961bd080, event=0x7ffe9cb16b98) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:664 #80 0x000019667a96a145 in QWidgetWindow::event (this=0x5648961bd080, event=0x7ffe9cb16b98) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:292 #81 0x000019667a86fe10 in QApplicationPrivate::notify_helper (this=0x56488e07aae0, receiver=0x5648961bd080, e=0x7ffe9cb16b98) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3304 #82 0x000019667a873d2d in QApplication::notify (this=0x56488e067420, receiver=0x5648961bd080, e=0x7ffe9cb16b98) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3254 #83 0x00006f736e25acc9 in QCoreApplication::notifyInternal2 (receiver=0x5648961bd080, event=0x7ffe9cb16b98) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1122 #84 0x00006f736e25bb39 in QCoreApplication::sendSpontaneousEvent (receiver=0x5648961bd080, event=0x7ffe9cb16b98) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1578 #85 0x0000555757871f72 in QGuiApplicationPrivate::processMouseEvent (e=0x5f6d64003360) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:2485 #86 0x0000555757871136 in QGuiApplicationPrivate::processWindowSystemEvent (e=0x5f6d64003360) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:2212 #87 0x0000555757958a4d in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1113 #88 0x00005557579588fe in QWindowSystemInterface::flushWindowSystemEvents (flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1082 #89 0x0000393946e55875 in QtWaylandClient::QWaylandDisplay::flushRequests (this=0x56488e0ca590) at /home/michi/development/git/qt5/qtwayland/src/client/qwaylanddisplay.cpp:524 #90 0x0000393946e5a946 in QtWaylandClient::QWaylandDisplay::qt_static_metacall (_o=0x56488e0ca590, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0x7ffe9cb172a0) at qtwayland/src/client/WaylandClient_autogen/include/moc_qwaylanddisplay_p.cpp:95 #91 0x00006f736e331954 in doActivate<false> (sender=0x56488e06c0e0, signal_index=4, argv=0x7ffe9cb172a0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4151 #92 0x00006f736e3273e3 in QMetaObject::activate (sender=0x56488e06c0e0, m=0x6f736ec1ec68 <QAbstractEventDispatcher::staticMetaObject>, local_signal_index=1, argv=0x0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4199 #93 0x00006f736e243c79 in QAbstractEventDispatcher::awake (this=0x56488e06c0e0) at qtbase/src/corelib/Core_autogen/include/moc_qabstracteventdispatcher.cpp:129 #94 0x00006f736e84d1e8 in QEventDispatcherGlib::processEvents (this=0x56488e06c0e0, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:406 #95 0x0000555758154088 in QPAEventDispatcherGlib::processEvents (this=0x56488e06c0e0, flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:89 #96 0x00006a0d3b6d9b82 in QtInstance::ImplYield (this=0x56488e111bf0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:464 #97 0x00006a0d3b6dcc01 in QtInstance::DoYield (this=0x56488e111bf0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:475 #98 0x00005abe4e4b26e6 in ImplYield (i_bWait=true, i_bAllEvents=false) at vcl/source/app/svapp.cxx:385 #99 0x00005abe4e4b207f in Application::Yield () at vcl/source/app/svapp.cxx:473 #100 0x00005abe4e4b1e60 in Application::Execute () at vcl/source/app/svapp.cxx:360 #101 0x00004759668eccab in desktop::Desktop::Main (this=0x7ffe9cb18ec8) at desktop/source/app/app.cxx:1679 #102 0x00005abe4e4d3bc6 in ImplSVMain () at vcl/source/app/svmain.cxx:230 #103 0x00005abe4e4d57b9 in SVMain () at vcl/source/app/svmain.cxx:248 #104 0x00004759669665da in soffice_main () at desktop/source/app/sofficemain.cxx:121 #105 0x000056486abf0a6d in sal_main () at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51 #106 0x000056486abf0a47 in main (argc=1, argv=0x7ffe9cb190d8) at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49 [1] https://code.qt.io/cgit/qt/qtbase.git/commit/?id=84a5f50c7766c99f62b22bb4388137e0aa8dd13d Change-Id: I3f547c1b1c1581d2f3ae092f2034d930640b0f48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179312 Reviewed-by: Michael Weghorn <[email protected]> Tested-by: Jenkins (cherry picked from commit 4b547f1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179325 Reviewed-by: Adolfo Jayme Barrientos <[email protected]>
This reverts commit 687080c, as it caused e.g. CppunitTest_sw_docbookexport to fail with > sw/inc/calbck.hxx:428:18: runtime error: downcast of address 0x7ba8053a9db8 which does not point to an object of type 'SwClient' (aka 'ClientBase<SwModify>') > 0x7ba8053a9da0: note: object is base class subobject at offset 24 within object of type 'SwFormatHeader' > 00 00 00 00 d0 8b c9 ae 47 7b 00 00 01 00 00 00 66 00 48 01 40 6c 00 00 88 be be be 50 8c c9 ae > ^ ~~~~~~~~~~~ > vptr for 'sw::ClientBase<SwFrameFormat>' base class of 'SwFormatHeader' > #0 in SwIterator<sw::ClientBase<SwModify>, SwModify, (sw::IteratorMode)0>::First() at sw/inc/calbck.hxx:428:18 > #1 in SwModify::CallSwClientNotify(SfxHint const&) const at sw/source/core/attr/calbck.cxx:237:35 > #2 in sw::BroadcastingModify::CallSwClientNotify(SfxHint const&) const at sw/source/core/attr/calbck.cxx:259:15 > #3 in SwModify::SwClientNotify(SwModify const&, SfxHint const&) at sw/source/core/attr/calbck.cxx:229:5 > #4 in SwFormat::SwClientNotify(SwModify const&, SfxHint const&) at sw/source/core/attr/format.cxx:309:19 > #5 in SwFrameFormat::SwClientNotify(SwModify const&, SfxHint const&) at sw/source/core/layout/atrfrm.cxx:2849:15 > #6 in sw::ClientNotifyAttrChg(SwModify&, SwAttrSet const&, SwAttrSet&, SwAttrSet&) at sw/source/core/attr/calbck.cxx:268:13 > #7 in SwFormat::SetFormatAttr(SfxItemSet const&) at sw/source/core/attr/format.cxx:604:13 > #8 in FillHdFt(SwFrameFormat*, SfxItemSet const&) at sw/source/uibase/utlui/uitool.cxx:239:14 > #9 in ItemSetToPageDesc(SfxItemSet const&, SwPageDesc&) at sw/source/uibase/utlui/uitool.cxx:340:13 > #10 in SwDocStyleSheet::SetItemSet(SfxItemSet const&, bool, bool) at sw/source/uibase/app/docstyle.cxx:1894:13 > #11 in SwXPageStyle::SetPropertyValues_Impl(com::sun::star::uno::Sequence<rtl::OUString> const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) at sw/source/core/unocore/unostyle.cxx:3157:33 > #12 in SwXPageStyle::setPropertyValue(rtl::OUString const&, com::sun::star::uno::Any const&) at sw/source/core/unocore/unostyle.cxx:3453:5 > #13 in writerfilter::dmapper::DomainMapper_Impl::PushPageHeaderFooter(writerfilter::dmapper::PagePartType, writerfilter::dmapper::PageType) at sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx:3910:25 > #14 in writerfilter::dmapper::DomainMapper_Impl::substream(unsigned int, tools::SvRef<writerfilter::Reference<writerfilter::Stream>> const&) at sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx:10049:13 > #15 in writerfilter::dmapper::DomainMapper::lcl_substream(unsigned int, tools::SvRef<writerfilter::Reference<writerfilter::Stream>> const&) at sw/source/writerfilter/dmapper/DomainMapper.cxx:4746:14 > #16 in writerfilter::LoggedStream::substream(unsigned int, tools::SvRef<writerfilter::Reference<writerfilter::Stream>> const&) at sw/source/writerfilter/dmapper/LoggedResources.cxx:272:5 > #17 in writerfilter::ooxml::OOXMLDocumentImpl::resolveFastSubStreamWithId(writerfilter::Stream&, tools::SvRef<writerfilter::Reference<writerfilter::Stream>> const&, unsigned int) at sw/source/writerfilter/ooxml/OOXMLDocumentImpl.cxx:127:13 > #18 in writerfilter::ooxml::OOXMLDocumentImpl::resolveHeader(writerfilter::Stream&, int, rtl::OUString const&) at sw/source/writerfilter/ooxml/OOXMLDocumentImpl.cxx:384:10 > #19 in writerfilter::ooxml::OOXMLFastContextHandler::resolveHeader(int, rtl::OUString const&) at sw/source/writerfilter/ooxml/OOXMLFastContextHandler.cxx:895:35 > #20 in writerfilter::ooxml::OOXMLHeaderHandler::finalize() at sw/source/writerfilter/ooxml/Handler.cxx:214:20 > #21 in writerfilter::ooxml::OOXMLFastContextHandlerProperties::handleHdrFtr() at sw/source/writerfilter/ooxml/OOXMLFastContextHandler.cxx:1117:28 > #22 in writerfilter::ooxml::OOXMLFactory_wml::endAction(writerfilter::ooxml::OOXMLFastContextHandler*) at workdir/CustomTarget/sw/source/writerfilter/ooxml/OOXMLFactory_wml.cxx:7530:26 > #23 in writerfilter::ooxml::OOXMLFactory::endAction(writerfilter::ooxml::OOXMLFastContextHandler*) at sw/source/writerfilter/ooxml/OOXMLFactory.cxx:157:19 > #24 in writerfilter::ooxml::OOXMLFastContextHandler::endAction() at sw/source/writerfilter/ooxml/OOXMLFastContextHandler.cxx:320:5 > #25 in writerfilter::ooxml::OOXMLFastContextHandlerProperties::lcl_endFastElement(int) at sw/source/writerfilter/ooxml/OOXMLFastContextHandler.cxx:1038:9 > #26 in writerfilter::ooxml::OOXMLFastContextHandler::endFastElement(int) at sw/source/writerfilter/ooxml/OOXMLFastContextHandler.cxx:227:9 > #27 in (anonymous namespace)::Entity::endElement() at sax/source/fastparser/fastparser.cxx:515:27 > #28 in sax_fastparser::FastSaxParserImpl::callbackEndElement() at sax/source/fastparser/fastparser.cxx:1338:17 > #29 in (anonymous namespace)::call_callbackEndElement(void*, unsigned char const*, unsigned char const*, unsigned char const*) at sax/source/fastparser/fastparser.cxx:339:18 > #30 in xmlParseTryOrFinish at workdir/UnpackedTarball/libxml2/parser.c:11254:8 > #31 in xmlParseChunk at workdir/UnpackedTarball/libxml2/parser.c:11636:5 > #32 in sax_fastparser::FastSaxParserImpl::parse() at sax/source/fastparser/fastparser.cxx:1117:25 > #33 in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) at sax/source/fastparser/fastparser.cxx:896:9 > #34 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) at sax/source/fastparser/fastparser.cxx:1477:13 > #35 in writerfilter::ooxml::OOXMLDocumentImpl::resolve(writerfilter::Stream&) at sw/source/writerfilter/ooxml/OOXMLDocumentImpl.cxx:514:18 > #36 in (anonymous namespace)::WriterFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sw/source/writerfilter/filter/WriterFilter.cxx:210:24 > #37 in SfxObjectShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) at sfx2/source/doc/objstor.cxx:2719:34 > #38 in SfxObjectShell::DoLoad(SfxMedium*) at sfx2/source/doc/objstor.cxx:767:23 > #39 in SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/sfxbasemodel.cxx:1991:36 > #40 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:725:28 > #41 in framework::LoadEnv::impl_loadContent() at framework/source/loadenv/loadenv.cxx:1180:37 > #42 in framework::LoadEnv::start() at framework/source/loadenv/loadenv.cxx:415:20 > #43 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:311:5 > #44 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:167:14 > #45 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:592:16 > #46 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 > #47 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:72:62 > #48 in UnoApiTest::loadWithParams(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at test/source/unoapi_test.cxx:126:19 > #49 in UnoApiTest::loadFromURL(rtl::OUString const&, char const*) at test/source/unoapi_test.cxx:108:5 > #50 in SwModelTestBase::loadURL(rtl::OUString const&, char const*) at sw/qa/unit/swmodeltestbase.cxx:384:5 > #51 in SwModelTestBase::createSwDoc(char const*, char const*) at sw/qa/unit/swmodeltestbase.cxx:433:9 > #52 in (anonymous namespace)::testtdf91095::TestBody() at sw/qa/extras/docbookexport/docbookexport.cxx:35:5 Change-Id: I1e6d6888c8b311988e627845107148c7970fbaab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179502 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]>
…"" and fix SwIterator cast" This reverts commit d8e29e2. Reason for revert: It causes CppunitTest_sw_rtfexport2 to fail with > /sw/inc/calbck.hxx:428:18: runtime error: downcast of address 0x6060004d0fd8 which does not point to an object of type 'sw::ClientBase<SwModify>' > 0x6060004d0fc0: note: object is base class subobject at offset 24 within object of type 'SwFormatHeader' > 00 00 00 00 90 c6 d3 ea 6e 7f 00 00 01 00 00 00 66 00 48 01 a0 11 00 00 88 be be be 10 c7 d3 ea > ^ ~~~~~~~~~~~ > vptr for 'sw::ClientBase<SwFrameFormat>' base class of 'SwFormatHeader' > #0 0x7f6edd5beb5e in SwIterator<sw::ClientBase<SwModify>, SwModify, (sw::IteratorMode)0>::First() /sw/inc/calbck.hxx:428:18 > #1 0x7f6edd5b6d69 in SwModify::CallSwClientNotify(SfxHint const&) const /sw/source/core/attr/calbck.cxx:237:35 > #2 0x7f6edd5b7c45 in sw::BroadcastingModify::CallSwClientNotify(SfxHint const&) const /sw/source/core/attr/calbck.cxx:259:15 > #3 0x7f6edd5b49c6 in SwModify::SwClientNotify(SwModify const&, SfxHint const&) /sw/source/core/attr/calbck.cxx:229:5 > #4 0x7f6edd605e7b in SwFormat::SwClientNotify(SwModify const&, SfxHint const&) /sw/source/core/attr/format.cxx:309:19 > #5 0x7f6ee039738b in SwFrameFormat::SwClientNotify(SwModify const&, SfxHint const&) /sw/source/core/layout/atrfrm.cxx:2849:15 > #6 0x7f6edd5b8189 in sw::ClientNotifyAttrChg(SwModify&, SwAttrSet const&, SwAttrSet&, SwAttrSet&) /sw/source/core/attr/calbck.cxx:268:13 > #7 0x7f6edd610879 in SwFormat::SetFormatAttr(SfxItemSet const&) /sw/source/core/attr/format.cxx:604:13 > #8 0x7f6ee6495964 in FillHdFt(SwFrameFormat*, SfxItemSet const&) /sw/source/uibase/utlui/uitool.cxx:239:14 > #9 0x7f6ee64914e7 in ItemSetToPageDesc(SfxItemSet const&, SwPageDesc&) /sw/source/uibase/utlui/uitool.cxx:340:13 > #10 0x7f6ee43fe5b4 in SwDocStyleSheet::SetItemSet(SfxItemSet const&, bool, bool) /sw/source/uibase/app/docstyle.cxx:1894:13 > #11 0x7f6ee304306c in SwXPageStyle::SetPropertyValues_Impl(com::sun::star::uno::Sequence<rtl::OUString> const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) /sw/source/core/unocore/unostyle.cxx:3157:33 > #12 0x7f6ee304d9b9 in SwXPageStyle::setPropertyValue(rtl::OUString const&, com::sun::star::uno::Any const&) /sw/source/core/unocore/unostyle.cxx:3453:5 > #13 0x7f6e9b369897 in writerfilter::dmapper::DomainMapper_Impl::PushPageHeaderFooter(writerfilter::dmapper::PagePartType, writerfilter::dmapper::PageType) /sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx:3910:25 > #14 0x7f6e9b445050 in writerfilter::dmapper::DomainMapper_Impl::substream(unsigned int, tools::SvRef<writerfilter::Reference<writerfilter::Stream> > const&) /sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx:10046:13 > #15 0x7f6e9b101b9d in writerfilter::dmapper::DomainMapper::lcl_substream(unsigned int, tools::SvRef<writerfilter::Reference<writerfilter::Stream> > const&) /sw/source/writerfilter/dmapper/DomainMapper.cxx:4746:14 > #16 0x7f6e9b877f73 in writerfilter::LoggedStream::substream(unsigned int, tools::SvRef<writerfilter::Reference<writerfilter::Stream> > const&) /sw/source/writerfilter/dmapper/LoggedResources.cxx:272:5 > #17 0x7f6e9ad35daf in writerfilter::rtftok::RTFDocumentImpl::resolveSubstream(unsigned long, unsigned int, rtl::OUString const&) /sw/source/writerfilter/rtftok/rtfdocumentimpl.cxx:381:14 > #18 0x7f6e9ad33bc1 in writerfilter::rtftok::RTFDocumentImpl::resolveSubstream(unsigned long, unsigned int) /sw/source/writerfilter/rtftok/rtfdocumentimpl.cxx:356:5 > #19 0x7f6e9ad48f49 in writerfilter::rtftok::RTFDocumentImpl::sectBreak(bool) /sw/source/writerfilter/rtftok/rtfdocumentimpl.cxx:705:9 > #20 0x7f6e9adcd3b7 in writerfilter::rtftok::RTFDocumentImpl::popState() /sw/source/writerfilter/rtftok/rtfdocumentimpl.cxx:3695:13 > #21 0x7f6e9afd2595 in writerfilter::rtftok::RTFTokenizer::resolveParse() /sw/source/writerfilter/rtftok/rtftokenizer.cxx:2011:37 > #22 0x7f6e9ad4ef4f in writerfilter::rtftok::RTFDocumentImpl::resolve(writerfilter::Stream&) /sw/source/writerfilter/rtftok/rtfdocumentimpl.cxx:844:27 > #23 0x7f6e9bd39f91 in (anonymous namespace)::RtfFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sw/source/writerfilter/filter/RtfFilter.cxx:164:20 > #24 0x7f6ef659a6a4 in SfxObjectShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) /sfx2/source/doc/objstor.cxx:2719:34 > #25 0x7f6ef654cf40 in SfxObjectShell::DoLoad(SfxMedium*) /sfx2/source/doc/objstor.cxx:767:23 > #26 0x7f6ef67df024 in SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sfx2/source/doc/sfxbasemodel.cxx:1991:36 > #27 0x7f6ef703d0f0 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&) /sfx2/source/view/frmload.cxx:725:28 > #28 0x7f6ec073ee16 in framework::LoadEnv::impl_loadContent() /framework/source/loadenv/loadenv.cxx:1180:37 > #29 0x7f6ec0735cb2 in framework::LoadEnv::start() /framework/source/loadenv/loadenv.cxx:415:20 > #30 0x7f6ec072e172 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) /framework/source/loadenv/loadenv.cxx:311:5 > #31 0x7f6ec0729554 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&) /framework/source/loadenv/loadenv.cxx:167:14 > #32 0x7f6ec07fe176 in framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/desktop.cxx:592:16 > #33 0x7f6ec07fe396 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&) /framework/source/services/desktop.cxx > #34 0x7f6ed3d9c8c9 in unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /unotest/source/cpp/macros_test.cxx:72:62 > #35 0x7f6ef13e8d62 in UnoApiTest::loadWithParams(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /test/source/unoapi_test.cxx:126:19 > #36 0x7f6ef13e7e98 in UnoApiTest::loadFromURL(rtl::OUString const&, char const*) /test/source/unoapi_test.cxx:108:5 > #37 0x7f6efe61e0c7 in SwModelTestBase::loadURL(rtl::OUString const&, char const*) /sw/qa/unit/swmodeltestbase.cxx:384:5 > #38 0x7f6efe632c07 in SwModelTestBase::createSwDoc(char const*, char const*) /sw/qa/unit/swmodeltestbase.cxx:433:9 > #39 0x7f6efe0c635f in (anonymous namespace)::testAllGapsWord::TestBody() /sw/qa/extras/rtfexport/rtfexport2.cxx:771:5 (<https://ci.libreoffice.org/job/lo_ubsan/3418/>) Change-Id: I70bd88050887c8b6c747707f2ea3b89802c7b468 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179946 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]>
...when generating Python/deepfreeze/deepfreeze.c during the build of ExternalProject_python3 after 5052448 "Python: upgrade to 3.11.11 (master only)", > Objects/dictobject.c:1500:40: runtime error: load of misaligned address 0x555853494d81 for type 'PyDictUnicodeEntry *', which requires 8 byte alignment > 0x555853494d81: note: pointer points here > 00 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > ^ > #0 in dictresize at workdir/UnpackedTarball/python3/Objects/dictobject.c:1500:21 > #1 in dict_merge at workdir/UnpackedTarball/python3/Objects/dictobject.c:2880:17 > #2 in _PyDict_MergeEx at workdir/UnpackedTarball/python3/Objects/dictobject.c:3003:12 > #3 in _PyEval_EvalFrameDefault at workdir/UnpackedTarball/python3/Python/ceval.c:3432:17 > #4 in _PyEval_EvalFrame at workdir/UnpackedTarball/python3/./Include/internal/pycore_ceval.h:73:16 > #5 in _PyEval_Vector at workdir/UnpackedTarball/python3/Python/ceval.c:6434:24 > #6 in _PyFunction_Vectorcall at workdir/UnpackedTarball/python3/Objects/call.c:393:16 > #7 in _PyObject_FastCallDictTstate at workdir/UnpackedTarball/python3/Objects/call.c:141:15 > #8 in _PyObject_Call_Prepend at workdir/UnpackedTarball/python3/Objects/call.c:482:24 > #9 in slot_tp_init at workdir/UnpackedTarball/python3/Objects/typeobject.c:7855:15 > #10 in type_call at workdir/UnpackedTarball/python3/Objects/typeobject.c:1103:19 > #11 in _PyObject_MakeTpCall at workdir/UnpackedTarball/python3/Objects/call.c:214:18 > #12 in _PyObject_VectorcallTstate at workdir/UnpackedTarball/python3/./Include/internal/pycore_call.h:90:16 > #13 in PyObject_Vectorcall at workdir/UnpackedTarball/python3/Objects/call.c:299:12 > #14 in _PyEval_EvalFrameDefault at workdir/UnpackedTarball/python3/Python/ceval.c:4769:23 > #15 in _PyEval_EvalFrame at workdir/UnpackedTarball/python3/./Include/internal/pycore_ceval.h:73:16 > #16 in _PyEval_Vector at workdir/UnpackedTarball/python3/Python/ceval.c:6434:24 > #17 in PyEval_EvalCode at workdir/UnpackedTarball/python3/Python/ceval.c:1148:21 > #18 in run_eval_code_obj at workdir/UnpackedTarball/python3/Python/pythonrun.c:1741:9 > #19 in run_mod at workdir/UnpackedTarball/python3/Python/pythonrun.c:1762:19 > #20 in pyrun_file at workdir/UnpackedTarball/python3/Python/pythonrun.c:1657:15 > #21 in _PyRun_SimpleFileObject at workdir/UnpackedTarball/python3/Python/pythonrun.c:440:13 > #22 in _PyRun_AnyFileObject at workdir/UnpackedTarball/python3/Python/pythonrun.c:79:15 > #23 in pymain_run_file_obj at workdir/UnpackedTarball/python3/Modules/main.c:360:15 > #24 in pymain_run_file at workdir/UnpackedTarball/python3/Modules/main.c:379:15 > #25 in pymain_run_python at workdir/UnpackedTarball/python3/Modules/main.c:605:21 > #26 in Py_RunMain at workdir/UnpackedTarball/python3/Modules/main.c:684:5 > #27 in main at workdir/UnpackedTarball/python3/Programs/_bootstrap_python.c:109:12 Change-Id: I0bacef11b5874bca6104516a206076a0505528ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180037 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]>
When using the qt6 vcl plugin with the Orca screen reader running, selecting text in Writer resulted in a crash due to an IndexOutOfBoundsException being thrown. Backtrace: Thread 1 received signal SIGABRT, Aborted. __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44 warning: 44 ./nptl/pthread_kill.c: No such file or directory (rr) bt #0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44 #1 0x00007f889b09ddef in __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:78 #2 0x00007f889b049d02 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26 #3 0x00007f889b0324f0 in __GI_abort () at ./stdlib/abort.c:79 #4 0x00007f889aca1a3d in ??? () at /lib/x86_64-linux-gnu/libstdc++.so.6 #5 0x00007f889acb300a in ??? () at /lib/x86_64-linux-gnu/libstdc++.so.6 #6 0x00007f889aca15e9 in std::terminate() () at /lib/x86_64-linux-gnu/libstdc++.so.6 #7 0x00007f889acb3288 in __cxa_throw () at /lib/x86_64-linux-gnu/libstdc++.so.6 #8 0x00007f8862346900 in SwAccessibleSelectionHelper::throwIndexOutOfBoundsException (this=0x561f2f8d1910) at .../libreoffice/sw/source/core/access/accselectionhelper.cxx:72 #9 0x00007f8862347df8 in SwAccessibleSelectionHelper::getSelectedAccessibleChild (this=0x561f2f8d1910, nSelectedChildIndex=0) at .../libreoffice/sw/source/core/access/accselectionhelper.cxx:283 #10 0x00007f8862298e6f in SwAccessibleDocument::getSelectedAccessibleChild (this=0x561f2f8d1800, nSelectedChildIndex=0) at .../libreoffice/sw/source/core/access/accdoc.cxx:467 #11 0x00007f8862298eaf in non-virtual thunk to SwAccessibleDocument::getSelectedAccessibleChild(long) () at .../libreoffice/sw/source/core/access/accdoc.cxx:467 #12 0x00007f88878c6200 in QtAccessibleWidget::selectedItem (this=0x7f887c014ac0, nSelectionIndex=0) at vcl/qt6/../qt5/QtAccessibleWidget.cxx:1861 #13 0x00007f8885f08ba0 in AtSpiAdaptor::selectionInterface (this=0x561f2b8a7070, interface=0x7f887c014ac0, function=..., message=..., connection=...) at .../qt5/qtbase/src/gui/accessible/linux/atspiadaptor.cpp:2596 #14 0x00007f8885f03ce1 in AtSpiAdaptor::handleMessage (this=0x561f2b8a7070, message=..., connection=...) at .../qt5/qtbase/src/gui/accessible/linux/atspiadaptor.cpp:1479 #15 0x00007f888366d217 in QDBusConnectionPrivate::activateObject (this=0x7f887c00a390, node=..., msg=..., pathStartPos=27) at .../qt5/qtbase/src/dbus/qdbusintegrator.cpp:1448 #16 0x00007f888366e1d0 in QDBusActivateObjectEvent::placeMetaCall (this=0x7f887c03aca0) at .../qt5/qtbase/src/dbus/qdbusintegrator.cpp:1604 #17 0x00007f8886b09bb1 in QObject::event (this=0x561f2b8a7070, e=0x7f887c03aca0) at .../qt5/qtbase/src/corelib/kernel/qobject.cpp:1431 #18 0x00007f88849e2dd0 in QApplicationPrivate::notify_helper (this=0x561f2a554ae0, receiver=0x561f2b8a7070, e=0x7f887c03aca0) at .../qt5/qtbase/src/widgets/kernel/qapplication.cpp:3305 #19 0x00007f88849e6ced in QApplication::notify (this=0x561f2a541420, receiver=0x561f2b8a7070, e=0x7f887c03aca0) at .../qt5/qtbase/src/widgets/kernel/qapplication.cpp:3255 #20 0x00007f8886a481b9 in QCoreApplication::notifyInternal2 (receiver=0x561f2b8a7070, event=0x7f887c03aca0) at .../qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1118 #21 0x00007f8886a48e29 in QCoreApplication::sendEvent (receiver=0x561f2b8a7070, event=0x7f887c03aca0) at .../qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1558 #22 0x00007f8886a49d68 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x561f2a56fee0) at .../qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1898 #23 0x00007f8886a48c6c in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at .../qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1752 #24 0x00007f88870377b1 in postEventSourceDispatch (s=0x561f2a5cce80) at .../qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:246 #25 0x00007f888d50b81f in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #26 0x00007f888d50da57 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #27 0x00007f888d50e1c0 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #28 0x00007f88870369eb in QEventDispatcherGlib::processEvents (this=0x561f2a545d00, flags=...) at .../qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:399 #29 0x00007f8886164858 in QPAEventDispatcherGlib::processEvents (this=0x561f2a545d00, flags=...) at .../qt5/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:89 #30 0x00007f888796a492 in QtInstance::ImplYield (this=0x561f2a5d16c0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:464 #31 0x00007f888796d511 in QtInstance::DoYield (this=0x561f2a5d16c0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:475 #32 0x00007f88924bd626 in ImplYield (i_bWait=true, i_bAllEvents=false) at .../libreoffice/vcl/source/app/svapp.cxx:385 #33 0x00007f88924bcf3f in Application::Yield () at .../libreoffice/vcl/source/app/svapp.cxx:488 #34 0x00007f88924bcd20 in Application::Execute () at .../libreoffice/vcl/source/app/svapp.cxx:360 #35 0x00007f889b327b89 in desktop::Desktop::Main (this=0x7ffcd9ea1c00) at .../libreoffice/desktop/source/app/app.cxx:1679 #36 0x00007f88924deaa6 in ImplSVMain () at .../libreoffice/vcl/source/app/svmain.cxx:230 #37 0x00007f88924e0699 in SVMain () at .../libreoffice/vcl/source/app/svmain.cxx:248 #38 0x00007f889b3a146a in soffice_main () at .../libreoffice/desktop/source/app/sofficemain.cxx:121 #39 0x0000561ef2802a6d in sal_main () at .../libreoffice/desktop/source/app/main.c:51 #40 0x0000561ef2802a47 in main (argc=2, argv=0x7ffcd9ea1e08) at .../libreoffice/desktop/source/app/main.c:49 While QtAccessibleWidget::selectedItem already returns early if the passed selection index is too large according to what XAccessibleSelection::getSelectedAccessibleChildCount() returns, this is not enough because Writer's SwAccessibleSelectionHelper has an inconsistent/broken implementation: SwAccessibleSelectionHelper::getSelectedAccessibleChildCount returns the count of paragraphs that are (partially) selected by the text cursor if no other objects are selected. However, SwAccessibleSelectionHelper::getSelectedAccessibleChild doesn't take these into account and therefore throws the IndexOutOfBoundsException when called with any index. Temporarily (in particular for backporting to release branches), handle the exception in QtAccessibleWidget::selectedItem like other a11y bridges do (see e.g. `selection_ref_selection` for the gtk3 VCL plugin) to avoid the crash. The underlying Writer issue described above will be fixed in a separate commit (and for master only). Change-Id: I874ad4a7a9faf79492967c943517d83df5f47e75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180228 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]>
Made the required changes in the file and verified it's working.