Skip to content

Assertion failure in Zend/zend_vm_execute.h:2915 #16412

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 13, 2024 · 2 comments
Closed

Assertion failure in Zend/zend_vm_execute.h:2915 #16412

YuanchengJiang opened this issue Oct 13, 2024 · 2 comments

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) {
    var_dump($foo);
    preg_replace('/\.phpt$/', '', '');
}
echo "Done", PHP_EOL;
echo preg_match('/a{1,3}b/U', 'ab');
echo(1);
?>

Resulted in this output:

php: 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)

To reproduce:

-d "zend_extension=/php-src/modules/opcache.so" -d "opcache.enable=1" -d "opcache.enable_cli=1" -d "opcache.jit=1111"

PHP Version

nightly

Operating System

ubuntu 22.04

@iluuu1994
Copy link
Member

This can be simplified to:

namespace X;

preg_replace('/\.phpt$/', '', '');

It's caused by frameless calls. Hence, possibly related to #15981.

@nielsdos
Copy link
Member

Yes, I can confirm by inspecting the assembly that the assembly code is missing the necessary opline store is missing in the executed successor block. Forcing the store to happen always does indeed fix the problem. So this is a duplicate of #15981.

@nielsdos nielsdos closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 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

4 participants