Conversation
zend_ffi_create_callback() stored the callable's fcall info cache without owning it and passed it to zend_call_function(), which clears function_handler before running a __call() trampoline. Calling such a callback twice failed, destroying it read a NULL handler, an array callable's object could be freed while the callback still used it, and a failed creation left the trampoline in EG(trampoline). Take ownership with zend_fcc_addref(), call through zend_call_known_fcc(), release with zend_fcc_dtor(), and release the cache when creation fails. Closes phpGH-23933
iliaal
force-pushed
the
fix/aph-pdo-execute-array-partial-bindings-acc3-84-work
branch
from
September 28, 2026 12:18
42cf33a to
46e5c05
Compare
PDOStatement::execute() destroyed bound_params before registering the entries of its array argument, so a failure part-way through (a value whose string conversion throws, a name the driver rejects) left the entries registered so far in place, and a following execute() without arguments ran with them. Build the new table separately and install it only once every entry is registered. This also stops a value's __toString() that re-executes the statement from freeing the table being filled.
iliaal
force-pushed
the
fix/aph-pdo-execute-array-partial-bindings-acc3-84-work
branch
from
September 28, 2026 12:19
46e5c05 to
3847ee1
Compare
Owner
Author
|
Submitted upstream as php#23970. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stage and validate execute($params) entries before replacing the statement binding table, preserving the previous complete tuple on failure.