Skip to content

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Oct 21, 2024

num_args > 0 implies that arg_info != NULL. We explicitly assert that during compilation and execution to make it easier for developers to not miss this[1].

[1] #16266

`num_args > 0` implies that `arg_info != NULL`.  We explicitly assert
that during compilation and execution to make it easier for developers
to not miss this[1].

[1] <php#16266>
Copy link
Member

@dstogov dstogov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks OK.

On the other hand termination because of assertion is only slightly better than the crash because of NULL dereference. Both cases need to be caught in debugger to identify the buggy function.

@cmb69 cmb69 merged commit 91e6f26 into php:master Oct 25, 2024
10 checks passed
@cmb69 cmb69 deleted the cmb/num_args-arg_info branch October 25, 2024 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants