Re: com php-src: assert won't cause indrect var access if it's disabled: ext/opcache/Optimizer/zend_cfg.c

From: Date: Fri, 27 May 2016 17:51:55 +0000
Subject: Re: com php-src: assert won't cause indrect var access if it's disabled: ext/opcache/Optimizer/zend_cfg.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-92221@lists.php.net to get a copy of this message
On Fri, May 27, 2016 at 7:48 PM, Xinchen Hui <laruence@php.net> wrote: > Commit: 27f40676e6f506f353ad8d679dd9b21aa87b828e > Author: Xinchen Hui <laruence@gmail.com> Fri, 27 May 2016 > 10:48:36 -0700 > Parents: da511f255ac8e86284bdff6d7bc78d0b5c9b001f > Branches: master > > Link: > > http://git.php.net/?p=php-src.git;a=commitdiff;h=27f40676e6f506f353ad8d679dd9b21aa87b828e > > Log: > assert won't cause indrect var access if it's disabled > > Changed paths: > M ext/opcache/Optimizer/zend_cfg.c > > > Diff: > diff --git a/ext/opcache/Optimizer/zend_cfg.c > b/ext/opcache/Optimizer/zend_cfg.c > index 9701f58..a4403a0 100644 > --- a/ext/opcache/Optimizer/zend_cfg.c > +++ b/ext/opcache/Optimizer/zend_cfg.c > @@ -331,7 +331,7 @@ int zend_build_cfg(zend_arena **arena, const > zend_op_array *op_array, uint32_t b > flags |= > ZEND_FUNC_INDIRECT_VAR_ACCESS; > } else if > (zend_string_equals_literal(Z_STR_P(zv), "get_defined_vars")) { > flags |= > ZEND_FUNC_INDIRECT_VAR_ACCESS; > - } else if > (zend_string_equals_literal(Z_STR_P(zv), "assert")) { > + } else if (EG(assertions) > >= 0 && zend_string_equals_literal(Z_STR_P(zv), "assert")) { > flags |= > ZEND_FUNC_INDIRECT_VAR_ACCESS; > } else if > (zend_string_equals_literal(Z_STR_P(zv), "func_num_args")) { > flags |= > ZEND_FUNC_VARARG; > > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > If it's disabled as assertions=-1, it shouldn't generate any assert() call in the first place, right? Nikita

« previous php.cvs (#92221) next »