com php-src: Fixed bug #69688 (segfault with eval and opcache fast shutdown): NEWS ext/opcache/ZendAccelerator.c

From: Date: Fri, 22 May 2015 03:48:13 +0000
Subject: com php-src: Fixed bug #69688 (segfault with eval and opcache fast shutdown): NEWS ext/opcache/ZendAccelerator.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-86867@lists.php.net to get a copy of this message
Commit: 8c0ba65d6a4d1a1908990096bbe2d15a8b65e660 Author: Xinchen Hui <laruence@php.net> Fri, 22 May 2015 11:48:13 +0800 Parents: ed4052f1d5309cc974b134c2b78724d727ef9349 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8c0ba65d6a4d1a1908990096bbe2d15a8b65e660 Log: Fixed bug #69688 (segfault with eval and opcache fast shutdown) Bugs: https://bugs.php.net/69688 Changed paths: M NEWS M ext/opcache/ZendAccelerator.c Diff: diff --git a/NEWS b/NEWS index 162cdf9..e1d67ee 100644 --- a/NEWS +++ b/NEWS @@ -143,6 +143,8 @@ . Removed mcrypt_ecb(), mcrypt_cbc(), mcrypt_cfb(), mcrypt_ofb(). (Nikita) - Opcache: + . Fixed bug #69688 (segfault with eval and opcache fast shutdown). + (Laruence) . Added experimental (disabled by default) file based opcode cache. (Dmitry, Laruence, Anatol) . Fixed bug with try blocks being removed when extended_info opcode diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index c9f5896..3668421 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -2146,7 +2146,6 @@ static inline void zend_accel_fast_del_bucket(HashTable *ht, uint32_t idx, Bucke uint32_t nIndex = p->h | ht->nTableMask; uint32_t i = HT_HASH(ht, nIndex); - ht->nNumUsed--; ht->nNumOfElements--; if (idx != i) { Bucket *prev = HT_HASH_TO_BUCKET(ht, i); @@ -2267,6 +2266,9 @@ static void zend_accel_fast_shutdown(void) zend_accel_fast_del_bucket(EG(zend_constants), HT_IDX_TO_HASH(_idx-1), _p); } } ZEND_HASH_FOREACH_END(); + EG(function_table)->nNumUsed = EG(function_table)->nNumOfElements; + EG(class_table)->nNumUsed = EG(class_table)->nNumOfElements; + EG(zend_constants)->nNumUsed = EG(zend_constants)->nNumOfElements; CG(unclean_shutdown) = 1; }

« previous php.cvs (#86867) next »