Fix handling of ZEND_AST_CALLABLE_CONVERT in file cache#20860
Merged
arnaud-lb merged 1 commit intophp:masterfrom Jan 7, 2026
Merged
Fix handling of ZEND_AST_CALLABLE_CONVERT in file cache#20860arnaud-lb merged 1 commit intophp:masterfrom
arnaud-lb merged 1 commit intophp:masterfrom
Conversation
arnaud-lb
commented
Jan 7, 2026
Comment on lines
+388
to
+391
| SERIALIZE_PTR(fcc->args); | ||
| tmp = fcc->args; | ||
| UNSERIALIZE_PTR(tmp); | ||
| zend_file_cache_serialize_ast(tmp, script, info, buf); |
Member
Author
There was a problem hiding this comment.
Same logic as the generic loop bellow
iluuu1994
approved these changes
Jan 7, 2026
Member
iluuu1994
left a comment
There was a problem hiding this comment.
Just a question. LGTM otherwise.
| zend_ast_fcc *fcc = (zend_ast_fcc*)ast; | ||
| ZEND_MAP_PTR_INIT(fcc->fptr, NULL); | ||
| zend_file_cache_serialize_ast(fcc->args, script, info, buf); | ||
| if (!IS_SERIALIZED(fcc->args)) { |
Member
There was a problem hiding this comment.
Can this be reached multiple times per AST, or does this just mirror the other branches?
Member
Author
There was a problem hiding this comment.
This mirrors the other branches, but I assume that this can be reached multiple times when the AST is referenced from multiple places. In the other branches this happens at least when serializing ast class consts, for inherited consts.
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.
Changes introduced in #20717 do not handle ZEND_AST_CALLABLE_CONVERT properly in file cache: nodes in
zend_ast_fcc->argsare serialized, but notzend_ast_fcc->argsitself. This breaks the build: https://github.com/php/php-src/actions/runs/20767748729/job/59637430230.cc @iluuu1994 @TimWolla