https://bugs.kde.org/show_bug.cgi?id=524024

            Bug ID: 524024
           Summary: SIGABRT when trying to open a large file from the TM
                    Tab
    Classification: Applications
           Product: lokalize
      Version First unspecified
       Reported In:
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: glossary
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected], [email protected]
  Target Milestone: ---

DESCRIPTION
The editor tab works correctly even with enormous (260 000 entries!) PO files.
Trying to access the PO entries from the TM Tab does not work for large files
like this, resulting in a crash probably from an integer overflow.

STEPS TO REPRODUCE
1. Turn a ~40MB PO file into a TM database (I don't know at what size the
indexing error starts to occur, but it appears with my 40MB file)
2. Search for anything (even empty string) in the TM Tab, searching the large
database
3. Open a result in the editor tab, by clicking on a result in the database
entries list (I think the actual entry index in the PO file was ~220 so the
index of the translation unit itself is probably not the issue)

OBSERVED RESULT
Probably an integer overflow, judging by the printout below:

(gdb) frame 10
#10 0x00005555557d2dcf in GettextCatalog::GettextStorage::isApproved
(this=0x555559d4ef90, pos=...) at
/home/user/kde/src/lokalize/src/catalog/gettext/gettextstorage.cpp:408
408         return !m_entries.at(pos.entry).isFuzzy();
(gdb) print pos.entry
$1 = -32768
(gdb) print pos
$2 = (const DocPosition &) @0x7fffffffc470: {entry = -32768, part =
DocPosition::Target, form = 0 '\000', offset = 0}


Backtrace:

(gdb) bt
#0  __pthread_kill_implementation (threadid=<optimized out>,
signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007ffff3e9a0e3 in __pthread_kill_internal (threadid=<optimized out>,
signo=6) at pthread_kill.c:89
#2  0x00007ffff3e3e5d0 in __GI_raise (sig=sig@entry=6) at
../sysdeps/posix/raise.c:26
#3  0x00007ffff3e25685 in __GI_abort () at abort.c:77
#4  0x00007ffff46968e4 in qAbort () at
/usr/src/debug/qt6-base/qtbase/src/corelib/global/qassert.cpp:47
#5  qt_maybe_message_fatal<QString&> (msgType=QtFatalMsg, context=<optimized
out>, message=...) at
/usr/src/debug/qt6-base/qtbase/src/corelib/global/qlogging.cpp:2170
#6  qt_message(QtMsgType, const QMessageLogContext &, const char *, typedef
__va_list_tag __va_list_tag *)
    (msgType=msgType@entry=QtFatalMsg, context=...,
msg=msg@entry=0x7ffff4ad0c40 "ASSERT failure in %s: \"%s\", file %s, line %d",
ap=ap@entry=0x7fffffffc198)
    at /usr/src/debug/qt6-base/qtbase/src/corelib/global/qlogging.cpp:413
#7  0x00007ffff469771d in QMessageLogger::fatal (this=<optimized out>,
msg=0x7ffff4ad0c40 "ASSERT failure in %s: \"%s\", file %s, line %d")
    at /usr/src/debug/qt6-base/qtbase/src/corelib/global/qlogging.cpp:902
#8  0x00007ffff4694bc3 in qt_assert_x (where=<optimized out>, what=<optimized
out>, file=<optimized out>, line=<optimized out>)
    at /usr/src/debug/qt6-base/qtbase/src/corelib/global/qassert.cpp:127
#9  0x00005555557d477c in QList<GettextCatalog::CatalogItem>::at
(this=0x555559d4efe8, i=-32768) at /usr/include/qt6/QtCore/qlist.h:513
#10 0x00005555557d2dcf in GettextCatalog::GettextStorage::isApproved
(this=0x555559d4ef90, pos=...) at
/home/user/kde/src/lokalize/src/catalog/gettext/gettextstorage.cpp:408
#11 0x00005555557a5d69 in Catalog::isApproved (this=0x555559d80ff0,
index=4294934528) at /home/user/kde/src/lokalize/src/catalog/catalog.cpp:414
#12 0x000055555560c2ef in EditorTab::siblingIndex (this=0x555559dada00,
state=Fuzzy, step=Down) at /home/user/kde/src/lokalize/src/editortab.cpp:2058
#13 0x00005555556054dd in EditorTab::gotoEntry (this=0x555559dada00, pos=...,
selection=0) at /home/user/kde/src/lokalize/src/editortab.cpp:1166
#14 0x0000555555605320 in EditorTab::gotoEntry (this=0x555559dada00, pos=...)
at /home/user/kde/src/lokalize/src/editortab.cpp:1130
#15 0x0000555555608dc4 in EditorTab::findEntryBySourceContext
(this=0x555559dada00, source=..., ctxt=...) at
/home/user/kde/src/lokalize/src/editortab.cpp:1670
#16 0x00005555555d0a4b in LokalizeMainWindow::fileOpen (this=0x555555b0bf00,
filePath=..., source=..., ctxt=..., setAsActive=true)
    at /home/user/kde/src/lokalize/src/lokalizemainwindow.cpp:526

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to