Fix NAN expression errors that clang plugin reports on Windows

RESOLVED FIXED in Firefox 53

Status

()

Core
Rewriting and Analysis
RESOLVED FIXED
11 months ago
11 months ago

People

(Reporter: ting, Assigned: ting)

Tracking

Trunk
mozilla53
Unspecified
Windows
Points:
---

Firefox Tracking Flags

(firefox53 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment, 1 obsolete attachment)

Comment hidden (empty)
Created attachment 8817352 [details]
wip
The error message:

68:07.96 c:/w/fx/mc/gfx/angle/src/libANGLE/State.cpp(505,39):  error(clang): comparing a floating point value to itself for NaN checking can lead to incorrect results
68:07.99     mRasterizer.polygonOffsetFactor = factor != factor ? 0.0f : factor;
68:08.01                                       ^
68:08.01 c:/w/fx/mc/gfx/angle/src/libANGLE/State.cpp(505,39):  note(clang): consider using mozilla::IsNaN instead
68:08.01 c:/w/fx/mc/gfx/angle/src/libANGLE/State.cpp(506,38):  error(clang): comparing a floating point value to itself for NaN checking can lead to incorrect results
68:08.03     mRasterizer.polygonOffsetUnits = units != units ? 0.0f : units;
68:08.04                                      ^
68:08.04 c:/w/fx/mc/gfx/angle/src/libANGLE/State.cpp(506,38):  note(clang): consider using mozilla::IsNaN instead
68:08.04 2 errors generated.
Comment hidden (mozreview-request)
Attachment #8817352 - Attachment is obsolete: true

Comment 4

11 months ago
mozreview-review
Comment on attachment 8817376 [details]
Bug 1322462 - Ignore the is-NAN testings in libANGLE that clang plugin reports on Windows.

https://reviewboard.mozilla.org/r/97672/#review98032
Attachment #8817376 - Flags: review?(ehsan) → review+

Comment 5

11 months ago
angle is third-party code, right?  So we shouldn't be modifying it?
Flags: needinfo?(ehsan)

Comment 6

11 months ago
Yeah... I mean, we _could_, but the angle people are terrible at taking patches.  I have had patches waiting for their review for months, and every time I need to hunt down a gfx person who's in touch with them to get them to look at my patch.  It's not worth it here IMO.

(The SkScalar.h header is also there for similar reasons.)
Flags: needinfo?(ehsan)

Comment 7

11 months ago
Pushed by tchou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4ee89b6c76d7
Ignore the is-NAN testings in libANGLE that clang plugin reports on Windows. r=Ehsan
Assignee: nobody → janus926

Comment 8

11 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/4ee89b6c76d7
Status: NEW → RESOLVED
Last Resolved: 11 months ago
status-firefox53: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.