com php-src: Fixed possible assertion/crash when PHP script can't be stored in SHM (e.g. because another process already did this):
ext/opcache/zend_accelerator_util_funcs.c
| From: | Dmitry Stogov | Date: | Wed, 11 Jul 2018 07:35:36 +0000 |
| Subject: | com php-src: Fixed possible assertion/crash when PHP script can't be stored in SHM (e.g. because another process already did this): ext/opcache/zend_accelerator_util_funcs.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-102517@lists.php.net to get a copy of this message | ||
Commit: 956ac5cbf5fa74a4a2f25896e449540b04fd7f10
Author: Dmitry Stogov <dmitry@zend.com> Wed, 11 Jul 2018 10:35:36 +0300
Parents: 2aff1cb2267297aa683bd53d9da97e81fb7ca34a
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=956ac5cbf5fa74a4a2f25896e449540b04fd7f10
Log:
Fixed possible assertion/crash when PHP script can't be stored in SHM (e.g. because another
process already did this)
Changed paths:
M ext/opcache/zend_accelerator_util_funcs.c
Diff:
diff --git a/ext/opcache/zend_accelerator_util_funcs.c b/ext/opcache/zend_accelerator_util_funcs.c
index 05708a7..d1e9b55 100644
--- a/ext/opcache/zend_accelerator_util_funcs.c
+++ b/ext/opcache/zend_accelerator_util_funcs.c
@@ -581,7 +581,7 @@ static void zend_accel_class_hash_copy(HashTable *target, HashTable *source)
p = source->arData;
end = p + source->nNumUsed;
for (; p != end; p++) {
- ZEND_ASSERT(Z_TYPE(p->val) != IS_UNDEF);
+ if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue;
ZEND_ASSERT(p->key);
t = zend_hash_find_ex(target, p->key, 1);
if (UNEXPECTED(t != NULL)) {