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
2 times, most recently
from
November 16, 2026 21:59
916fe07 to
7045637
Compare
Reject class-string calls to instance methods in the zend_test wrapper before they reach zend_call_method() without an object. Retain a debug assertion for invalid C API calls and test both rejected and valid calls. Fixes php#25405.
kairosci
force-pushed
the
fix/gh-25405-zend-call-method-assert
branch
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! |
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.
Fixes #25405.
The
zend_testwrapper accepted a class name for an instance method and passed a null object tozend_call_method(). The method then ran without a valid$this, leading to confusing errors, engine assertions, or crashes.Reject this invalid call in the wrapper with a
ValueErrorbefore dispatch. Keep aZEND_ASSERTinzend_call_method()as a debug-time check for extension callers that violate the C API contract. Update the existing static-return test to pass actual objects to its instance method, and add focused coverage for the invalid class-string calls, valid object calls, and valid static calls.