ext/sqlite3: Use new F ZPP modifier#14040
Merged
Girgias merged 2 commits intophp:masterfrom May 1, 2024
Merged
Conversation
ndossche
reviewed
Apr 24, 2024
| ZEND_PARSE_PARAMETERS_END(); | ||
|
|
||
| SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) | ||
| SQLITE3_CHECK_INITIALIZED_FREE_TRAMPOLINE(db_obj, db_obj->initialised, SQLite3, &fcc); |
Member
There was a problem hiding this comment.
Does it need to check if the callback is passed null?
This was referenced Apr 27, 2024
ext/sqlite3/sqlite3.c
Outdated
Comment on lines
1029
to
1034
| if (ZEND_FCC_INITIALIZED(step_fcc)) { | ||
| zend_release_fcall_info_cache(&step_fcc); | ||
| } | ||
| if (ZEND_FCC_INITIALIZED(fini_fcc)) { | ||
| zend_release_fcall_info_cache(&fini_fcc); | ||
| } |
Member
There was a problem hiding this comment.
ZEND_FCC_INITIALIZED is redundant because zend_release_fcall_info_cache is doing almost the same thing as checking ZEND_FCC_INITIALIZED.
Also, in cases like createAggregate(null, null, null), there is a possibility that uninitialized members (step_fcc.function_handler, fini_fcc.function_handler) may be accessed, so it may be a good idea to set them to NULL in advance.
(In a follow-up PR for pdo_sqlite, I ran into this problem in the release build)
SakiTakamachi
approved these changes
May 1, 2024
ndossche
approved these changes
May 1, 2024
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.
No description provided.