Skip to content

Commit

Permalink
Add non-NULL assertion to zend_get_gc_buffer_add_obj() (#17671)
Browse files Browse the repository at this point in the history
This would've saved me time when fixing the nightly failure in Laravel [1].

[1] e306a2e
  • Loading branch information
nielsdos authored Feb 2, 2025
1 parent 5f7a9ee commit 50ed7b5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Zend/zend_gc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 50ed7b5

Please sign in to comment.