[Libreoffice-bugs] [Bug 51954] gsicheck segfault

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Jul 13 22:50:33 CEST 2012


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

--- Comment #6 from Stephan Bergmann <sbergman at redhat.com> 2012-07-13 13:50:33 PDT ---
(In reply to comment #4)
> 1. assertion failed when processing dgo.sdf
> timar at timar-corei7:~/LibO36l10n/aaa> 
> /home/timar/libreoffice-master/solver/unxlngx6.pro/bin/gsicheck -c -wef
> dgo1.err dgo.sdf > dgo1.log
> gsicheck:
> /home/timar/libreoffice-master/solver/unxlngx6.pro/inc/rtl/string.hxx:1038:
> rtl::OString rtl::OString::copy(sal_Int32, sal_Int32) const: Assertion
> `beginIndex >= 0 && beginIndex <= getLength() && count >= 0 &&
> sal::static_int_cast<sal_uInt32>(count) <=
> sal::static_int_cast<sal_uInt32>(getLength() - beginIndex)' failed.
> Aborted

This is fixed now, see comment 5.

> 3. log file format changed - it tries to gives more information of the errors
> now, for example:
[...]
> This is OK. Maybe it would be enough to print the text field only, other info
> is redundant or not important, and we will find position of error easier.
> However, many times it does not print the whole sdf line, e.g.:

I would assume this is due to changes like (GSIBlock::PrintList in
l10ntools/source/gsicheck.cxx) from

  aContext = pLine->Copy( pMsg->GetTagBegin()-150, 300 );

to

  aContext = helper::abbreviate( pLine->data_, pMsg->GetTagBegin()-150, 300 );

where the code's intent apparently always was to produce just an abbreviated
part of the line, 150 characters to the left and right of pMsg->GetTagBegin(). 
However, for the old, tools String based code, where xub_StrLen is sal_uInt16
(i.e., unsigned), if pMsg->GetTagBegin()-150 < 0 (i.e., wrap-around to some
very large value > pLine->Len()), then the Copy would silently produce an empty
string (while the new, rtl::OUString based code's copy resulted in assertions
that have been fixed with the introduction of helper::abbreviate).

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Libreoffice-bugs mailing list