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

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

XMLWordPrintable

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

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes