diff options
Diffstat (limited to 'ext/opcache/zend_persist.c')
-rw-r--r-- | ext/opcache/zend_persist.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c index 139bac438b..e5aad26133 100644 --- a/ext/opcache/zend_persist.c +++ b/ext/opcache/zend_persist.c @@ -210,6 +210,9 @@ static void zend_persist_zval(zval *z) if (new_ptr) { Z_ARR_P(z) = new_ptr; Z_TYPE_FLAGS_P(z) = 0; + } else if (!ZCG(current_persistent_script)->corrupted + && zend_accel_in_shm(Z_ARR_P(z))) { + /* pass */ } else { Bucket *p; @@ -237,7 +240,8 @@ static void zend_persist_zval(zval *z) if (new_ptr) { Z_AST_P(z) = new_ptr; Z_TYPE_FLAGS_P(z) = 0; - } else if (!zend_accel_in_shm(Z_AST_P(z))) { + } else if (ZCG(current_persistent_script)->corrupted + || !zend_accel_in_shm(Z_AST_P(z))) { zend_ast_ref *old_ref = Z_AST_P(z); Z_AST_P(z) = zend_shared_memdup_put(Z_AST_P(z), sizeof(zend_ast_ref)); zend_persist_ast(GC_AST(old_ref)); @@ -260,7 +264,8 @@ static HashTable *zend_persist_attributes(HashTable *attributes) uint32_t i; zval *v; - if (zend_accel_in_shm(attributes)) { + if (!ZCG(current_persistent_script)->corrupted + && zend_accel_in_shm(attributes)) { return attributes; } @@ -792,6 +797,9 @@ static void zend_persist_class_constant(zval *zv) if (c) { Z_PTR_P(zv) = c; return; + } else if (!ZCG(current_persistent_script)->corrupted + && zend_accel_in_shm(Z_PTR_P(zv))) { + return; } c = Z_PTR_P(zv) = zend_shared_memdup_put(Z_PTR_P(zv), sizeof(zend_class_constant)); zend_persist_zval(&c->value); |