Skip to content

Conversation

nielsdos
Copy link
Member

@nielsdos nielsdos commented Oct 3, 2025

This fixes the nightly failure.

Happens due to changes in 28fd759 where the opline opcode may be
accessed after the opcode array has been reallocated.
To solve this we store the opcode in a temporary variable.

Happens due to changes in 28fd759 where the opline opcode may be
accessed after the opcode array has been reallocated.
To solve this we store the opcode in a temporary variable.
Copy link
Member

@iluuu1994 iluuu1994 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! The API really shouldn't make it so easy to run into this issue. 🙂


if (opline->opcode == ZEND_NEW) {
if (opcode == ZEND_NEW) {
zend_error_noreturn(E_COMPILE_ERROR, "Cannot create Closure for new expression");
Copy link
Contributor

@staabm staabm Oct 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: non-PR touched code has wrong indent in this line

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh indeed. Good find. I'll fix it separately.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed via f9c4fe4

@nielsdos nielsdos merged commit 969e837 into php:master Oct 3, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants