select() implementation uses outdated tick API

Bug #65268 select() implementation uses outdated tick API
Submitted: 2013-07-16 10:40 UTC Modified: 2013-07-16 10:40 UTC
From: ab@php.net Assigned: ab (profile)
Status: Closed Package: Streams related
PHP Version: 5.5Git-2013-07-16 (Git) OS: windows
Private report: No CVE-ID: None

 [2013-07-16 10:40 UTC] ab@php.net

Description:
------------
The implementation of php_select() in win32/select.c uses outdated function Get 
TickCount. From the documentation page http://msdn.microsoft.com/en-
us/library/ms724408(v=vs.85).aspx

"The elapsed time is stored as a DWORD value. Therefore, the time will wrap around 
to zero if the system is run continuously for 49.7 days. To avoid this problem, 
use the GetTickCount64 function. Otherwise, check for an overflow condition when 
comparing times."

This can be an issue for long running php processes. As 5.5 has not to support 
windows xp anymore, and as the documentation suggests, GetTickCount64 should be 
used.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports

 [2013-07-16 10:40 UTC] ab@php.net

-Assigned To: +Assigned To: ab

 [2013-07-18 16:44 UTC] ab@php.net

-Status: Assigned +Status: Closed