[Webkit-unassigned] [Bug 160322] Undefined Behavior in JSValue cast from NaN

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 29 13:51:35 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=160322

--- Comment #7 from Mark Lam <mark.lam at apple.com> ---
Jonathan, I suspect the compiler would have folded away the int casted check at the top of JSValue(double) when we pass it a constant PNaN.  Hence, your patch is not necessarily a perf improvement after all.  Did you actually see the compiler actually generate code for this check?  If so, let's take this patch.  If not, we can let it go.

Regarding the general case, I see Keith's point.  In order for it to be an issue, a compiler would have to do more work to convert the int back to a double that matches NaN / Inf rather than just letting the CPU do its thing.  Hence, it's probably not an issue in practice and we can ignore it.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160729/85d011bf/attachment.html>


More information about the webkit-unassigned mailing list