Skip to content

AOT: loadXML DTD ATTLIST ID / xml:id leaves Attr::isId() false — Zend true (re-#34696/#29884, ext/dom/attr.c) #34821

Description

@PurHur

Category

bug · AOT · DOM · Pillar Correctness · Attr::isId after loadXML DTD / xml:id

Problem

User-script AOT loadXML already indexes DTD ATTLIST … ID and xml:id for getElementById (#34696), but never stamps the Attr cache ID-bearing flag used by thin-AOT DOMAttr::isId() (#29884). Zend/VM return true; AOT returns false (assigned and chained).

Probed 2026-08-25 @ fc32a91ce6 — Zend 8.2 vs AOT (aot-smoke 8/8).

Repro Zend / VM AOT
<!ATTLIST c id ID #IMPLIED> + getAttributeNode('id')->isId() true false
same, assigned local $a->isId() true false
getElementById('t') element c element c (OK)
xml:id="t" + getAttributeNode('xml:id')->isId() true false

php-src reference

PHP implementation target

Repro

./script/aot-smoke.sh
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
php test/repro/maintainer_gap_dom_getattributenode_isid_chain_after_setid.php
php bin/compile.php -o /tmp/isid test/repro/maintainer_gap_dom_getattributenode_isid_chain_after_setid.php && /tmp/isid'

Done when

Parent / peers

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:compilerCompiler / CFG / JITbugSomething isn't workingimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-2:languagePhase 2 – language features

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions