From 956ac5cbf5fa74a4a2f25896e449540b04fd7f10 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 11 Jul 2018 10:35:36 +0300 Subject: [PATCH] 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/opcache/zend_accelerator_util_funcs.c b/ext/opcache/zend_accelerator_util_funcs.c index 05708a7068..d1e9b5571c 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)) { -- 2.40.0