[Webkit-unassigned] [Bug 91579] New: Decimal constructor with 99999999999999999 loses last digit

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 17 22:06:24 PDT 2012


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

           Summary: Decimal constructor with 99999999999999999 loses last
                    digit
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Platform
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: yosin at chromium.org


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;
        }
    }
  ...
}

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list