Skip to content

php-in-php: drop leftover Type always-on openssl_encrypt/decrypt ABI shells (ext/openssl/openssl.c) #32859

Description

@PurHur

Category

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

Problem

Builtin\Type::register() still addFunctions empty always-on shells for __compiler_openssl_encrypt, __compiler_openssl_decrypt, __compiler_openssl_encrypt_take_tag, and __compiler_openssl_encrypt_tag_is_null on every JIT/AOT module. OpensslEncryptRuntime already owns these ABIs via bridges, but implementIfMissing still lookupFunctions Type-declared empty decls — leftover Type shells can mint openssl_encrypt.1 when Runtime ABI drift lands (#31894 / #32122 class).

Peer #32855 removed password crypto Type shells with the same declareAbi / getNamedFunction-first shape.

php-src reference

PHP implementation target

  • lib/JIT/Builtin/OpensslEncryptRuntime.php — declare each 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_encrypt/decrypt/take_tag/tag_is_null rows; OpensslEncryptRuntime::ensureLinked from Type::initialize
  • Keep OpensslEncryptCrypto / OpensslEncryptJitHelper / JitOpensslEncrypt user-script path
  • unit shrink test peer TypeDeadPasswordCryptoAbiRuntimeShrinkTest

Done when

  • Type.php does not always-declare the four openssl_encrypt ABI shells
  • OpensslEncryptRuntime owns the ABIs module-locally; Type::initialize ensureLinks it
  • ./script/aot-smoke.sh stays 8/8
  • No new runtime/*.c

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