com php-src: Fixed bug #67215 (php-cgi work with opcache, may be segmentation fault happen): NEWS ext/opcache/zend_accelerator _util_funcs.c
| From: | Xinchen Hui | Date: | Thu, 03 Jul 2014 06:58:37 +0000 |
| Subject: | com php-src: Fixed bug #67215 (php-cgi work with opcache, may be segmentation fault happen): NEWS ext/opcache/zend_accelerator _util_funcs.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-79221@lists.php.net to get a copy of this message | ||
Commit: 2034ace0526657cbed0fafc3d77b1baa6604ae9e
Author: Xinchen Hui <laruence@php.net> Thu, 3 Jul 2014 14:58:37 +0800
Parents: 533b1df7325673bf8159263379579d2142f57877
Branches: PHP-5.5 PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2034ace0526657cbed0fafc3d77b1baa6604ae9e
Log:
Fixed bug #67215 (php-cgi work with opcache, may be segmentation fault happen)
Bugs:
https://bugs.php.net/67215
Changed paths:
M NEWS
M ext/opcache/zend_accelerator_util_funcs.c
Diff:
diff --git a/NEWS b/NEWS
index ca7ca7b..89bb30a 100644
--- a/NEWS
+++ b/NEWS
@@ -18,7 +18,11 @@ PHP NEWS
(Adam)
- FPM:
- . Fix bug #67531 (syslog cannot be set in pool configuration). (Remi)
+ . Fixed bug #67531 (syslog cannot be set in pool configuration). (Remi)
+
+- OPCache:
+ . Fixed bug #67215 (php-cgi work with opcache, may be segmentation fault
+ happen) (Dmitry, Laruence)
- pgsql:
. Fix bug #67550 (Error in code "form" instead of "from", pgsql.c, line 756),
diff --git a/ext/opcache/zend_accelerator_util_funcs.c b/ext/opcache/zend_accelerator_util_funcs.c
index 14c6f74..dbab902 100644
--- a/ext/opcache/zend_accelerator_util_funcs.c
+++ b/ext/opcache/zend_accelerator_util_funcs.c
@@ -837,16 +837,11 @@ static int zend_hash_unique_copy(HashTable *target, HashTable *source,
unique_co
if (p->nKeyLength > 0 && p->arKey[0] == 0) {
/* Mangled key */
#if ZEND_EXTENSION_API_NO >= PHP_5_3_X_API_NO
- if (((zend_function*)p->pData)->common.fn_flags & ZEND_ACC_CLOSURE) {
- /* update closure */
- if (zend_hash_quick_update(target, p->arKey, p->nKeyLength, p->h, p->pData, size,
&t) == SUCCESS) {
- if (pCopyConstructor) {
- pCopyConstructor(t);
- }
+ if (zend_hash_quick_update(target, p->arKey, p->nKeyLength, p->h, p->pData, size,
&t) == SUCCESS) {
+ if (pCopyConstructor) {
+ pCopyConstructor(t);
}
- } else {
- /* ignore and wait for runtime */
- }
+ }
#endif
} else if (!ignore_dups && zend_hash_quick_find(target, p->arKey, p->nKeyLength,
p->h, &t) == SUCCESS) {
*fail_data = p->pData;