AOT: restore mb_trim/mb_ucfirst under PROFILE=8.4 after #36123 compile clear - #36140
Merged
Merged
Conversation
…e clear (#34379). #36123 cleared PHP_COMPILER_PROFILE during user-script AOT compile for hash helper ABI, but supportsMbTrimFunctions() only read getenv('PHP_COMPILER_PROFILE') and skipped registration. Route forward-profile gates through languageProfileVersion() so PHP_COMPILER_AOT_COMPILE_PROFILE (already snapshotted in compile.php) applies. Co-authored-by: Cursor <cursoragent@cursor.com>
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
bin/compile.phpclearsPHP_COMPILER_PROFILEduring user-script AOT compile (hash helper ABI / Regression: hash_hmac(null $key)/hash_update(null) TypeError under PROFILE=8.4 — Zend DEP+coerce (re-#20175/#20195, ext/hash/hash.c) #21557) and snapshots it toPHP_COMPILER_AOT_COMPILE_PROFILE.supportsMbTrimFunctions()/supportsMbUcfirstLcfirst()/supportsStrIncrement()still required a livegetenv('PHP_COMPILER_PROFILE'), so forward-profile builtins were not registered during compile → AOTmb_trim()returned empty output (VM OK).languageProfileVersion(), which already honorsPHP_COMPILER_AOT_COMPILE_PROFILEunder user-script AOT.php-src reference
ext/mbstring/mbstring.c—PHP_FUNCTION(mb_trim)/mb_ltrim/mb_rtrimTest plan
Closes #34379 (leftover regression after #36123).
Made with Cursor