Skip to content

Assertion failure in Zend/zend_vm_execute.h:2915 when JIT #16631

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

Closed
YuanchengJiang opened this issue Oct 29, 2024 · 1 comment
Closed

Assertion failure in Zend/zend_vm_execute.h:2915 when JIT #16631

YuanchengJiang opened this issue Oct 29, 2024 · 1 comment

Comments

@YuanchengJiang
Copy link

Description

The following code:

<?php
namespace X;
$iterator =
new \RegexIterator(
new \ArrayIterator(['A.phpt', 'B.phpt', 'C.phpt']),
'/\.phpt$/'
)
;
foreach ($iterator as $foo) {
preg_replace('/\.phpt$/', '', '');
}

Resulted in this output:

Zend/zend_vm_execute.h:2915: int zend_fe_fetch_object_helper_SPEC(zend_execute_data *): Assertion `zval_get_type(&(*(array))) == 8' failed.
Aborted (core dumped)

while non-JIT:

To reproduce:

-d "opcache.jit_hot_func=1" -d "zend_extension=/php-src/modules/opcache.so" -d "opcache.enable_cli=1" -d "opcache.jit=1231"

PHP Version

nightly

Operating System

ubuntu 22.04

@nielsdos
Copy link
Member

This is a duplicate of your other report #15981
You can tell because:

  1. This is about frameless jmp
  2. The opline points to the wrong address; looking at the generated assembly confirms this issue
  3. Using the same hack as in that issue to reset the opline fixes the issue

@nielsdos nielsdos closed this as not planned Won't fix, can't repro, duplicate, stale Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants