PHP-7 zend_call_function() doesn't support symbol_table substitution

This commit is contained in:
Dmitry Stogov 2016-03-02 16:56:39 +03:00
parent b6bbe33f05
commit 908b662f7f
2 changed files with 5 additions and 1 deletions

View File

@ -851,6 +851,9 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
ZEND_ADD_CALL_FLAG(call, ZEND_CALL_CLOSURE); ZEND_ADD_CALL_FLAG(call, ZEND_CALL_CLOSURE);
} }
/* PHP-7 doesn't support symbol_table substitution for functions */
ZEND_ASSERT(fci->symbol_table == NULL);
if (func->type == ZEND_USER_FUNCTION) { if (func->type == ZEND_USER_FUNCTION) {
int call_via_handler = (func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) != 0; int call_via_handler = (func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) != 0;
EG(scope) = func->common.scope; EG(scope) = func->common.scope;

View File

@ -121,7 +121,8 @@ static inline int phpdbg_call_register(phpdbg_param_t *stack) /* {{{ */
ZVAL_STRINGL(&fci.function_name, lc_name, name->len); ZVAL_STRINGL(&fci.function_name, lc_name, name->len);
fci.size = sizeof(zend_fcall_info); fci.size = sizeof(zend_fcall_info);
fci.function_table = &PHPDBG_G(registered); fci.function_table = &PHPDBG_G(registered);
fci.symbol_table = zend_rebuild_symbol_table(); //???fci.symbol_table = zend_rebuild_symbol_table();
fci.symbol_table = NULL;
fci.object = NULL; fci.object = NULL;
fci.retval = &fretval; fci.retval = &fretval;
fci.no_separation = 1; fci.no_separation = 1;