Skip to content

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented Dec 29, 2024

This union struct was using a huge amount of memory for no good reason.

@Girgias Girgias marked this pull request as ready for review December 29, 2024 02:50
@Girgias Girgias requested a review from kamil-tekiela January 7, 2025 21:50
/* Possible error message */
efree(is_callable_error);
}
ZEND_ASSERT(is_callable_error == NULL);
Copy link
Member

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?

Copy link
Member Author

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);
Copy link
Member

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?

Copy link
Member Author

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.

@Girgias Girgias force-pushed the pdo-fetch-func-refacto branch 2 times, most recently from f02c205 to 68efca5 Compare January 8, 2025 18:49
@Girgias Girgias force-pushed the pdo-fetch-func-refacto branch from 68efca5 to e246ec0 Compare January 8, 2025 19:33
@Girgias Girgias force-pushed the pdo-fetch-func-refacto branch from e246ec0 to ad42595 Compare January 8, 2025 20:50
@Girgias Girgias merged commit fba0b18 into php:master Jan 9, 2025
10 checks passed
@Girgias Girgias deleted the pdo-fetch-func-refacto branch January 9, 2025 10:30
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.

3 participants