Conversation
…ount PDOStatement's get_gc handler never reported bound_params or bound_columns, so reference cycles through bindParam()/bindColumn() arguments stayed invisible to the collector, and since 5b8d0dc register_bound_param() copied driver_params while really_register_bound_param() added another reference, leaving one zval with two references that no collector could reclaim. Report both hash tables, drop the extra addref, and release the caller's reference on the registration failure path.
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.
PDOStatement's get_gc handler never walked bound_params or bound_columns, so a reference cycle through a bindParam() or bindColumn() argument stayed invisible to the collector. register_bound_param() has also copied driver_params since 5b8d0dc while really_register_bound_param() added a reference of its own, leaving one zval with two references, so even a reported cycle could not be reclaimed. The test binds six objects with driver-option arguments and expects all six collected after gc_collect_cycles().