summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2015-06-20 09:18:00 +0200
committerAnatol Belski <ab@php.net>2015-06-20 09:35:01 +0200
commitf88aad418e4e6fcc91d048446f0892a3ee5b065f (patch)
tree5a332f7dd7d57edd3b2e4e47b2bf24ea543af784
parentf75308eda1b432ddf3d81e5378eceebf44658ffb (diff)
downloadphp-git-f88aad418e4e6fcc91d048446f0892a3ee5b065f.tar.gz
Fix bug #69838 OPCACHE Warning Internal error: wrong size calculation
This chunk is pre calculated with aligned size, so should it use it at run time.
-rw-r--r--ext/opcache/zend_persist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c
index 09eebe0d02..af8936f104 100644
--- a/ext/opcache/zend_persist.c
+++ b/ext/opcache/zend_persist.c
@@ -94,7 +94,7 @@ static void zend_hash_persist(HashTable *ht, zend_persist_func_t pPersistElement
}
ht->nTableMask = -hash_size;
HT_SET_DATA_ADDR(ht, ZCG(mem));
- ZCG(mem) = (void*)((char*)ZCG(mem) + (hash_size * sizeof(uint32_t)) + (ht->nNumUsed * sizeof(Bucket)));
+ ZCG(mem) = (void*)((char*)ZCG(mem) + ZEND_ALIGNED_SIZE((hash_size * sizeof(uint32_t)) + (ht->nNumUsed * sizeof(Bucket))));
HT_HASH_RESET(ht);
memcpy(ht->arData, old_buckets, ht->nNumUsed * sizeof(Bucket));
efree(old_data);