mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Fix missing readonly modification error with inc/dec in JIT
Closes GH-10746
This commit is contained in:
parent
916b132ea0
commit
df93146a15
10 changed files with 236 additions and 0 deletions
|
@ -2655,6 +2655,13 @@ static ZEND_COLD zend_long _zend_jit_throw_dec_prop_error(zend_property_info *pr
|
|||
|
||||
static void ZEND_FASTCALL zend_jit_inc_typed_prop(zval *var_ptr, zend_property_info *prop_info)
|
||||
{
|
||||
ZEND_ASSERT(Z_TYPE_P(var_ptr) != IS_UNDEF);
|
||||
|
||||
if (UNEXPECTED((prop_info->flags & ZEND_ACC_READONLY))) {
|
||||
zend_readonly_property_modification_error(prop_info);
|
||||
return;
|
||||
}
|
||||
|
||||
zend_execute_data *execute_data = EG(current_execute_data);
|
||||
zval tmp;
|
||||
|
||||
|
@ -2678,6 +2685,13 @@ static void ZEND_FASTCALL zend_jit_inc_typed_prop(zval *var_ptr, zend_property_i
|
|||
|
||||
static void ZEND_FASTCALL zend_jit_dec_typed_prop(zval *var_ptr, zend_property_info *prop_info)
|
||||
{
|
||||
ZEND_ASSERT(Z_TYPE_P(var_ptr) != IS_UNDEF);
|
||||
|
||||
if (UNEXPECTED((prop_info->flags & ZEND_ACC_READONLY))) {
|
||||
zend_readonly_property_modification_error(prop_info);
|
||||
return;
|
||||
}
|
||||
|
||||
zend_execute_data *execute_data = EG(current_execute_data);
|
||||
zval tmp;
|
||||
|
||||
|
@ -2715,6 +2729,16 @@ static void ZEND_FASTCALL zend_jit_pre_dec_typed_prop(zval *var_ptr, zend_proper
|
|||
|
||||
static void ZEND_FASTCALL zend_jit_post_inc_typed_prop(zval *var_ptr, zend_property_info *prop_info, zval *result)
|
||||
{
|
||||
ZEND_ASSERT(Z_TYPE_P(var_ptr) != IS_UNDEF);
|
||||
|
||||
if (UNEXPECTED((prop_info->flags & ZEND_ACC_READONLY))) {
|
||||
zend_readonly_property_modification_error(prop_info);
|
||||
if (result) {
|
||||
ZVAL_UNDEF(result);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
zend_execute_data *execute_data = EG(current_execute_data);
|
||||
|
||||
ZVAL_DEREF(var_ptr);
|
||||
|
@ -2736,6 +2760,16 @@ static void ZEND_FASTCALL zend_jit_post_inc_typed_prop(zval *var_ptr, zend_prope
|
|||
|
||||
static void ZEND_FASTCALL zend_jit_post_dec_typed_prop(zval *var_ptr, zend_property_info *prop_info, zval *result)
|
||||
{
|
||||
ZEND_ASSERT(Z_TYPE_P(var_ptr) != IS_UNDEF);
|
||||
|
||||
if (UNEXPECTED((prop_info->flags & ZEND_ACC_READONLY))) {
|
||||
zend_readonly_property_modification_error(prop_info);
|
||||
if (result) {
|
||||
ZVAL_UNDEF(result);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
zend_execute_data *execute_data = EG(current_execute_data);
|
||||
|
||||
ZVAL_DEREF(var_ptr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue