com php-src: zend_get_call_op ignoring compiler fla gs zend_get_call_op will ignore ZEND_COMPILE_ IGNORE_USER_FUNCTIONS and ZEND_COMPILE_IGNORE_USE
R_FUNCTIONS, breaking the intention of these fl ags: UPGRADING.INTERNALS Zend/zend_compile.c

From: Date: Thu, 21 Feb 2019 10:22:30 +0000
Subject: com php-src: zend_get_call_op ignoring compiler fla gs zend_get_call_op will ignore ZEND_COMPILE_ IGNORE_USER_FUNCTIONS and ZEND_COMPILE_IGNORE_USE
R_FUNCTIONS, breaking the intention of these fl ags: UPGRADING.INTERNALS Zend/zend_compile.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-104797@lists.php.net to get a copy of this message
Commit: 46807ec5da23d399873d9a1fcf4b73b7a783d23b Author: Joe Watkins <krakjoe@php.net> Thu, 21 Feb 2019 08:53:28 +0100 Parents: e3d502f4de8f54b2d3a31704f0e6cb9bc0ebd623 Branches: PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=46807ec5da23d399873d9a1fcf4b73b7a783d23b Log: zend_get_call_op ignoring compiler flags zend_get_call_op will ignore ZEND_COMPILE_IGNORE_USER_FUNCTIONS and ZEND_COMPILE_IGNORE_USER_FUNCTIONS, breaking the intention of these flags Changed paths: M UPGRADING.INTERNALS M Zend/zend_compile.c Diff: diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 5786371..fa02216 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -17,6 +17,7 @@ PHP 7.4 INTERNALS UPGRADE NOTES n. Assignments to references o. ZEND_COMPILE_EXTENDED_INFO split p. ZEND_EXT_FCALL_BEGIN can access arguments + q. ZEND_COMPILE_IGNORE_USER_FUNCTIONS and ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS 2. Build system changes a. Abstract @@ -178,6 +179,11 @@ PHP 7.4 INTERNALS UPGRADE NOTES p. ZEND_EXT_BEGIN_FCALL is emitted after arguments are sent, this means that handlers may access arguments. + q. ZEND_COMPILE_IGNORE_USER_FUNCTIONS and ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS + are respected by zend_get_call_op such that when set, the only possible + call opcodes are ZEND_DO_FCALL and ZEND_DO_FCALL_BY_NAME, previously they + were ignored by zend_get_call_op. + ======================== 2. Build system changes ======================== diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 1f6449f..eee2347 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -3044,7 +3044,7 @@ uint32_t zend_compile_args(zend_ast *ast, zend_function *fbc) /* {{{ */ ZEND_API zend_uchar zend_get_call_op(const zend_op *init_op, zend_function *fbc) /* {{{ */ { if (fbc) { - if (fbc->type == ZEND_INTERNAL_FUNCTION) { + if (fbc->type == ZEND_INTERNAL_FUNCTION && !(CG(compiler_options) & ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS)) { if (init_op->opcode == ZEND_INIT_FCALL && !zend_execute_internal) { if (!(fbc->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED|ZEND_ACC_HAS_TYPE_HINTS|ZEND_ACC_RETURN_REFERENCE))) { return ZEND_DO_ICALL; @@ -3052,7 +3052,7 @@ ZEND_API zend_uchar zend_get_call_op(const zend_op *init_op, zend_function *fbc) return ZEND_DO_FCALL_BY_NAME; } } - } else { + } else if (!(CG(compiler_options) & ZEND_COMPILE_IGNORE_USER_FUNCTIONS)){ if (zend_execute_ex == execute_ex && !(fbc->common.fn_flags & ZEND_ACC_ABSTRACT)) { return ZEND_DO_UCALL; }

« previous php.cvs (#104797) next »