Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GH-16186: Ignore scope when compiling closure in non-tracing jit #16200

Open
wants to merge 1 commit into
base: PHP-8.4
Choose a base branch
from

Conversation

arnaud-lb
Copy link
Member

@arnaud-lb arnaud-lb commented Oct 3, 2024

Fixes GH-16186.

zend_jit() assumes that Closure op_arrays have no scope, but this is not true for all triggers. E.g. with the hot counter trigger, the op_array is a copy with a scope.

As a result, we assume the class of $this here, but it is later changed in ::bind(), which causes the issue.

Here I copy what is done for the tracing JIT: Use the original op_array, which has no scope.

@arnaud-lb arnaud-lb force-pushed the gh16186 branch 2 times, most recently from 56e1803 to edc010b Compare October 3, 2024 16:05
@arnaud-lb arnaud-lb changed the base branch from master to PHP-8.4 October 3, 2024 16:06
@arnaud-lb arnaud-lb changed the title Ignore scope when compiling closure in non-tracing jit Fix GH-16186: Ignore scope when compiling closure in non-tracing jit Oct 3, 2024
@arnaud-lb arnaud-lb marked this pull request as ready for review October 4, 2024 12:22
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.

Assertion failure in Zend/zend_operators.c:2708
1 participant