Skip to content

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

Description

@PurHur

Category

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

Problem

Builtin\Type::register() still addFunctions an empty always-on shell for __compiler_openssl_digest on every JIT/AOT module. OpensslDigestRuntime already owns the ABI via NestedJIT bridge, but implementIfMissing still lookupFunctions the Type-declared empty decl — leftover Type shells can mint openssl_digest.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/OpensslDigestRuntime.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_digest row; keep OpensslDigestRuntime::ensureLinked from Type::initialize
  • Keep OpensslDigestJitHelper / user-script builtins; no new runtime/*.c

Repro

# Guard: Type must not registerFunction('__compiler_openssl_digest'
grep -n "openssl_digest" lib/JIT/Builtin/Type.php

Done when

  • Type no longer always-declares/registers __compiler_openssl_digest
  • OpensslDigestRuntime declares ABI module-locally (no lookupFunction($name) for that ABI)
  • ./script/aot-smoke.sh stays 8/8
  • Targeted phpunit shrink test green

Parent

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