Repository navigation
Stdlib: trigger_error() enum error_level TypeError (#9086) - #18272
Merged
Merged
Conversation
… IR (#16075) Defer user-script Context init when the source uses preg_* so nested preg helper JIT links on a full-init module (~5s) instead of OOM/hanging under minimal user bodies. Coerce PregJitHelper capture HashTable returns for LLVM verify, route isset/?? boxed array offsets through HashTableHelper::readHashtableFromValueBox, and replace full-init superglobal refresh with the user-script native emitter after the defer path restores PHP_COMPILER_AOT_USER_SCRIPT. Remaining: standalone binary still segfaults at c:main_before_php on preg execute; phpc build can still hang with CACHE=0 on large link. Repro: php test/repro/preg_match_aot_minimal.php Co-authored-by: Cursor <cursoragent@cursor.com>
#16075) Clear VmActiveContextInitLlvm pending/scheduled statics when deferring user-script init for preg prelink so thin __init__ emission is not skipped across Context resets. Add maintainer repro scripts for minimal preg_match and capture/coalesce AOT paths. Execute still segfaults after c:main_before_php — runtime init/helper mismatch remains open on #16075 / PR #18176. Co-authored-by: Cursor <cursoragent@cursor.com>
After temporary full-init Context creation for preg nested JIT, restore ensureMinimalUserStandaloneBodies once PHP_COMPILER_AOT_USER_SCRIPT is re-enabled so compileToFile sees thin standalone stubs. Execute still segfaults at c:main_before_php when internal_43 calls __compiler_preg_match → PregJitHelper::matchArgv (IR verified); next step is runtime init vs nested-helper ABI mismatch after defer. Co-authored-by: Cursor <cursoragent@cursor.com>
Align PregMatchRuntime nested JIT with JitVmHelperLink — ensure VmActiveContextJitHelper::resolve lowering before compiling PregJitHelper. Execute segfault in vmpregnative.pregmatch remains open on PR #18176. Co-authored-by: Cursor <cursoragent@cursor.com>
- Fix array_splice.php JitIntdiv import (same-namespace JitIntdiv) - CloneWithJitHelper: avoid array_splice in nested clone-with path - VmPregEngine: foreach max-key scan + manual reverse (skip array_keys/reverse builtins) - PregMatchRuntime: clarify VmPregNative-only nested compile intent Root cause for execute segfault: VmPregPure::pregMatch lowers to ExternalMethod null stub when VmPregNative is nested-compiled without VmPregPure IR. Full VmPregEngine nested compile still blocked (BoundVariable). Next: register real vmpregpure::pregmatch proxy or complete VmPregEngine JIT lowering. Co-authored-by: Cursor <cursoragent@cursor.com>
#16075) Replace VmPregEngine compile/match throws with abortCompile/limitErrorCode flags so nested JIT can lower the engine without try/catch. Add VmPregUtf8 (UTF-8 subset without VM frame deps) for VmPregPure. Partial BoundVariable SCOPE_OBJECT → $this in JIT Context. Execute still segfaults: nested file compile lacks $this for instance methods; VmPregPure remains ExternalMethod stub until engine bundle compiles. Co-authored-by: Cursor <cursoragent@cursor.com>
Move modifier checks into helper methods so nested JIT no longer lowers match-on-string-offset after an e-modifier guard (structGep crash). Compile and link for tier-2 preg_capture now succeed; execute still needs VmPregPure nested lowering or real vmpregpure proxies. Co-authored-by: Cursor <cursoragent@cursor.com>
…mpile (#18176) - Resolve BoundVariable before generic `this` name check in JIT Context - Handle SCOPE_OBJECT and by-ref BoundVariable operands in nested compile - Seed implicitThisArgument from LLVM param 0 when argVars omitted on-demand - Broaden instanceMethodUsesThis for file-scope nested class methods (#16075) - Fix VmPregEngine match/default arms: use $this->abortCompile() not broken $engine closure Execute still segfaults: VmPregPure remains external stub until VmPregEngine nested JIT completes. Co-authored-by: Cursor <cursoragent@cursor.com>
Route VM/JIT error_level parsing through VmMath/JitIntdiv guards so enum case operands raise Zend-aligned TypeError instead of LogicException. Co-authored-by: Cursor <cursoragent@cursor.com>
3 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
trigger_error()second-argument parsing so enum case operands raiseTypeErrorwith Zend-aligned message (… must be of type int, E given) instead ofLogicException.VmMath::parseIntBuiltinArgForFrame()(same guards aserror_reporting()/user_error()).JitIntdiv::lowerIntBuiltinArgForCaller()for runtime enum rejection.Closes #9086
php-src reference
ext/standard/basic_functions.c—PHP_FUNCTION(trigger_error)/user_errorPHP implementation
ext/standard/trigger_error_.phpVerification
Made with Cursor