[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sw/source

Stephan Bergmann sbergman at redhat.com
Thu Jun 14 14:29:24 UTC 2018


 sw/source/core/text/inftxt.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b60cc77d26dd1cfd25e60a53bf3403b3790b54b8
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Jun 13 13:40:03 2018 +0200

    Avoid -fsanitize=null
    
    ...during JunitTest_sw_unoapi_4:
    
    [...]
    > checking: [sw.SwXTextViewCursor::com::sun::star::style::CharacterProperties] is iface: [com.sun.star.beans.XPropertySet] testcode: [ifc.style._CharacterProperties]
    > LOG> Execute: CharFontName
    > LOG> try to set:
    > LOG> old = Liberation Serif
    > LOG> new = Times New Roman
    > LOG> Property CharFontName is void
    > LOG> Property 'CharFontName' OK
    > LOG> result = Times New Roman
    > Method CharFontName finished with state OK
    > LOG> CharFontName: COMPLETED.OK
    >
    [...]
    >
    > LOG> Execute: CharCombinePrefix
    > LOG> try to set:
    > LOG> old =
    > LOG> new = New
    > sw/source/core/text/inftxt.cxx:1794:69: runtime error: reference binding to null pointer of type 'const SwWrongList'
    >  #0 in SwTextSlot::SwTextSlot(SwTextSizeInfo const*, SwLinePortion const*, bool, bool, rtl::OUString const&) at sw/source/core/text/inftxt.cxx:1794:47 (instdir/program/../program/libswlo.so +0x826da0a)
    >  #1 in SwExpandPortion::Paint(SwTextPaintInfo const&) const at sw/source/core/text/porexp.cxx:66:16 (instdir/program/../program/libswlo.so +0x8391b43)
    >  #2 in SwBlankPortion::Paint(SwTextPaintInfo const&) const at sw/source/core/text/porexp.cxx:199:22 (instdir/program/../program/libswlo.so +0x8395368)
    >  #3 in SwDoubleLinePortion::PaintBracket(SwTextPaintInfo&, long, bool) const at sw/source/core/text/pormulti.cxx:365:16 (instdir/program/../program/libswlo.so +0x8449ab3)
    >  #4 in SwTextPainter::PaintMultiPortion(SwRect const&, SwMultiPortion&, SwMultiPortion const*) at sw/source/core/text/pormulti.cxx:1580:51 (instdir/program/../program/libswlo.so +0x8467d46)
    >  #5 in SwTextPainter::DrawTextLine(SwRect const&, SwSaveClip&, bool) at sw/source/core/text/itrpaint.cxx:396:17 (instdir/program/../program/libswlo.so +0x83764cc)
    >  #6 in SwTextFrame::PaintSwFrame(OutputDevice&, SwRect const&, SwPrintData const*) const at sw/source/core/text/frmpaint.cxx:697:23 (instdir/program/../program/libswlo.so +0x822f5ab)
    >  #7 in SwLayoutFrame::PaintSwFrame(OutputDevice&, SwRect const&, SwPrintData const*) const at sw/source/core/layout/paintfrm.cxx:3421:21 (instdir/program/../program/libswlo.so +0x7c70a12)
    >  #8 in SwLayoutFrame::PaintSwFrame(OutputDevice&, SwRect const&, SwPrintData const*) const at sw/source/core/layout/paintfrm.cxx:3421:21 (instdir/program/../program/libswlo.so +0x7c70a12)
    >  #9 in SwRootFrame::PaintSwFrame(OutputDevice&, SwRect const&, SwPrintData const*) const at sw/source/core/layout/paintfrm.cxx:3136:24 (instdir/program/../program/libswlo.so +0x7c5032e)
    >  #10 in SwViewShell::ImplEndAction(bool) at sw/source/core/view/viewsh.cxx:413:49 (instdir/program/../program/libswlo.so +0x95cd0ca)
    >  #11 in SwViewShell::EndAction(bool) at sw/inc/viewsh.hxx:594:9 (instdir/program/../program/libswlo.so +0x5f5b0a5)
    >  #12 in SwCursorShell::EndAction(bool, bool) at sw/source/core/crsr/crsrsh.cxx:256:18 (instdir/program/../program/libswlo.so +0x5ef26ee)
    >  #13 in SwRootFrame::EndAllAction(bool) at sw/source/core/layout/pagechg.cxx:1875:52 (instdir/program/../program/libswlo.so +0x7bfe2ce)
    >  #14 in UnoActionContext::~UnoActionContext() at sw/source/core/unocore/unoobj2.cxx:261:25 (instdir/program/../program/libswlo.so +0x9110434)
    >  #15 in SwUnoCursorHelper::SetCursorAttr(SwPaM&, SfxItemSet const&, SetAttrMode, bool) at sw/source/core/unocore/unoobj2.cxx:369:1 (instdir/program/../program/libswlo.so +0x911327a)
    >  #16 in SwUnoCursorHelper::SetPropertyValues(SwPaM&, SfxItemPropertySet const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, SetAttrMode) at sw/source/core/unocore/unoobj.cxx:1839:17 (instdir/program/../program/libswlo.so +0x90e0bff)
    >  #17 in SwUnoCursorHelper::SetPropertyValue(SwPaM&, SfxItemPropertySet const&, rtl::OUString const&, com::sun::star::uno::Any const&, SetAttrMode) at sw/source/core/unocore/unoobj.cxx:1760:5 (instdir/program/../program/libswlo.so +0x90dfb0e)
    >  #18 in SwXTextViewCursor::setPropertyValue(rtl::OUString const&, com::sun::star::uno::Any const&) at sw/source/uibase/uno/unotxvw.cxx:1441:5 (instdir/program/../program/libswlo.so +0xafac835)
    >  #19 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 (instdir/program/libgcc3_uno.so +0xba96d)
    >  #20 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 (instdir/program/libgcc3_uno.so +0xb6855)
    >  #21 in unoInterfaceProxyDispatch at bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:420:13 (instdir/program/libgcc3_uno.so +0xb4663)
    >  #22 in binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::__debug::vector<binaryurp::BinaryAny, std::allocator<binaryurp::BinaryAny> >*) const at binaryurp/source/incomingrequest.cxx:236:13 (instdir/program/libbinaryurplo.so +0x209ede)
    >  #23 in binaryurp::IncomingRequest::execute() const at binaryurp/source/incomingrequest.cxx:79:26 (instdir/program/libbinaryurplo.so +0x205f10)
    >  #24 in request at binaryurp/source/reader.cxx:85:9 (instdir/program/libbinaryurplo.so +0x2966d3)
    >  #25 in cppu_threadpool::JobQueue::enter(long, bool) at cppu/source/threadpool/jobqueue.cxx:107:17 (instdir/program/libuno_cppu.so.3 +0x17e863)
    >  #26 in cppu_threadpool::ORequestThread::run() at cppu/source/threadpool/thread.cxx:165:31 (instdir/program/libuno_cppu.so.3 +0x1977bb)
    >  #27 in threadFunc at include/osl/thread.hxx:185:15 (instdir/program/libuno_cppu.so.3 +0x1a0347)
    >  #28 in osl_thread_start_Impl(void*) at sal/osl/unx/thread.cxx:234:9 (instdir/program/libuno_sal.so.3 +0x2e6479)
    >  #29 in start_thread at /usr/src/debug/glibc-2.27-56-g50df56ca86/nptl/pthread_create.c:463:7 (/lib64/libpthread.so.0 +0x7593)
    >  #30 in __GI___clone at /usr/src/debug/glibc-2.27-56-g50df56ca86/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95 (/lib64/libc.so.6 +0xfa00e)
    >
    > LOG> Exception occurred while testing property 'CharCombinePrefix'
    > Method CharCombinePrefix finished with state FAILED
    > com.sun.star.lang.DisposedException: java_remote_bridge com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge at 4eb7f003 is disposed
    >       at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.checkDisposed(java_remote_bridge.java:688)
    >       at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:602)
    >       at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:145)
    >       at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:129)
    >       at com.sun.proxy.$Proxy24.getPropertyValue(Unknown Source)
    >       at lib.MultiPropertyTest$PropertyTester.testProperty(MultiPropertyTest.java:210)
    >       at lib.MultiPropertyTest.testProperty(MultiPropertyTest.java:461)
    >       at lib.MultiPropertyTest.testProperty(MultiPropertyTest.java:470)
    >       at lib.MultiPropertyTest.invokeTestMethod(MultiPropertyTest.java:83)
    >       at lib.MultiMethodTest.callMethod(MultiMethodTest.java:365)
    >       at lib.MultiMethodTest.executeMethod(MultiMethodTest.java:353)
    >       at lib.MultiMethodTest.run(MultiMethodTest.java:217)
    >       at base.java_fat.executeInterfaceTest(java_fat.java:447)
    >       at base.java_fat.executeTest(java_fat.java:187)
    >       at org.openoffice.Runner.run(Runner.java:175)
    >       at org.openoffice.test.UnoApiTest.test(UnoApiTest.java:41)
    >       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    >       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    >       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    >       at java.lang.reflect.Method.invoke(Method.java:498)
    >       at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    >       at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    >       at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:52)
    >       at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    >       at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    >       at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    >       at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    >       at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    >       at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    >       at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    >       at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    >       at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    >       at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    >       at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    >       at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    >       at org.junit.runners.Suite.runChild(Suite.java:128)
    >       at org.junit.runners.Suite.runChild(Suite.java:27)
    >       at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    >       at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    >       at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    >       at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    >       at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    >       at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    >       at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    >       at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
    >       at org.junit.runner.JUnitCore.runMain(JUnitCore.java:77)
    >       at org.junit.runner.JUnitCore.main(JUnitCore.java:36)
    > LOG> CharCombinePrefix: COMPLETED.FAILED
    [...]
    
    (And, as suggested by mst, made a similar change a few lines further up, even if
    that never showed up to be null at least during `make check`.)
    
    Change-Id: Iac1d2ba7b7bb940b6b185754141407cc31ed6319
    Reviewed-on: https://gerrit.libreoffice.org/55749
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
    (cherry picked from commit 6a501515e09f05aba85eed3d0c65e5874b141f9d)

diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 9a29d58d0b19..5c7faa1b8511 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -1760,7 +1760,7 @@ SwTextSlot::SwTextSlot(
                 {
                     const sal_uInt16 nPos = pSmartTags->GetWrongPos(pos.second);
                     const sal_Int32 nListPos = pSmartTags->Pos(nPos);
-                    if (nListPos == pos.second)
+                    if (nListPos == pos.second && pSmartTags->SubList(nPos) != nullptr)
                     {
                         m_pTempIter.reset(new sw::WrongListIterator(*pSmartTags->SubList(nPos)));
                         static_cast<SwTextPaintInfo*>(pInf)->SetSmartTags(m_pTempIter.get());
@@ -1789,7 +1789,7 @@ SwTextSlot::SwTextSlot(
                 {
                     const sal_uInt16 nPos = pGrammar->GetWrongPos(pos.second);
                     const sal_Int32 nListPos = pGrammar->Pos(nPos);
-                    if (nListPos == pos.second)
+                    if (nListPos == pos.second && pGrammar->SubList(nPos) != nullptr)
                     {
                         m_pTempIter.reset(new sw::WrongListIterator(*pGrammar->SubList(nPos)));
                         static_cast<SwTextPaintInfo*>(pInf)->SetGrammarCheckList(m_pTempIter.get());


More information about the Libreoffice-commits mailing list