Language: nested FUNCCALL_INIT stack restores html_entity_decode after htmlspecialchars_decode (#32064) - #32073
Merged
PurHur merged 1 commit intoAug 18, 2026
Conversation
…r htmlspecialchars_decode (#32064) A single pending-call slot lost the outer callee when three INITs stacked, so the later html_entity_decode EXEC ran with call===null and returned null. php-src html.c has no cross-call clobber. Co-authored-by: Cursor <cursoragent@cursor.com>
PurHur
deleted the
agent/issue-32064-html-entity-decode-after-hs-decode
branch
August 18, 2026 04:56
4 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
html_entity_decode()afterhtmlspecialchars_decode()in the same unit returnednull(VM/JIT) instead of"é"because three stackedFUNCCALL_INITs overwrote a single pending-call slot; the later EXEC ran withcall === null.Frame) and JIT (Scope), matching nested INIT/EXEC pairing (php-srcext/standard/html.chas no cross-call clobber).php-src reference
ext/standard/html.c—PHP_FUNCTION(html_entity_decode)/PHP_FUNCTION(htmlspecialchars_decode)are separate.PHP implementation
lib/VM.php/lib/Frame.php— runtime nested INIT stacklib/JIT.php/lib/JIT/Scope.php— compile-time nested INIT stack (MCJIT/AOT lowering)Test plan
./script/phpunit.sh test/unit/HtmlEntityDecodeAfterHsDecode32064Test.php./script/phpunit.sh test/compliance/HtmlentitiesVMTest.php./script/phpunit.sh test/compliance/HtmlentitiesJITTest.phpVerification
Not covered: full
./script/ci-local.sh; native AOT of this repro still segfaults after the firstvar_dump(helper-runtime cache path; issue scope is VM/JIT).php script/bootstrap-inventory.php --checkis stale on master (unrelated file-list drift) — not restamped.Made with Cursor