Skip to content

Fix another vm_interrupt bug for tailcall VM#22265

Closed
morrisonlevi wants to merge 1 commit into
php:PHP-8.5from
morrisonlevi:tailcall-vm-interrupt-round2
Closed

Fix another vm_interrupt bug for tailcall VM#22265
morrisonlevi wants to merge 1 commit into
php:PHP-8.5from
morrisonlevi:tailcall-vm-interrupt-round2

Conversation

@morrisonlevi

@morrisonlevi morrisonlevi commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

We fixed a bug in the tailcall VM related to vm_interrupt in 8.5.7: #21922. Unfortunately I was able to find another crash, reproducer attached.

Note that the "return opline" variant that Arnaud benchmarked passes this test. This PR instead adds a SAVE_OPLINE before ZEND_VM_LOOP_INTERRUPT in a specific macro. They seemed very close in speed, and @bwoebi preferred this to partially reverting.

@iluuu1994 iluuu1994 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Haven't spent too much time with the tailcall VM but the fix looks correct to me.

Comment thread Zend/zend_execute.c Outdated
@morrisonlevi

Copy link
Copy Markdown
Contributor Author

Thanks for the review, I'll wait for @bwoebi to review as well before merging.

@bwoebi bwoebi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me too!

@morrisonlevi morrisonlevi changed the title Another tailcall vm_interrupt bug Fix another tailcall vm_interrupt bug Jun 11, 2026
@morrisonlevi morrisonlevi changed the title Fix another tailcall vm_interrupt bug Fix another vm_interrupt bug for tailcall VM Jun 11, 2026
@morrisonlevi morrisonlevi force-pushed the tailcall-vm-interrupt-round2 branch from c1599b5 to dc16589 Compare June 11, 2026 15:12
morrisonlevi added a commit that referenced this pull request Jun 11, 2026
* PHP-8.5:
  Fix another vm_interrupt bug for tailcall VM (#22265)
@morrisonlevi

Copy link
Copy Markdown
Contributor Author

Merged and closed by 05c7b00.

pull Bot pushed a commit to makesoftwaresafe/php-src that referenced this pull request Jun 11, 2026
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