From: mabouzou at sybase dot com Operating system: Linux and Windows PHP version: 5.2.6 PHP Bug Type: Reproducible crash Bug description: PHP crashes if php script contains a function declaration and dl() fails
Description: ------------ PHP would crash while executing the attached code. The code basically declares a function and attempts to load an extension using the dl() command. If the extension returns FAILURE in the MINIT function, PHP will crash. Reproduce code: --------------- <?php function foo() { echo "Inside foo.\n"; } dl( 'my_extension.dll' ); ?> Expected result: ---------------- Inside foo. <... something along the lines of ... cannot load extension my_extension.dll ... > Actual result: -------------- A crash. Here is the stack trace: php5ts.dll!destroy_op_array(_zend_op_array * op_array=0x011c9720, void * * * tsrm_ls=0x00375d20) Line 228 + 0x3 bytes C php5ts.dll!zend_function_dtor(_zend_function * function=0x0139df68) Line 123 + 0x16 bytes C php5ts.dll!zend_hash_destroy(_hashtable * ht=0x00373328) Line 526 + 0x6 bytes C php5ts.dll!compiler_globals_dtor(_zend_compiler_globals * compiler_globals=0x00377398, void * * * tsrm_ls=0x00375d20) Line 487 C php5ts.dll!tsrm_shutdown() Line 180 + 0x6 bytes C php.exe!main(int argc=0x00000002, char * * argv=0x00375c48) Line 1342 C php.exe!__tmainCRTStartup() Line 597 + 0x17 bytes C [EMAIL PROTECTED]() + 0x23 bytes -- Edit bug report at http://bugs.php.net/?id=44981&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44981&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44981&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44981&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44981&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44981&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44981&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=44981&r=needscript Try newer version: http://bugs.php.net/fix.php?id=44981&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44981&r=support Expected behavior: http://bugs.php.net/fix.php?id=44981&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44981&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44981&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44981&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44981&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44981&r=dst IIS Stability: http://bugs.php.net/fix.php?id=44981&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44981&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44981&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44981&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=44981&r=mysqlcfg