Skip to content

php-in-php: delete StringZlib::preloadLibz dlopen — ZlibRuntime uses PHP helpers only (#13347 follow-up) #13858

Closed

Description

@PurHur

Category

php-in-php / runtime-shrink · refs #1492, follow-up #13347

Problem

lib/JIT/Builtin/StringZlib.php still dlopens libz.so via FFI in preloadLibz() for MCJIT symbol preload. After #13347, embed and standalone AOT route through ZlibRuntime → ZlibJitHelper PHP (VmZlibCore) — no inline libz LLVM remains. GzStreamRuntime also calls StringZlib::preloadLibz() unnecessarily.

C / FFI to shrink

  • StringZlib::preloadLibz() dlopen block (~lines 29–54)
  • GzStreamRuntime::implement() call to StringZlib::preloadLibz()

PHP SSOT target

  • ZlibRuntime / GzStreamRuntime compile PHP helpers only; no host libz preload

Repro / verify

grep -n preloadLibz lib/JIT/Builtin/StringZlib.php lib/JIT/Builtin/GzStreamRuntime.php
./script/docker-exec.sh -- vendor/bin/phpunit --filter ZlibRuntimeShrink
make bootstrap-selfhost-vm-driver-execute-probe

Done when

  • preloadLibz deleted; StringZlib has no FFI::cdef / dlopen
  • ZlibRuntimeShrinkTest guards absence of dlopen
  • zlib JIT/AOT smoke green

Activity

  1. added
    enhancementNew feature or request
    implementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claim
    on Jun 29, 2026
  2. PurHur commented on Jun 29, 2026

    @PurHur
    OwnerAuthor

    claim: PHP Runtime → PHP — batch (issues #13857, #13858)

  3. PurHur commented on Jun 30, 2026

    @PurHur
    OwnerAuthor

    Merged via #13864. Deleted StringZlib preloadLibz dlopen (−21 lines); ZlibRuntimeShrink + bootstrap-selfhost-vm-driver-execute-probe green.

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

    enhancementNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claim

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions