Call implHandleSbxFlags also from StepSTATIC_Impl

Desktop / LibreOffice - Stephan Bergmann [redhat.com] - 18 April 2017 11:06 EDT

...similarly to how it is called from StepLOCAL and StepPUBLIC_Impl.

Now that there's basic/qa/vba_tests/mirr.vb containing

Static Values(5) As Double ' Set up array.

that caused CppunitTest_basic_macros to fail in UBSan builds with

> /basic/source/runtime/runtime.cxx:4613:34: runtime error: load of value 262149, which is not a valid value for type 'SbxDataType' > #0 0x2b25aa72d3f5 in SbiRuntime::StepSTATIC_Impl(rtl::OUString&, SbxDataType&) /basic/source/runtime/runtime.cxx:4613:34 > #1 0x2b25aa6e821f in SbiRuntime::StepSTATIC(unsigned int, unsigned int) /basic/source/runtime/runtime.cxx:4629:5 > #2 0x2b25aa6ff0cf in SbiRuntime::Step() /basic/source/runtime/runtime.cxx:770:13 > #3 0x2b25aa237cba in SbModule::Run(SbMethod*) /basic/source/classes/sbxmod.cxx:1144:20 > #4 0x2b25aa232916 in SbModule::Notify(SfxBroadcaster&, SfxHint const&) /basic/source/classes/sbxmod.cxx:809:21 > #5 0x2b259b0f51f1 in SfxBroadcaster::Broadcast(SfxHint const&) /svl/source/notify/SfxBroadcaster.cxx:49:13 > #6 0x2b25aa267165 in SbMethod::Broadcast(SfxHintId) /basic/source/classes/sbxmod.cxx:2126:9 > #7 0x2b25aaa96fb9 in SbxValue::SbxValue(SbxValue const&) /basic/source/sbx/sbxvalue.cxx:62:9 > #8 0x2b25aaae16ec in SbxVariable::SbxVariable(SbxVariable const&) /basic/source/sbx/sbxvar.cxx:73:7 > #9 0x2b25aaa51afd in SbxMethod::SbxMethod(SbxMethod const&) /basic/source/sbx/sbxobj.cxx:869:7 > #10 0x2b25aa72c12b in SbiRuntime::FindElement(SbxObject*, unsigned int, unsigned int, unsigned long, bool, bool) /basic/source/runtime/runtime.cxx:3518:37 > #11 0x2b25aa735314 in SbiRuntime::StepFIND_Impl(SbxObject*, unsigned int, unsigned int, unsigned long, bool) /basic/source/runtime/runtime.cxx:3941:14 > #12 0x2b25aa6da643 in SbiRuntime::StepFIND(unsigned int, unsigned int) /basic/source/runtime/runtime.cxx:3947:5 > #13 0x2b25aa6ff0cf in SbiRuntime::Step() /basic/source/runtime/runtime.cxx:770:13 > #14 0x2b25aa237cba in SbModule::Run(SbMethod*) /basic/source/classes/sbxmod.cxx:1144:20 > #15 0x2b25aa232916 in SbModule::Notify(SfxBroadcaster&, SfxHint const&) /basic/source/classes/sbxmod.cxx:809:21 > #16 0x2b259b0f51f1 in SfxBroadcaster::Broadcast(SfxHint const&) /svl/source/notify/SfxBroadcaster.cxx:49:13 > #17 0x2b25aa267165 in SbMethod::Broadcast(SfxHintId) /basic/source/classes/sbxmod.cxx:2126:9 > #18 0x2b25aaa96fb9 in SbxValue::SbxValue(SbxValue const&) /basic/source/sbx/sbxvalue.cxx:62:9 > #19 0x2b25aaae16ec in SbxVariable::SbxVariable(SbxVariable const&) /basic/source/sbx/sbxvar.cxx:73:7 > #20 0x2b25aaa51afd in SbxMethod::SbxMethod(SbxMethod const&) /basic/source/sbx/sbxobj.cxx:869:7 > #21 0x2b25a9010a4a in MacroSnippet::Run(com::sun::star::uno::Sequence const&) /basic/qa/cppunit/basictest.cxx:95:23 > #22 0x2b25a9012797 in MacroSnippet::Run() /basic/qa/cppunit/basictest.cxx:103:12 > #23 0x2b25a908e336 in (anonymous namespace)::VBATest::testMiscVBAFunctions() /basic/qa/cppunit/test_vba.cxx:125:34 > #24 0x2b25a90964a8 in void std::_Mem_fn_base::operator()<, void>((anonymous namespace)::VBATest*) const /home/tdf/lode/opt_private/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/functional:600:11 > #25 0x2b25a90961d3 in void std::_Bind ((anonymous namespace)::VBATest*)>::__call(std::tuple<>&&, std::_Index_tuple<0ul>) /home/tdf/lode/opt_private/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/functional:1073:11 > #26 0x2b25a9095c81 in void std::_Bind ((anonymous namespace)::VBATest*)>::operator()<, void>() /home/tdf/lode/opt_private/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/functional:1131:11 > #27 0x2b25a9094a79 in std::_Function_handler ((anonymous namespace)::VBATest*)> >::_M_invoke(std::_Any_data const&) /home/tdf/lode/opt_private/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/functional:1871:2 > #28 0x2b25a9046710 in std::function::operator()() const /home/tdf/lode/opt_private/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/functional:2271:14 > #29 0x2b25a9093175 in CppUnit::TestCaller<(anonymous namespace)::VBATest>::runTest() /workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:175:7 > #30 0x2b256430d0ad in CppUnit::TestCaseMethodFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:32:5 > #31 0x2b257d507ea6 in (anonymous namespace)::Protector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /test/source/vclbootstrapprotector.cxx:39:14 > #32 0x2b25642cbb77 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:12 > #33 0x2b2573b757f6 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /unotest/source/cpp/unobootstrapprotector/unobootstrapprotector.cxx:89:12 > #34 0x2b25642cbb77 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:12 > #35 0x2b256fd37d83 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx:63:16 > #36 0x2b25642cbb77 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:12 > #37 0x2b256424750f in CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /workdir/UnpackedTarball/cppunit/src/cppunit/DefaultProtector.cpp:15:12 > #38 0x2b25642cbb77 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:12 > #39 0x2b25642c1da0 in CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:86:18 > #40 0x2b2564396efb in CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::string const&) /workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:182:10 > #41 0x2b256430a12d in CppUnit::TestCase::run(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:91:5 > #42 0x2b25643102e3 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:5 > #43 0x2b256430f24d in CppUnit::TestComposite::run(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3 > #44 0x2b25643102e3 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:5 > #45 0x2b256430f24d in CppUnit::TestComposite::run(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3 > #46 0x2b25643d68b6 in CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:47:5 > #47 0x2b2564395049 in CppUnit::TestResult::runTest(CppUnit::Test*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:149:3 > #48 0x2b25643d7d57 in CppUnit::TestRunner::run(CppUnit::TestResult&, std::string const&) /workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:96:3 > #49 0x5161f2 in (anonymous namespace)::ProtectedFixtureFunctor::run() const /sal/cppunittester/cppunittester.cxx:306:13 > #50 0x510c8f in sal_main() /sal/cppunittester/cppunittester.cxx:456:14 > #51 0x50eda2 in main /sal/cppunittester/cppunittester.cxx:363:1 > #52 0x2b2565ff6b14 in __libc_start_main (/lib64/libc.so.6+0x21b14) > #53 0x433a04 in _start (/workdir/LinkTarget/Executable/cppunittester+0x433a04)

(where 262149 = 0x40005, i.e., SbxDOUBLE|SBX_TYPE_VAR_TO_DIM_FLAG)

24fa0d6 Call implHandleSbxFlags also from StepSTATIC_Impl
basic/source/inc/runtime.hxx | 3 ++-
basic/source/runtime/runtime.cxx | 10 ++++++----
2 files changed, 8 insertions(+), 5 deletions(-)

Upstream: cgit.freedesktop.org


  • Share