There is a bug in Decimal::EncodedData constructor with maximum coefficient, 99999999999999999, in following line: Decimal::EncodedData::EncodedData(Sign sign, int exponent, uint64_t coefficient) { ... if (exponent >= ExponentMin && exponent <= ExponentMax) { while (coefficient >= MaxCoefficient) { // *** BUG, we should use ">" instead of ">=". coefficient /= 10; ++exponent; } } ... }
Created attachment 152918 [details] Patch 1
Comment on attachment 152918 [details] Patch 1 Could you review this patch? Thanks in advance.
Comment on attachment 152918 [details] Patch 1 looks ok
Comment on attachment 152918 [details] Patch 1 Clearing flags on attachment: 152918 Committed r122922: <http://trac.webkit.org/changeset/122922>
All reviewed patches have been landed. Closing bug.
This is fixing Platform code. Is that code used anywhere? An actual regression test would be vastly preferable to a unit test (which is not even cross-platform!)
(In reply to comment #6) > This is fixing Platform code. Is that code used anywhere? An actual regression test would be vastly preferable to a unit test (which is not even cross-platform!) The code is used in step-able input types, number, date, range, datetime, and so on. Although, it is hard to hit this case from HTML5/JavaScript, because the value is out of range of double. The purpose of fixing this is for test case (bug 91481) and that test case is supplement for LayoutTest.