[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sc/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Tue Dec 1 14:51:07 UTC 2020


 sc/source/ui/view/cellsh1.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d0504b28ccbfd8fbac7191e606c6487aab66e1f3
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Nov 30 22:16:15 2020 +0100
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Dec 1 15:50:27 2020 +0100

    Fix stack-use-after-return
    
    ...introduced with 244a447734d2abae8896884d4ab73eb4510d243c "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 <sbergman at redhat.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106980
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 11d9b5aa743a..f5d8a0ab17ea 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2851,7 +2851,7 @@ void ScCellShell::ExecuteDataPilotDialog()
         }
 
         pTypeDlg->StartExecuteAsync([this, pTypeDlg, pTabViewShell,
-                                    pScMod, pFact, pDoc, &rMark, &aDestPos](int nResult) {
+                                    pScMod, pFact, pDoc, &rMark, aDestPos](int nResult) mutable {
             const char* pSrcErrorId = nullptr;
             std::unique_ptr<ScDPObject> pNewDPObject;
 


More information about the Libreoffice-commits mailing list