com php-src: Fix bug #69838 OPCACHE Warning Internal error: wrong size calculation: ext/opcache/zend_persist.c

From: Date: Sat, 20 Jun 2015 07:35:01 +0000
Subject: com php-src: Fix bug #69838 OPCACHE Warning Internal error: wrong size calculation: ext/opcache/zend_persist.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-87398@lists.php.net to get a copy of this message
Commit: f88aad418e4e6fcc91d048446f0892a3ee5b065f Author: Anatol Belski <ab@php.net> Sat, 20 Jun 2015 09:18:00 +0200 Parents: f75308eda1b432ddf3d81e5378eceebf44658ffb Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f88aad418e4e6fcc91d048446f0892a3ee5b065f Log: 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. Bugs: https://bugs.php.net/69838 Changed paths: M ext/opcache/zend_persist.c Diff: diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c index 09eebe0..af8936f 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);

« previous php.cvs (#87398) next »