Skip to content

Commit 21df2e4

Browse files
committed
Fix opcache
1 parent c659f9e commit 21df2e4

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

Zend/Optimizer/zend_inference.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3486,7 +3486,7 @@ static zend_always_inline int _zend_update_type_info(
34863486
break;
34873487
case ZEND_FETCH_CONSTANT:
34883488
case ZEND_FETCH_CLASS_CONSTANT:
3489-
UPDATE_SSA_TYPE(MAY_BE_RC1|MAY_BE_RCN|MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_STRING|MAY_BE_RESOURCE|MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY, ssa_op->result_def);
3489+
UPDATE_SSA_TYPE(MAY_BE_RC1|MAY_BE_RCN|MAY_BE_ANY|MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY, ssa_op->result_def);
34903490
break;
34913491
case ZEND_STRLEN:
34923492
tmp = MAY_BE_LONG;

Zend/zend_API.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,6 +1644,7 @@ static zend_always_inline zend_result _object_and_properties_init(zval *arg, zen
16441644
return SUCCESS;
16451645
}
16461646
} else {
1647+
ZEND_ASSERT(!EG(exception));
16471648
ZVAL_OBJ(arg, class_type->create_object(class_type));
16481649
if (EXPECTED(!EG(exception))) {
16491650
return SUCCESS;

Zend/zend_execute_API.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,11 +320,13 @@ void shutdown_executor(void) /* {{{ */
320320

321321
if (ZEND_MAP_PTR(ce->mutable_data) && ZEND_MAP_PTR_GET_IMM(ce->mutable_data)) {
322322
zend_cleanup_mutable_class_data(ce);
323-
} else {
323+
} else if (!(ce->ce_flags & ZEND_ACC_IMMUTABLE)) {
324324
zend_class_constant *c;
325325
ZEND_HASH_FOREACH_PTR(&ce->constants_table, c) {
326-
zval_ptr_dtor(&c->value);
327-
ZVAL_UNDEF(&c->value);
326+
if (c->ce == ce) {
327+
zval_ptr_dtor(&c->value);
328+
ZVAL_UNDEF(&c->value);
329+
}
328330
} ZEND_HASH_FOREACH_END();
329331
}
330332

0 commit comments

Comments
 (0)