Repository navigation
Conversation
kairosci
marked this pull request as draft
November 16, 2026 21:53
kairosci
marked this pull request as ready for review
November 16, 2026 21:56
kairosci
force-pushed
the
fix/gh-25405-zend-call-method-assert
branch
3 times, most recently
from
November 16, 2026 22:00
7045637 to
662199b
Compare
Contributor
Author
|
@DanielEScherzer @Girgias as soon as you can, could you take a look at it? Thanks! |
Girgias
requested changes
Nov 17, 2026
Girgias
left a comment
Member
There was a problem hiding this comment.
A: taking over someone else's PR that is only 5 days old is frankly disrespectful.
B: this utterly misses the point of adding an assertion, zend_test is an extension that exists to test aspect of the Zend engine/expose functionality that is not easily accessible. Fixing the implementation of a test function is pointless.
kairosci
force-pushed
the
fix/gh-25405-zend-call-method-assert
branch
from
November 17, 2026 00:30
662199b to
f9652f0
Compare
Add a debug assertion to catch calls to instance methods without an object. Keep zend_test as a direct wrapper around the C API and pass objects to instance methods in the static return test. Refs php#25405.
kairosci
force-pushed
the
fix/gh-25405-zend-call-method-assert
branch
from
November 17, 2026 00:30
f9652f0 to
66fc191
Compare
Contributor
Author
|
Sorry for opening a parallel PR without coordinating first. I’ve removed the wrapper fix and kept only the assertion. |
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.
Refs #25405.
zend_call_method()requires a non-NULL object when invoking an instance method. Add aZEND_ASSERTafter resolving the target function so debug builds catch violations at the API boundary. Keep thezend_testwrapper as a direct pass-through to the C API, and update the static-return test to pass objects to instance methods.Verified in a debug build: each reported invalid call (
returnTrue,returnsRef,returnsProp, andcallsMethod) stops at the assertion. Calls with an object and calls to static methods succeed. The static-return PHPT passes.