Skip to content

Bootstrap: skip null include-binding ASSIGN operands (#22642)#22974

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-22642-include-binding-null-op
Jul 25, 2026
Merged

Bootstrap: skip null include-binding ASSIGN operands (#22642)#22974
PurHur merged 1 commit into
masterfrom
agent/issue-22642-include-binding-null-op

Conversation

@PurHur

@PurHur PurHur commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • Exclusive gen-0 refresh r15 died after ~152m with OperandName::resolve(): Argument #1 ($op) must be of type PHPCfg\Operand, null given at IncludeBindingJitHelper.php:270 while compiling the honest spine (LAST_ENTRY=/compiler/lib/OpCodeNames.php).
  • Block::getOperand() can return null when an ASSIGN slot index is absent from the current block scope; the include-binding walk passed that null into OperandName::resolve().
  • Null-guard lastAssignVariableForNameInBlock, variableFromCallerAssignConstant, and countAssignsToName (PHP-in-PHP; no C).

Refs #22642 (does not close — verified-fresh sidecars still required). Unblocks the next exclusive spine attempt (r16).

php-src / design

  • Zend include inherits caller locals by name (Zend/zend_execute.c); this is compile-time binding analysis in ext/standard/IncludeBindingJitHelper.php.

Test plan

  • php test/repro/issue_22642_include_binding_null_operand.phpok null
  • vendor/bin/phpunit --filter IncludeBindingNullOperandTest → OK (3)
  • Related: --filter 'IncludeBindingNullOperandTest|IncludeBindingNestedAppNameTest|IncludeHelperShrinkTest' → OK (10)

Verification transcript

ok null
OK (3 tests, 3 assertions)   # IncludeBindingNullOperandTest
OK (10 tests, 103 assertions) # IncludeBinding* related

C runtime: 0 lines added.

Made with Cursor

Honest full-spine AOT (r15) TypeError'd in OperandName::resolve when
getOperand() returned null for ASSIGN slots absent from block scope.
Null-guard those walks so gen-0 refresh can continue past OpCodeNames.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant