From: Dmitry Stogov Date: Wed, 10 Mar 2021 14:39:26 +0000 (+0300) Subject: Fixed assertion (ext/opcache/zend_persist.c:327: zend_accel_get_type_map_ptr: Asserti... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d02197853e5c2f01acd0986e2b496f502c4fe462;p=php Fixed assertion (ext/opcache/zend_persist.c:327: zend_accel_get_type_map_ptr: Assertion `ret > 2' failed) --- diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c index 19bc1ce7ad..1fb7281721 100644 --- a/ext/opcache/zend_persist.c +++ b/ext/opcache/zend_persist.c @@ -323,8 +323,9 @@ uint32_t zend_accel_get_type_map_ptr(zend_string *type_name, zend_class_entry *s /* We use type.name.gc.refcount to keep map_ptr of corresponding type */ if (ret <= 2) { - ret = (uint32_t)(uintptr_t)zend_map_ptr_new(); - ZEND_ASSERT(ret > 2); + do { + ret = (uint32_t)(uintptr_t)zend_map_ptr_new(); + } while (ret <= 2); GC_SET_REFCOUNT(type_name, ret); } return ret;