Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
6.4.0
-
None
-
-
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
For Gerrit Dashboard: QTBUG-107649 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
438335,2 | Initialize flag memory in raster paint engine to avoid valgrind warning | dev | qt/qtbase | Status: MERGED | +2 | 0 |
439979,2 | Initialize flag memory in raster paint engine to avoid valgrind warning | 6.4 | qt/qtbase | Status: MERGED | +2 | 0 |