From: su1d at phpclub dot net Operating system: Win32 PHP version: 5CVS-2005-03-31 (dev) PHP Bug Type: Reproducible crash Bug description: apache2handler accidental crashes caused by SPL
Description: ------------ OS: Windows XP Pro (SP1, Eng) PHP: 5.1-dev Apache: 2.0.53 When PHP is installed as Apache's module, the web server sometimes segfaults accidentally. The call stack backtrace is the following: php5ts.dll!_estrdup(const char * s=0x00d4b8d8) Line 400 + 0xf bytes C php5ts.dll!zm_activate_spl(int type=11, int module_number=18392672, void * * * tsrm_ls=0x00d4b8a8) Line 510 + 0x19 bytes C php5ts.dll!module_registry_request_startup(_zend_module_entry * module=0x0118a660, void * * * tsrm_ls=0x0533fe10) Line 1543 + 0x10 bytes C php5ts.dll!zend_hash_apply(_hashtable * ht=0x007061c0, int (void *, void * * *)* apply_func=0x0118a660, void * * * tsrm_ls=0x007d9f0a) Line 664 + 0x7 bytes C php5ts.dll!zend_activate_modules(void * * * tsrm_ls=0x0118a660) Line 793 + 0x14 bytes C php5ts.dll!php_request_startup(void * * * tsrm_ls=0x0118a660) Line 1058 C php5apache2.dll!php_handler(request_rec * r=0x0065ef40) Line 534 + 0x8 bytes C [...] Obviously, the crash occurs directly in Zend/zend_alloc.c:400 inside of the function _estrdup() which is in turn called from ext/spl/php_spl.c:510. That seems to be a Windows specific behaviour, so a tiny patch is being proposed to fix the problem. The patch could be downloaded from http://tmp.e-taller.net/php_spl.c-win32.patch Reproduce code: --------------- Any PHP application, i.e. entering to phpMyAdmin always leads to a crash. Expected result: ---------------- no segfaults Actual result: -------------- *oops* -- Edit bug report at http://bugs.php.net/?id=32521&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32521&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32521&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32521&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=32521&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=32521&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=32521&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=32521&r=needscript Try newer version: http://bugs.php.net/fix.php?id=32521&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=32521&r=support Expected behavior: http://bugs.php.net/fix.php?id=32521&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=32521&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=32521&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=32521&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32521&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=32521&r=dst IIS Stability: http://bugs.php.net/fix.php?id=32521&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=32521&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=32521&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=32521&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=32521&r=mysqlcfg
