[Libreoffice] crash in escherex.cxx in master

Markus Mohrhard markus.mohrhard at googlemail.com
Tue Jun 21 10:52:03 PDT 2011


I did a debug build. And I had some stl debug symbols in my backtrace so it
might be that perhaps the compiler won't optimize this out.

I attached the backtrace.

print it shows: it = {<__gnu_debug::_Safe_iterator_base> = {_M_sequence =
0x29e3678, _M_version = 0, _M_prior = 0x0, _M_next = 0x0}, _M_current =
{_M_current = 0x2a27bf0}}

and print maPersistTable:
$2 = {<std::__norm::vector<EscherPersistEntry*,
std::allocator<EscherPersistEntry*> >> =
{<std::__norm::_Vector_base<EscherPersistEntry*,
std::allocator<EscherPersistEntry*> >> = {_M_impl =
{<std::allocator<EscherPersistEntry*>> =
    {<__gnu_cxx::new_allocator<EscherPersistEntry*>> = {<No data fields>},
<No data fields>}, _M_start = 0x2a27bc8, _M_finish = 0x2a27bf0,
_M_end_of_storage =
    0x2a27c08}}, <No data fields>},
<__gnu_debug::_Safe_sequence<std::__debug::vector<EscherPersistEntry*,
std::allocator<EscherPersistEntry*> > >> =
{<__gnu_debug::_Safe_sequence_base> = {_M_iterators = 0x7fff356e1120,
      _M_const_iterators = 0x0, _M_version = 5}, <No data fields>},
_M_guaranteed_capacity = 6}


2011/6/21 Noel Power <nopower at novell.com>

> On 21/06/11 15:17, Markus Mohrhard wrote:
>
>> Hello Noel, all,
>>
>> I have attached a test document and a diff. I don't understand why this
>> still crashs calc even if there is nothing anymore that can create any
>> problems.
>>
> well it doesn't crash for me ( even worse it doesn't crash without the
> patch either ) and even worse still valgrind doesn't even complain. Welll we
> know that erase invalidates vector iterators so I don't see a problem with
> your patch ( or doubt it's validity ) but still interested in reproducing at
> least this problem. Is there something else I need to do?
>
> Noel
>
> probably though I would just do the following rather than saving the
> iterator and doing the delete and erase outside the loop
>
>    if ( (*it)->mnID == nID )
>
>   {
>       delete *it;
>       maPersistTable.erase( it );
>       break;
>   }
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110621/f85fa5f1/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: backtrace.log
Type: text/x-log
Size: 2846 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110621/f85fa5f1/attachment.bin>


More information about the LibreOffice mailing list