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

Insufficient test coverage: tests fail to detect overflow in Properties::cases table

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 6.10.0 Beta3

      While implementing QTBUG-2163, I tried to make room for a condition in the Properties::cases struct by reducing the diff member to 12 bits. The compiler warned that this is too small:

      qunicodetables.cpp:10834:1: warning: overflow in conversion from ‘short int’ to ‘short int:12’ changes value from ‘7264’ to ‘-928’ [-Woverflow]
      qunicodetables.cpp:10834:1: warning: overflow in conversion from ‘short int’ to ‘short int:12’ changes value from ‘7264’ to ‘-928’ [-Woverflow]
      qunicodetables.cpp:10834:1: warning: overflow in conversion from ‘short int’ to ‘short int:12’ changes value from ‘7264’ to ‘-928’ [-Woverflow]
      qunicodetables.cpp:10834:1: warning: overflow in conversion from ‘short int’ to ‘short int:12’ changes value from ‘-6254’ to ‘1938’ [-Woverflow]
      ~~~~
      

      But none of the tests I ran failed:

      • tst_QUnicodeTools
      • tst_QString
      • tst_QTextBoundaryFinder
      • tst_QLocale

      I think tst_QUnicodeTools should read the files in util/unicode/data and do a full conformance check.

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

            Eddy Edward Welbourne
            mmutz Marc Mutz
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes