Tinderbox failure, Linux-RHEL6-x86_64 at 14-with-check, MASTER, last success: 2012-02-08 09:52:51

Lionel Elie Mamane lionel at mamane.lu
Wed Feb 8 17:29:30 PST 2012


On Wed, Feb 08, 2012 at 09:56:09PM +0100, Stephan Bergmann wrote:

> Lionel, can you please have a look whether <http://cgit.freedesktop.org/libreoffice/core/commit/?id=23151ab53574e0e893f4507313ff15388638746a>
> "Tentative fix for invalid iterator range regression" is actually
> good?

On Wed, Feb 08, 2012 at 09:08:20PM +0000, Caolán McNamara wrote:
> since 37b5dce665a03d3404e6a710b82bef16d740d178
> I've a crash in ::std::rotate(m_pMatrix->begin(), aEnd, aNewEnd); in the
> smoketest (make dev-install)

I'm terribly sorry; I fixed it in my build and then... I forgot to
push :-(

I reverted Stephan's tentative fix, which was papering over the deeper
issue (see below).

> ORowSetMatrix::iterator aEnd (m_pMatrix->begin() + nOverlapSize);
> ORowSetMatrix::iterator aNewEnd (aEnd + nStartPosOffset);

> I've got a negative nStartPosOffset

Yes, that's exactly the problem. The definition of nStartPosOffset was
inverted:

if ( nNewStartPos < m_nStartPos )
{   // need to fill data *before* m_nStartPos
  if ( nNewEndPos > m_nStartPos )
  {   // The two regions are overlapping.
     (...)
     const sal_Int32 nStartPosOffset = nNewStartPos - m_nStartPos; // by how much m_nStartPos moves
     (...)
  }
}

As the first if condition clearly shows, the positive value is
m_nStartPos - nNewStartPos, not the opposite.

> so std::rotate's middle is after its end. Not entirely sure what
> we're aiming for here, so I decided to leave it until tomorrow :-)

-- 
Lionel


More information about the LibreOffice mailing list