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

QVariant::toInt() asserts if the contained real number exceeds integer limits

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 6.10
    • None
    • All

    Description

      With the new asserts in qRound(), and so on, QVariant::toInt() may crash with the following backtrace now

      #13 0x00007f4e6f659954 in qRound64 (d=inf) at /data/projects/kde/src/qt6/qtbase/src/corelib/global/qnumeric.h:565
      #14 0x00007f4e6f649e5b in convert (this=0x7f4e6fead200 <metatypeHelper>, from=0x7ffdf2182e68, fromTypeId=6, to=0x7ffdf2182df0, toTypeId=2)
          at /data/projects/kde/src/qt6/qtbase/src/corelib/kernel/qmetatype.cpp:1141
      #15 0x00007f4e6f656bd3 in QMetaType::convert (fromType=..., from=0x7ffdf2182e68, toType=..., to=0x7ffdf2182df0)
          at /data/projects/kde/src/qt6/qtbase/src/corelib/kernel/qmetatype.cpp:2398
      #16 0x00007f4e6f6e808c in qNumVariantToHelper<int> (d=..., ok=0x0) at /data/projects/kde/src/qt6/qtbase/src/corelib/kernel/qvariant.cpp:1848
      #17 0x00007f4e6f6e10af in QVariant::toInt (this=0x7ffdf2182e68, ok=0x0) at /data/projects/kde/src/qt6/qtbase/src/corelib/kernel/qvariant.cpp:1873
      #18 0x00007f4e75dfb6bd in PlasmaQuick::ConfigViewPrivate::updateMaximumWidth (this=0x5f507ddcdd80)

      The attached application shows a way to trigger the assert.

      Attachments

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

        Activity

          People

            peppe Giuseppe D'Angelo
            zzag Vlad Zahorodnii
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change