mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
Fix op2 caching for static properties
op2.num may contain other flags, like ZEND_FETCH_CLASS_EXCEPTION. These currently circumvent caching. Once the property is cached, these flags have no influence on the result, so it doesn't seem like this was done on purpose. Closes GH-16380
This commit is contained in:
parent
60562175ed
commit
67318e91bc
@ -3615,8 +3615,8 @@ static zend_always_inline zend_result zend_fetch_static_property_address(zval **
|
||||
if (opline->op1_type == IS_CONST
|
||||
&& (opline->op2_type == IS_CONST
|
||||
|| (opline->op2_type == IS_UNUSED
|
||||
&& (opline->op2.num == ZEND_FETCH_CLASS_SELF
|
||||
|| opline->op2.num == ZEND_FETCH_CLASS_PARENT)))
|
||||
&& ((opline->op2.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF
|
||||
|| (opline->op2.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT)))
|
||||
&& EXPECTED(CACHED_PTR(cache_slot) != NULL)) {
|
||||
*retval = CACHED_PTR(cache_slot + sizeof(void *));
|
||||
property_info = CACHED_PTR(cache_slot + sizeof(void *) * 2);
|
||||
|
Loading…
Reference in New Issue
Block a user