Skip to content

Commit

Permalink
Assert that call to method always has called scope or object
Browse files Browse the repository at this point in the history
  • Loading branch information
nikic committed Jul 23, 2021
1 parent 921e105 commit 8befb6d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Zend/zend_execute.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ static zend_always_inline zend_vm_stack zend_vm_stack_new_page(size_t size, zend

static zend_always_inline void zend_vm_init_call_frame(zend_execute_data *call, uint32_t call_info, zend_function *func, uint32_t num_args, void *object_or_called_scope)
{
ZEND_ASSERT(!func->common.scope || object_or_called_scope);
call->func = func;
Z_PTR(call->This) = object_or_called_scope;
ZEND_CALL_INFO(call) = call_info;
Expand Down

0 comments on commit 8befb6d

Please sign in to comment.