Skip to content

AOT: DOMDocument::save returns NULL — ExternalMethod stub (leftover of #35540 / #18435) #35546

Description

@PurHur

Category

bug · AOT · ExternalMethod null · ext/dom

Problem

Thin AOT leaves DOMDocument::save unbound, so calls resolve to ExternalMethod NULL instead of writing saveXML() bytes and returning the byte count (or false on I/O failure). VM already matches Zend via DocumentSave / VmDom::save (#18435).

Repro Zend / VM AOT
$d->save($tmp) after loadXML('<r>hi</r>') 32 + file written NULL + no file

./script/aot-smoke.sh was 8/8 before measuring.

php-src reference

PHP implementation target

  • lib/JIT/DomInstanceMethodJit.phpdomdocument::save user-script proxy
  • ext/dom/VmDomInstanceInvoke.php + ext/dom/VmDomJitDispatch.php — dispatch to VmDom::save

Repro

./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/aot_dom_document_save_null.php'
./script/docker-exec.sh -- bash -lc 'php bin/compile.php -o /tmp/ds.bin test/repro/aot_dom_document_save_null.php && /tmp/ds.bin'

Done when

  • AOT matches VM on the repro (int bytes + file contents; not NULL)
  • ./script/aot-smoke.sh stays 8/8
  • Targeted phpunit filter green

Parent

DOM/XML AOT correctness lane (peer #35540 validate/schemaValidate ExternalMethod leftovers).

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-3:aotPhase 3 – AOT deployment

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions