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

qvariant autotest fails in 'void tst_QVariant::numericalConvert()' (memory corruption?)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • None
    • 4.6.3
    • Testing: qtestlib
    • None
    • ARM

    Description

      When running qvariant autotest in ARM environment it fails in 'void tst_QVariant::numericalConvert()':

      When 'i' reaches 3 then 'num' should be set to 5 but it doesn't, causing comparisons to fail.

      --------------------------------
      for(int i = 0; i < vect.size(); i++) {
      double num = 5.3;
      if (i >= 3 && i <= 7)
      num = 5;

      QVariant *v = vect.at;
      QCOMPARE(v->toFloat() , float(num));
      ---------------------------------

      If I change

      if (i >= 3 && i <= 7)
      num = 5;

      to

      if (i >= 3)
      if (i <= 7)
      num = 5;

      or comment out QCOMPARE lines then 'num' is set to 5 correctly.

      Attachments

        Issue Links

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

          Activity

            People

              goffart Olivier Goffart (closed Nokia identity) (Inactive)
              rspriha Raino Priha
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes