Bug #72458 [Opn->Csd]: Crash in call_user_function_ex when callback target object has a constant
Edit report at https://bugs.php.net/bug.php?id=72458&edit=1
ID: 72458
User updated by: emilkm at gmail dot com
Reported by: emilkm at gmail dot com
Summary: Crash in call_user_function_ex when callback target
object has a constant
-Status: Open
+Status: Closed
Type: Bug
Package: Reproducible crash
Operating System: Windows
PHP Version: 7.0.8RC1
Block user comment: N
Private report: N
New Comment:
Sincere apologies, I am pleased to say that was a false alarm.
I was running the PHP script through NuSphere PHP DBG. Crash occurs only while debugging the PHP
script.
Previous Comments:
------------------------------------------------------------------------
[2016-06-22 04:56:39] emilkm at gmail dot com
Confirmed it works as expected on Linux. Tested on Fedora 23.
------------------------------------------------------------------------
[2016-06-21 00:37:42] oldbucsfan at hotmail dot com
Related to but 72359? https://bugs.php.net/bug.php?id=72359
------------------------------------------------------------------------
[2016-06-20 11:13:54] emilkm at gmail dot com
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 this bug report at https://bugs.php.net/bug.php?id=72458&edit=1
Thread (4 messages)