Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.7
-
None
-
-
ba75e7770 (dev), 3340b82ee (6.7)
Description
When testing tst_QPainter::fpe_radialGradients() on VxWorks i.MX6 ARM board we see FE_INVALID error.
However, this doesn't look like VxWorks specific issue.
This is caused by sqrt calculated from negative number.
The problem is in class RadialFetchPlain which works like that:
- it knows how many steps to perform to fill whole buffer
- each step it changes value of "det" variable
- it needs sqrt(det)
Looks like in some specific case "det" has value "-0.00000" (very small negative number) because each step it is coming down closer to 0.0 and in last step it exceeds 0.0.
This scenario is already handled in upper half of the class, but not in bottom half.
Solution is to use similar "if (det >= 0)" case in second case.