1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Add non-NULL assertion to zend_get_gc_buffer_add_obj() (#17671)

This would've saved me time when fixing the nightly failure in Laravel [1].

[1] e306a2e0
This commit is contained in:
Niels Dossche
2025-02-02 19:09:53 +01:00
committed by GitHub
parent 5f7a9ee97e
commit 50ed7b58bf

View File

@@ -134,6 +134,8 @@ static zend_always_inline void zend_get_gc_buffer_add_zval(
static zend_always_inline void zend_get_gc_buffer_add_obj(
zend_get_gc_buffer *gc_buffer, zend_object *obj) {
ZEND_ASSERT(obj != NULL);
if (UNEXPECTED(gc_buffer->cur == gc_buffer->end)) {
zend_get_gc_buffer_grow(gc_buffer);
}