[Webkit-unassigned] [Bug 224835] Fix handling of overflow of /= and *= operators with double over Checked<uint64_t> and other 64-bit types.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Apr 24 10:30:11 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=224835
Darin Adler <darin at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|webkit-unassigned at lists.web |darin at apple.com
|kit.org |
--- Comment #6 from Darin Adler <darin at apple.com> ---
I suggest we use this code that selects either double or long double based on the size of the integer.
std::conditional<sizeof(m_value) <= 4, double, long double>::type result = rhs;
result *= m_value;
Note the importance of converting rhs to long double *before* doing the multiplication. I’m grabbing this bug and will fix it.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210424/0f67d63f/attachment.htm>
More information about the webkit-unassigned
mailing list