Skip to content

Stdlib: ldap_compare() JIT lowering missing — VM path only (ext/ldap/ldap.c) #32121

Description

@PurHur

Category

stdlib · php-src-strict · ext/ldap · JIT/AOT lowering

Problem

ldap_compare() works on the VM via VmLdapCore::compare(), but compiled JIT/AOT calls still throw LogicException from call() in ext/ldap/ldap_result_builtins.php. This leaves compiled PHP behind the existing PHP-side runtime path even though the semantics already live in ext/ldap/ and VmLdapNative.

Repro Zend 8.2+ VM JIT/AOT
ldap_compare($ldap, "cn=x", "cn", "x") callable callable LogicException today

php-src reference

PHP implementation target

  • ext/ldap/ldap_result_builtins.php — replace the JIT stub in ldap_compare::call()
  • ext/ldap/JitLdapResult.php + ext/ldap/LdapResultJitHelper.php — lower handle + string args through PHP helper code
  • lib/JIT/Builtin/LdapRuntime.php — register the bridge; keep behavior in PHP, no new runtime/*.c logic

Repro

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php -d display_errors=1 ./phpc run test/repro/issue_ldap_compare_jit.php'

Done when

  • JIT/AOT accept LDAP\Connection, string $dn, string $attribute, string $value with php-src-strict type errors
  • Return shape matches VM/php-src subset already implemented: true / false / -1 plus warning/errno side effects
  • Targeted repro + unit coverage added

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-4:stdlibPhase 4 – stdlib for web appsstdlib

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions