Skip to content

Trust: link StringTriggerError before Type::register NestedJIT (#33248) - #33251

Merged
PurHur merged 1 commit into
masterfrom
fix/33248-trigger-error-register-order
Aug 21, 2026
Merged

PurHur merged 1 commit into
masterfrom
fix/33248-trigger-error-register-order

Conversation

@PurHur

@PurHur PurHur commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • After php-in-php: drop leftover Type always-on __compiler_trigger_error ABI shell (Zend/zend_execute_API.c) #33234 dropped Type's always-on __compiler_trigger_error shell, PHP_COMPILER_HELPER_RUNTIME_O=0 thin AOT failed during Type::registerSessionStartOptionsRuntime::ensureLinked NestedJIT (JitScalarEnumCoerce::emitObjectScalarWarning lookup).
  • Call StringTriggerError::ensureLinked immediately before that NestedJIT; keep initialize ensureLinked and forbid restoring Type empty decls.
  • Guards: shrink-test register order + HELPER_O=0 hello/DOM AOT unit tests.

Closes #33248

php-src

  • Zend/zend_execute_API.c / main/php_errors.c — trigger_error / user error path (ABI ownership unchanged; link order only)

Test plan

  • PHP_COMPILER_HELPER_RUNTIME_O=0 php bin/compile.php hello → prints hi
  • Same for DOM createElement/setAttribute → prints 1
  • ./script/phpunit.sh --filter 'TypeDeadTriggerErrorAbiRuntimeShrinkTest|TriggerErrorHelperRuntimeO033248AotTest' → OK (8 tests)
  • ./script/aot-smoke.sh8/8
  • Not covered: full ci-local.sh / north-star5-verify --strict

Verify transcript

HELPER_O=0 hello → hi
HELPER_O=0 DOM setattr → 1
phpunit filter → OK (8 tests, 35 assertions)
aot-smoke: 8 passed, 0 failed

Made with Cursor

HELPER_RUNTIME_O=0 thin AOT looked up __compiler_trigger_error during
SessionStartOptionsRuntime NestedJIT after #33234 dropped Type's always-on shell.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit f519c7c into master Aug 21, 2026
1 check failed
@PurHur
PurHur deleted the fix/33248-trigger-error-register-order branch August 21, 2026 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: HELPER_RUNTIME_O=0 AOT compile fails looking up __compiler_trigger_error after #33234 (lib/JIT/Builtin/Type.php)

1 participant