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

QVariant is miscompiled if -Ofast, -ffast-math or friends are in the compiler flags

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 5.15.2
    • Core: Other
    • None
    • All

    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

      Attachments

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

        Activity

          People

            bero Bernhard Rosenkränzer
            bero Bernhard Rosenkränzer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes