[Webkit-unassigned] [Bug 29956] New: Math.random() gives too low values on Win32 when _CRT_RAND_S is not defined

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 1 02:40:26 PDT 2009


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

           Summary: Math.random() gives too low values on Win32 when
                    _CRT_RAND_S is not defined
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Windows 7
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: jonni.rainisto at nokia.com


Windows rand() gives 15bit random number (with MSVC and MinGW), if you build
webkit with MinGW or with MSVC (without _CRT_RAND_S define) then code execution
goes to #else where they assume that rand() returns 31bits. 

In that case calling javascript Math.random() always gives values in range of
0.0000xxx and not [0,1]. I will attach patch where this is fixed.

-- 
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