From: hak at cooper dot edu Operating system: Linux 2.4 PHP version: 4CVS-2003-03-17 (stable) PHP Bug Type: Reproducible crash Bug description: size_t unsigned error causes endless loop
Diffing between 4.3.1 and Mar 13 STABLE it appears you are already working on this bug. In network.c: php_sockop_write, you had previously declared didwrite as size_t, which is unsigned on some OS (e.g. Linux). Therefore, an error in the send system call was not detected. The STABLE release changes didwrite to an int but in streams.c:_php_stream_write, the return value still gets assigned into size_t justwrote, and therefore you get stuck in an endless loop because the check justwrote>0 i.e. (unsigned)0xFFFFFFFF>0 is true. Fix is to either change justwrote to an int, or to add the following to the end of sockop_write: return didwrite<0?0:didwrite; -- Edit bug report at http://bugs.php.net/?id=22753&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22753&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22753&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22753&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22753&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22753&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=22753&r=support Expected behavior: http://bugs.php.net/fix.php?id=22753&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=22753&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=22753&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22753&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22753&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22753&r=dst IIS Stability: http://bugs.php.net/fix.php?id=22753&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=22753&r=gnused