Skip to content

Commit

Permalink
Fixed assertion (ext/opcache/zend_persist.c:327: zend_accel_get_type_…
Browse files Browse the repository at this point in the history
…map_ptr: Assertion `ret > 2' failed)
  • Loading branch information
dstogov committed Mar 10, 2021
1 parent d336cca commit d021978
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ext/opcache/zend_persist.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d021978

Please sign in to comment.