1
0
mirror of https://github.com/php/php-src.git synced 2026-04-15 20:11:02 +02:00

Fixed assertion (ext/opcache/zend_persist.c:327: zend_accel_get_type_map_ptr: Assertion `ret > 2' failed)

This commit is contained in:
Dmitry Stogov
2021-03-10 17:39:26 +03:00
parent d336ccaa08
commit d02197853e

View File

@@ -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;