Skip to content

php-in-php: drop Type::register always-on StringTriggerError — lazy at HashTable::implement / call sites (Zend/zend_execute_API.c) #35392

Description

@PurHur

Category

bug · php-in-php · Trust / #32122 .1 mint class · Type::register shrink

Problem

Builtin\Type::register still eagerly calls:

  • StringTriggerError::declareUndefinedArrayKeyAbis
  • StringTriggerError::ensureLinked

Those NestedJIT trigger_error / undefined_array_key_warning_* ABIs during every AOT init — leftover Context/Type NestedJIT vs Runtime ABI drift mints trigger_error.1 / undefined_array_key_warning_*.1 (#31894 / #32122).

Type::initialize already dropped this (#34513); Context ensureMinimal/ensureFull likewise (#34641 / #35073). Call sites and AssertFail::ensureLinked already ensure before lookup. HashTable::implement is the consumer of undef-key ABIs and should declare/ensure at the start of implement (peer of other Type subtype ABI ensure).

Path Today After
Thin hello-world AOT init Type::register NestedJIT trigger_error no Type NestedJIT of StringTriggerError
HashTable::implement undef-key warn relies on Type::register ensure at implement entry
HELPER_RUNTIME_O=0 (#33248) Type::register ensureLinked HashTable::implement + call-site ensure

php-src reference

PHP implementation target

Repro

./script/aot-smoke.sh   # must stay 8/8
./script/phpunit.sh --filter 'TypeDeadTriggerError|TypeDeadUndefinedArrayKey|TriggerErrorHelperRuntimeO033248|ContextMinimalStandaloneLazyStringTriggerError'

Done when

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 / 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