ID: 44981
User updated by: mabouzou at sybase dot com
Reported By: mabouzou at sybase dot com
Status: Open
Bug Type: Reproducible crash
Operating System: Linux and Windows
PHP Version: 5.2.6
New Comment:
I forgot to mention that the extension library has to define at least
one function in the zend_function_entry table.
Also, if the library is loaded from the ini file directly the crash
does not happen.
Previous Comments:
------------------------------------------------------------------------
[2008-05-13 13:57:47] mabouzou at sybase dot com
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 this bug report at http://bugs.php.net/?id=44981&edit=1