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

QSqlQuery: crash on executing query if connection is already closed

    XMLWordPrintable

Details

    • 78eac57f3d (qt/qtbase/dev) 78eac57f3d (qt/tqtc-qtbase/dev) 7042c1c5f8 (qt/qtbase/6.2) 7042c1c5f8 (qt/tqtc-qtbase/6.2) ba926780d1 (qt/qtbase/6.3) ba926780d1 (qt/tqtc-qtbase/6.3) ee386d9265 (qt/tqtc-qtbase/5.15) ba926780d1 (qt/tqtc-qtbase/6.3.0)

    Description

      QSqlQuery crashes if exec is called after the database connection is down. Looks like the QSqlQuery::driver() value ends up as nullptr but the checks for it are missing in the exec function.

      Steps to reproduce the crash:

      1. Run the attached example

      Attachments

        For Gerrit Dashboard: QTBUG-100037
        # Subject Branch Project Status CR V

        Activity

          People

            Eddy Edward Welbourne
            miikapernu Miika Pernu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes