Skip to content

Commit c07640d

Browse files
committed
Also ensure shm separation with preloading
1 parent 2d18803 commit c07640d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: ext/opcache/ZendAccelerator.c

+5
Original file line numberDiff line numberDiff line change
@@ -3800,6 +3800,11 @@ static bool preload_try_resolve_constants(zend_class_entry *ce)
38003800
ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(&ce->constants_table, key, c) {
38013801
val = &c->value;
38023802
if (Z_TYPE_P(val) == IS_CONSTANT_AST) {
3803+
/* For deprecated constants, we need to flag the zval for recursion
3804+
* detection. Make sure the zval is separated out of shm. */
3805+
if (ZEND_CLASS_CONST_FLAGS(c) & ZEND_ACC_DEPRECATED) {
3806+
ok = true;
3807+
}
38033808
if (EXPECTED(zend_update_class_constant(c, key, c->ce) == SUCCESS)) {
38043809
was_changed = changed = true;
38053810
} else {

0 commit comments

Comments
 (0)