-
Notifications
You must be signed in to change notification settings - Fork 8k
ext/pdo: Refactor function and class statement fetch modes to reduce memory requirements #17289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
/* Possible error message */ | ||
efree(is_callable_error); | ||
} | ||
ZEND_ASSERT(is_callable_error == NULL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really necessary? Shouldn't zend_fcall_info_init
report failure reliably?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The point is that there shouldn't be an error message to free if zend_fcall_info_init
has failed.
This just adds an assertion that this indeed can never be the case.
} | ||
return false; | ||
} | ||
zval_ptr_dtor(&retval_constructor_call); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this doesn't need the Z_ISUNDEF
check anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IS_UNDEF only happens if there is an exception that is thrown by the constructor.
Actually the thing that is pointless is to check for FAILURE
as the result of zend_call_function()
as that can never happen as we are not in shutdown.
f02c205
to
68efca5
Compare
68efca5
to
e246ec0
Compare
Most of the fields on the struct are useless or can be handled differently
e246ec0
to
ad42595
Compare
This union struct was using a huge amount of memory for no good reason.