mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Fix delayed early binding with optimization
It's possible for delayed early binding opcodes to get optimized away if they are "unreachable". However, we still need to attempt early binding for them. (In some cases we also corrupt the early binding list outright during optimization, which is how I got here.) Fix this by storing information about delayed early binding independently of DECLARE_CLASS_DELAYED opcodes, so early binding is performed even after the opcode has been dropped.
This commit is contained in:
parent
fb296cf0ba
commit
c19977d054
17 changed files with 212 additions and 115 deletions
|
@ -3029,7 +3029,7 @@ static zend_always_inline bool register_early_bound_ce(zval *delayed_early_bindi
|
|||
return zend_hash_add_ptr(CG(class_table), lcname, ce) != NULL;
|
||||
}
|
||||
|
||||
zend_class_entry *zend_try_early_bind(zend_class_entry *ce, zend_class_entry *parent_ce, zend_string *lcname, zval *delayed_early_binding) /* {{{ */
|
||||
ZEND_API zend_class_entry *zend_try_early_bind(zend_class_entry *ce, zend_class_entry *parent_ce, zend_string *lcname, zval *delayed_early_binding) /* {{{ */
|
||||
{
|
||||
inheritance_status status;
|
||||
zend_class_entry *proto = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue