[Webkit-unassigned] [Bug 170961] New: r211670 broke double to int conversion.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Apr 18 12:12:45 PDT 2017
https://bugs.webkit.org/show_bug.cgi?id=170961
Bug ID: 170961
Summary: r211670 broke double to int conversion.
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: mark.lam at apple.com
This is because operationToInt32SensibleSlow() assumes that left shifts of greater than 31 bits on an 31-bit value will produce a 0. However, the spec says that "if the value of the right operand is negative or is greater or equal to the number of bits in the promoted left operand, the behavior is undefined." See http://en.cppreference.com/w/cpp/language/operator_arithmetic#Bitwise_shift_operators.
This patch fixes this by restoring the check to prevent a shift of greater than 31 bits.
It also consolidates the optimization in operationToInt32SensibleSlow() back into toInt32() so that we don't have 2 copies of the same code with only a slight variation.
--
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/20170418/f0fe2856/attachment.html>
More information about the webkit-unassigned
mailing list