Bug #72458 [NEW]: Crash in call_user_function_ex when callback target object has a constant

From: Date: Mon, 20 Jun 2016 11:13:56 +0000
Subject: Bug #72458 [NEW]: Crash in call_user_function_ex when callback target object has a constant
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-201746@lists.php.net to get a copy of this message
From: emilkm at gmail dot com Operating system: Windows PHP version: 7.0.8RC1 Package: Reproducible crash Bug Type: Bug Bug description:Crash in call_user_function_ex when callback target object has a constant Description: ------------ I am working on upgrading a custom extension to PHP 7. I struck a problem while using call_user_function_ex to call a target object method - when that object has a constant defined - and I pass parameters to the callback The call completes successfully if I comment out the constant, or do not pass any parameters. Tried in 7.0.6, 7.0.7, and 7.0.8RC1. Crash occurs in zend_llist_apply_with_argument Test script: --------------- https://github.com/emilkm/aext Expected result: ---------------- PHP code runs a custom extension function, the extension calls back the PHP method successfully passing two parameters. Actual result: -------------- dbg-php-7.0.dll!00007ffbeb3c129f() Unknown dbg-php-7.0.dll!00007ffbeb3c15a5() Unknown dbg-php-7.0.dll!00007ffbeb3c1e2a() Unknown > php7.dll!zend_llist_apply_with_argument(_zend_llist * l, void(*)(void *, void *) func, void * arg) Line 236 C dbg-php-7.0.dll!00007ffbeb3c37a4() Unknown dbg-php-7.0.dll!00007ffbeb3bc07e() Unknown dbg-php-7.0.dll!00007ffbeb3b8f99() Unknown dbg-php-7.0.dll!00007ffbeb3b916e() Unknown php7.dll!zend_extension_statement_handler(const _zend_extension * extension, _zend_op_array * op_array) Line 1491 C php7.dll!zend_llist_apply_with_argument(_zend_llist * l, void(*)(void *, void *) func, void * arg) Line 236 C php7.dll!ZEND_EXT_STMT_SPEC_HANDLER(_zend_execute_data * execute_data) Line 1301 C php7.dll!execute_ex(_zend_execute_data * ex) Line 417 C dbg-php-7.0.dll!00007ffbeb3b6dce() Unknown php7.dll!ZEND_DO_FCALL_SPEC_HANDLER(_zend_execute_data * execute_data) Line 802 C php7.dll!execute_ex(_zend_execute_data * ex) Line 417 C dbg-php-7.0.dll!00007ffbeb3b6dce() Unknown php7.dll!zend_execute(_zend_op_array * op_array, _zval_struct * return_value) Line 459 C php7.dll!zend_execute_scripts(int type, _zval_struct * retval, int file_count, ...) Line 1428 C php7.dll!php_execute_script(_zend_file_handle * primary_file) Line 2494 C php.exe!do_cli(int argc, char * * argv) Line 975 C php.exe!main(int argc, char * * argv) Line 1344 C php.exe!__scrt_common_main_seh() Line 264 C++ kernel32.dll!00007ffc091e8102() Unknown ntdll.dll!00007ffc09e5c5b4() Unknown -- Edit bug report at https://bugs.php.net/bug.php?id=72458&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72458&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72458&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72458&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=72458&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=72458&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=72458&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=72458&r=needscript Try newer version: https://bugs.php.net/fix.php?id=72458&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=72458&r=support Expected behavior: https://bugs.php.net/fix.php?id=72458&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=72458&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=72458&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=72458&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72458&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=72458&r=dst IIS Stability: https://bugs.php.net/fix.php?id=72458&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=72458&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=72458&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=72458&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=72458&r=mysqlcfg

« previous php.bugs (#201746) next »