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;
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));
uint32_t i;
zval *v;
- if (zend_accel_in_shm(attributes)) {
+ if (!ZCG(current_persistent_script)->corrupted
+ && zend_accel_in_shm(attributes)) {
return attributes;
}
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);
}
break;
case IS_ARRAY:
+ if (!ZCG(current_persistent_script)->corrupted
+ && zend_accel_in_shm(Z_ARR_P(z))) {
+ return;
+ }
size = zend_shared_memdup_size(Z_ARR_P(z), sizeof(zend_array));
if (size) {
Bucket *p;
}
break;
case IS_CONSTANT_AST:
- if (!zend_accel_in_shm(Z_AST_P(z))) {
+ if (ZCG(current_persistent_script)->corrupted
+ || !zend_accel_in_shm(Z_AST_P(z))) {
size = zend_shared_memdup_size(Z_AST_P(z), sizeof(zend_ast_ref));
if (size) {
ADD_SIZE(size);
static void zend_persist_attributes_calc(HashTable *attributes)
{
if (!zend_shared_alloc_get_xlat_entry(attributes)
- && !zend_accel_in_shm(attributes)) {
+ && (ZCG(current_persistent_script)->corrupted
+ || !zend_accel_in_shm(attributes))) {
zend_attribute *attr;
uint32_t i;
zend_class_constant *c = Z_PTR_P(zv);
if (!zend_shared_alloc_get_xlat_entry(c)) {
+ if (!ZCG(current_persistent_script)->corrupted
+ && zend_accel_in_shm(Z_PTR_P(zv))) {
+ return;
+ }
zend_shared_alloc_register_xlat_entry(c, c);
ADD_SIZE(sizeof(zend_class_constant));
zend_persist_zval_calc(&c->value);