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

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

    XMLWordPrintable

Details

    • All
    • fcde9f13d (dev), 7cf49085e (dev), 79e3416bb (6.9), 6a0a181a1 (6.8)

    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

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes