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

valgrind issue due to 9 bits in flags

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 6.4.1, 6.5.0 Beta1
    • 6.4.0
    • GUI: Painting
    • None
    • All
    • 273b13dbd1 (qt/qtbase/dev) 273b13dbd1 (qt/tqtc-qtbase/dev) 51881862eb (qt/qtbase/6.4) 51881862eb (qt/tqtc-qtbase/6.4) 51881862eb (qt/tqtc-qtbase/6.4.1) 51881862eb (qt/tqtc-qtbase/tqtc/qtinsight-6.4)

    Description

      A flag was added to the QRasterPaintEngineState flags field.

      Now the compiler will need to touch on init 9 bits, leading later to stuff like

      ==454== Conditional jump or move depends on uninitialised value(s)
      ==454==    at 0x5ED2385: QRasterPaintEngine::renderHintsChanged() (in 
      
      ==454==  Uninitialised value was created by a heap allocation
      ==454==    at 0x402D7BD: malloc (vg_replace_malloc.c:381)
      ==454==    by 0x40829F9: operator new(unsigned long)
      ==454==    by 0x5ED1343: QRasterPaintEngine::createState(QPainterState*) const (
      

      With 6.3 this was no issue as we had 8 flags and the full byte was initially filled.

      I assume the easy fix would be to assign first 0 to the flag_bits to once fill the full area with some initialized data.

      Naturally only the flags will be used in the later code and this is no real error, but it is an avoidable valgrind error people will start to see in all their Qt based code.

      Attachments

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

        Activity

          People

            vgt Eirik Aavitsland
            cullmann Christoph Cullmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes