https://bugs.freedesktop.org/show_bug.cgi?id=76795

--- Comment #4 from Julien Nabet <[email protected]> ---
this patch:
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index f48a961..4db8499 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -2392,6 +2392,8 @@ public:
                 // the next cell in the next iteration.
                 size_t nOffsetToLast = pCell->GetSharedLength() - 1;
                 std::advance(it, nOffsetToLast);
+                if (it == itEnd)
+                    break;
             }
         }
     }

brings another crash:
/usr/include/c++/4.8/debug/safe_iterator.h:360:error: attempt to advance a 
    dereferenceable iterator 7 steps, which falls outside its valid range.

Objects involved in the operation:
iterator @ 0x0x7fffffff2020 {
type =
N11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPP13ScFormulaCellNSt9__cxx19986vectorIS4_SaIS4_EEEEENSt7__debug6vectorIS4_S8_EEEE
(mutable iterator);
  state = dereferenceable;
  references sequence with type `NSt7__debug6vectorIP13ScFormulaCellSaIS2_EEE'
@ 0x0x7fffffff2020
}

Program received signal SIGABRT, Aborted.
0x00002aaaab2893a9 in __GI_raise (sig=sig@entry=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:56
56    ../nptl/sysdeps/unix/sysv/linux/raise.c: Aucun fichier ou dossier de ce
type.
(gdb) bt
#0  0x00002aaaab2893a9 in __GI_raise (sig=sig@entry=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00002aaaab28c4c8 in __GI_abort () at abort.c:89
#2  0x00002aaaabcd5815 in __gnu_debug::_Error_formatter::_M_error() const ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00002aaac828b77a in
__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<ScFormulaCell**,
std::__cxx1998::vector<ScFormulaCell*, std::allocator<ScFormulaCell*> > >,
std::__debug::vector<ScFormulaCell*, std::allocator<ScFormulaCell*> >
>::operator+= (this=0x7fffffff2020, __n=@0x7fffffff1f70: 7)
    at /usr/include/c++/4.8/debug/safe_iterator.h:358
#4  0x00002aaac82a18ea in
std::__advance<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<ScFormulaCell**,
std::__cxx1998::vector<ScFormulaCell*, std::allocator<ScFormulaCell*> > >,
std::__debug::vector<ScFormulaCell*, std::allocator<ScFormulaCell*> > >, long>
(__i=..., __n=7) at /usr/include/c++/4.8/bits/stl_iterator_base_funcs.h:156
#5  0x00002aaac83903c9 in
std::advance<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<ScFormulaCell**,
std::__cxx1998::vector<ScFormulaCell*, std::allocator<ScFormulaCell*> > >,
std::__debug::vector<ScFormulaCell*, std::allocator<ScFormulaCell*> > >, int>
(__i=..., __n=7) at /usr/include/c++/4.8/bits/stl_iterator_base_funcs.h:177
#6  0x00002aaac8816022 in sc::SharedFormulaUtil::splitFormulaCellGroup
(aPos=...) at
/home/julien/compile-libreoffice/libo/sc/source/core/tool/sharedformula.cxx:71
#7  0x00002aaac88163a2 in sc::SharedFormulaUtil::splitFormulaCellGroups
(rCells=..., rBounds=...)
    at
/home/julien/compile-libreoffice/libo/sc/source/core/tool/sharedformula.cxx:95
#8  0x00002aaac82bd6b5 in ScColumn::UpdateReference (this=0x2aaada0265b0,
rCxt=..., pUndoDoc=0x0) at
/home/julien/compile-libreoffice/libo/sc/source/core/data/column.cxx:2758
#9  0x00002aaac86089da in ScTable::UpdateReference (this=0x2aaada026010,
rCxt=..., pUndoDoc=0x0, bIncludeDraw=false, bUpdateNoteCaptionPos=true)
    at
/home/julien/compile-libreoffice/libo/sc/source/core/data/table1.cxx:1493
#10 0x00002aaac8412a5d in ScDocument::UpdateReference (this=0x1ac5f18,
rCxt=..., pUndoDoc=0x0, bIncludeDraw=false, bUpdateNoteCaptionPos=true)
    at
/home/julien/compile-libreoffice/libo/sc/source/core/data/documen3.cxx:1042
#11 0x00002aaac844c1dc in ScDocument::InsertRow (this=0x1ac5f18, nStartCol=0,
nStartTab=0, nEndCol=1023, nEndTab=0, nStartRow=33, nSize=1, pRefUndoDoc=0x0,
pTabMark=0x0)
    at
/home/julien/compile-libreoffice/libo/sc/source/core/data/document.cxx:1253

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to