Skip to content

Commit d021978

Browse files
committed
Fixed assertion (ext/opcache/zend_persist.c:327: zend_accel_get_type_map_ptr: Assertion `ret > 2' failed)
1 parent d336cca commit d021978

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ext/opcache/zend_persist.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,9 @@ uint32_t zend_accel_get_type_map_ptr(zend_string *type_name, zend_class_entry *s
323323

324324
/* We use type.name.gc.refcount to keep map_ptr of corresponding type */
325325
if (ret <= 2) {
326-
ret = (uint32_t)(uintptr_t)zend_map_ptr_new();
327-
ZEND_ASSERT(ret > 2);
326+
do {
327+
ret = (uint32_t)(uintptr_t)zend_map_ptr_new();
328+
} while (ret <= 2);
328329
GC_SET_REFCOUNT(type_name, ret);
329330
}
330331
return ret;

0 commit comments

Comments
 (0)