Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
5.15.2
-
None
Description
If Qt is built with -Ofast, -ffast-math or other "risky" compiler flags, QVariant gets subtly miscompiled (-ffast-math implies -ffinite-math-only, resulting in NaN not being there, resulting in QVariant thinking anything fed into it could be a floating point number).
This behavior is not immediately visible, but causes "funny" issues like kmail not displaying HTML messages or plasma-systemmonitor's UI being broken.
While this is not strictly a Qt bug, it would be nice to catch this with an addition like
#ifdef _FAST_MATH_
#error Don't compile QVariant with -ffast-math, it needs NaN
#endif