Repository navigation
Language: pad propertyless classes that nest Closures for MCJIT (#27163) - #27176
Merged
Merged
Conversation
4 tasks
Owner
Author
3 tasks
Owner
Author
|
Maintainer: leaving open — CONFLICTING + MCJIT SIGSEGV on execute; not merge-ready. Continue on #27163 until |
16 of 25 tasks
Owner
Author
JitMcjitEmbed's one-level brace regex skipped empty classes whose methods contain Closures, so bin/jit.php never applied the #4954 property pad and MCJIT segfaulted on get_class/gettype/spl_object_id($this). Use a brace-balanced scan, and stop treating inherited Closure func->class as an instance-method $this LLVM param. Co-authored-by: Cursor <cursoragent@cursor.com>
PurHur
force-pushed
the
agent/issue-27163-jit-closure-this-get-class
branch
from
August 3, 2026 08:02
7708425 to
b1a4acd
Compare
5 tasks
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.
Summary
JitMcjitEmbedMCJIT empty-class pad so classes whose methods contain nested Closures are still padded (#4954/#27163). The previous one-level brace regex skipped those bodies, sobin/jit.phphit bare MCJIT and segfaulted onget_class/gettype/spl_object_id($this).func->class(copied forself::class) as an instance-method$thisLLVM parameter; onlyclosureBodyUsesThismay add it.test/repro/issue_27163_*+ unit coverage.php-src reference
Zend/zend_closures.c— auto-bound Closure$this#4954); behavior matches Zend via VM fallback once padded (same as other property-bearing classes).Test plan
php bin/jit.php test/repro/issue_27163_jit_closure_this_get_class.php→'A'(5/5)php bin/jit.php test/repro/issue_27163_jit_closure_this_gettype.php→'object'php bin/jit.php test/repro/issue_27163_jit_closure_this_spl_object_id.php→1php bin/vm.phpget_class repro →'A'vendor/bin/phpunit --filter testPadsPropertylessClassContainingNestedClosure— OKCloses #27163