Skip to content

AOT: restore mb_trim/mb_ucfirst under PROFILE=8.4 after #36123 compile clear - #36140

Merged
PurHur merged 1 commit into
masterfrom
fix/mb-trim-aot-profile-regression-36123
Sep 1, 2026
Merged

PurHur merged 1 commit into
masterfrom
fix/mb-trim-aot-profile-regression-36123

Conversation

@PurHur

@PurHur PurHur commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Summary

php-src reference

  • ext/mbstring/mbstring.c — PHP_FUNCTION(mb_trim) / mb_ltrim / mb_rtrim

Test plan

./script/aot-smoke.sh
# aot-smoke: 8 passed, 0 failed

./script/phpunit.sh --filter 'MbTrimRuntimeAotTest|MbTrimRuntimeEncodingAotTest|MbUcfirstLcfirstRuntimeAotTest|hash_null_algo_forward84|hash_hmac_update_null_key_forward84'
# OK (8 tests, 50 assertions)

Closes #34379 (leftover regression after #36123).

Made with Cursor

…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>
@PurHur
PurHur merged commit 48003f4 into master Sep 1, 2026
1 check passed
@PurHur
PurHur deleted the fix/mb-trim-aot-profile-regression-36123 branch September 1, 2026 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AOT: mb_trim/mb_ltrim/mb_rtrim refuse runtime strings — LogicException (leftover of #5957/#23883, ext/mbstring/mbstring.c)

1 participant