AOT DOM: fix DTD isId regression and setIdAttributeNode(null) LLVM verify (#34821, #33758) - #35648
Merged
Merged
Conversation
…rify (#34821, #33758) Restore compile-time isIdBearingLiteral before the activeFunction guard so loadXML DTD ATTLIST ID attrs report isId() true again after #35627. Rework setIdNode*Argv to take only the Attr (Context bridge) — nested JIT mis-lowers two consecutive ObjectEntry params — and add VmDom::setIdAttributeNodeOnAttrOwner for the helper body. php-src: ext/dom/attr.c (dom_attr_is_id), ext/dom/element.c (setIdAttributeNode). Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Aug 28, 2026
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
isIdBearingLiteralbefore theactiveFunctionguard inDomAttrIsIdso loadXML DTDATTLIST IDattributes reportDOMAttr::isId() === trueunder thin AOT again (regressed in Fix AOT DOMAttr::isId() on createElement thin-AOT trees (#29884) #35627).setIdNode*Argvto a single-Attr Context bridge (JitVmHelperLink::ensureContextBridge) — nested JIT mis-lowers two consecutiveObjectEntryLLVM params and module-verify failed onPHP_COMPILER_HELPER_RUNTIME_O=0compiles. AddVmDom::setIdAttributeNodeOnAttrOwnerfor the helper body.php-src:
ext/dom/attr.c(dom_attr_is_id),ext/dom/element.c(setIdAttributeNode).Test plan
Not covered:
prelinked/helper-runtime/.../DomSetIdAttributeJitHelperunit refresh (signature changed — runphp script/emit-helper-runtime-object.php --unit /ext/dom/DomSetIdAttributeJitHelper.phpbefore relying on defaultPHP_COMPILER_HELPER_RUNTIME_O=1cache). Targeted tests above usePHP_COMPILER_HELPER_RUNTIME_O=0explicitly.Closes #34821
Closes #33758
Made with Cursor