Skip to content

php-in-php: drop leftover Type always-on __compiler_assert_fail ABI shell (ext/standard/assert.c) #33237

Description

@PurHur

Category

bug · php-in-php · Trust (#32122 class) · Pillar 1

Problem

Builtin\Type still always-on addFunction/registerFunction for __compiler_assert_fail without getNamedFunction first. AssertFail already owns the body (implementBodies via getNamedFunction, but today it returns if the symbol is absent — so Type's empty decl is still required). Leftover Type empty decls vs Runtime ABI drift mint assert_fail.1 — same class as #31894 / #32122 / #33225 (phpc_deploy_path) / #33234 (trigger_error sentinel).

TypeDead sentinels after #33225 name trigger_error as next leftover; #33234 retargets peers to assert_fail. This ticket drops that shell.

Repro Expected Actual risk
Cold Type always-on empty decl + Runtime ABI Single __compiler_assert_fail Rename .1 / Module verify / link failure

php-src reference

PHP implementation target

  • lib/JIT/Builtin/Type.php — drop always-on shell; keep AssertFail::ensureLinked on full load
  • lib/JIT/Builtin/AssertFail.php — getNamedFunction first, then addFunction if absent (incl. thin standalone declare-only path)
  • ext/standard/JitAssert.php — already ensureLinked before lookup; ownership marker
  • test/unit/TypeDeadAssertFailAbiRuntimeShrinkTest.php — shrink + next-leftover sentinel (__compiler_assert_fail_string)

Done when

  • Type no longer always-declares __compiler_assert_fail
  • Owner declares module-locally (getNamedFunction first)
  • ./script/phpunit.sh --filter TypeDeadAssertFailAbiRuntimeShrinkTest green
  • ./script/aot-smoke.sh stays 8/8
  • VM/JIT assert(false) matches Zend warning path (no new runtime/*.c)

Lane: PHP runtime migration specialist (#33234/#33235 claimed; next Trust leftover after trigger_error).

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-0:FoundationPhase 0 – foundation & DevEx

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions