From:             ab
Operating system: Windows 64 Bit
PHP version:      5.5Git-2013-08-20 (Git)
Package:          MySQLi related
Bug Type:         Bug
Bug description:mysqli_poll() is broken on win x64

Description:
------------
mysqli_poll() in user space invokes _mysqlnd_poll(). In that function 
php_select()  
is used for polling. The windows implementation works with int for
descriptors, 
however php_socket_t data type is used in mysqli. This has two flaws

- generally on windows, php_socket_t is a typedef from SOCKET and is
unsigned, 
that means any usual UNIX socket checks want work, say checking if
descriptor is 
negative

- on 64 bit windows this is a breach, because SOCKET there is unsigned 64
bit 
integer while php_select() implementation still uses 32 bit integers. 
php_select()  
internally calls select(), which on windows expects an 32 bit integer as 
descriptor as well.

As result mysqli_poll* function family is broken on 64 bit Windows.


-- 
Edit bug report at https://bugs.php.net/bug.php?id=65486&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=65486&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=65486&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=65486&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=65486&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=65486&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=65486&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=65486&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=65486&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=65486&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=65486&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=65486&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=65486&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=65486&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65486&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=65486&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=65486&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=65486&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65486&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=65486&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=65486&r=mysqlcfg

Reply via email to