Skip to content

php-in-php: drop leftover Type always-on openssl_pbkdf2 ABI shell (ext/openssl/openssl.c) #32869

Description

@PurHur

Category

php-in-php · runtime-shrink (#1492, peer #32866 / #32868 / re-#32122)

Problem

Builtin\Type::register() still addFunctions an empty always-on shell for __compiler_openssl_pbkdf2 on every JIT/AOT module. OpensslPbkdf2Runtime already owns the ABI (HMAC over __compiler_hash + LLVM hex-decode), but implementIfMissing still lookupFunctions the Type-declared empty decl — leftover Type shells can mint openssl_pbkdf2.1 when Runtime ABI drift lands (#31894 / #32122 class).

Peer #32866 removed openssl_sign/verify Type shells with the same declareAbi / getNamedFunction-first shape.

php-src reference

PHP implementation target

  • lib/JIT/Builtin/OpensslPbkdf2Runtime.php — declare ABI module-locally (getNamedFunction first + addFunction when absent); stop depending on Type empty decls via lookupFunction
  • lib/JIT/Builtin/Type.php — remove always-on openssl_pbkdf2 row; OpensslPbkdf2Runtime::ensureLinked from Type::initialize
  • Keep ext/openssl/openssl_pbkdf2.php user-script path; no new runtime/*.c

Repro

# Guard: Type must not always-declare the shell
./script/phpunit.sh --filter TypeDeadOpensslPbkdf2AbiRuntimeShrinkTest

Done when

  • Type.php does not always-declare __compiler_openssl_pbkdf2
  • OpensslPbkdf2Runtime owns the ABI module-locally; Type::initialize ensureLinks it
  • ./script/phpunit.sh --filter TypeDeadOpensslPbkdf2AbiRuntimeShrinkTest green
  • ./script/aot-smoke.sh stays 8/8
  • No new runtime/*.c

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 / JITenhancementNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-0:FoundationPhase 0 – foundation & DevEx

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions