Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-67492

Simple SQLite3 query was fault with sqlite

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.11.0 Beta 3
    • 5.10.1
    • SQL Support
    • None

    Description

      Same segfault:

      QSqlQuery q( db );
      q.prepare("SELECT scenario, args FROM ShowInfo WHERE type = 'Button' AND name = :name");
      q.bindValue(":name", trigId);
      q.exec();

       

      #0  0x00007ffff67009b0 in QVariant::QVariant(QVariant const&) () from /usr/lib/libQt5Core.so.5 
      #1  0x00007ffff00bc2cc in ?? () from /usr/lib/qt/plugins/sqldrivers/libqsqlite.so 
      #2  0x00007ffff00b9ae6 in ?? () from /usr/lib/qt/plugins/sqldrivers/libqsqlite.so 
      #3  0x00007ffff6b37938 in QSqlQuery::exec() () from /usr/lib/libQt5Sql.so.5

       
      Qt - 5.10.1
      Sqlite3 - 3.22.0

      Valgrind says

      ==1865== Invalid read of size 4
      ==1865==    at 0xD55BAD1: ??? (in /usr/lib/qt/plugins/sqldrivers/libqsqlite.so)
      ==1865==    by 0x5EB2937: QSqlQuery::exec() (in /usr/lib/libQt5Sql.so.5.10.1)
      

      Segfault was happen when query is't success: for example table is not exists in db

      Same bug: https://bugreports.qt.io/browse/QTBUG-65487

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            andysh Andy Shaw
            zvova7890 Vova
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes