Skip to content

Assertion failure at ext/opcache/jit/zend_jit_ir.c:721 of the new JIT #12585

Closed
@pfustc

Description

@pfustc

Description

Hi @dstogov,

I see one more assertion failure caused by the new JIT. It's reproducible on both x86 and AArch64.

php: ext/opcache/jit/zend_jit_ir.c:721: zend_jit_snapshot_handler: Assertion `t->stack_map[t->exit_info[exit_point].stack_offset + var].type == 4 || t->stack_map[t->exit_info[exit_point].stack_offset + var].type == 5' failed.
Aborted (core dumped)

To reproduce, just run make test as below.

make test TESTS="-d opcache.enable_cli=1 -d opcache.jit_buffer_size=16M -d opcache.jit=1152 ext/date/tests/DateTimePeriod_inherited_serialization.phpt"

Or run this script

<?php
class MyDatePeriod extends DatePeriod
{
    public function __construct(
        DateTimeInterface $start,
        DateInterval $interval,
        int $recurrences,
        int $options = 0,
        public ?bool $myProperty = null,
    ) {
        parent::__construct($start, $interval, $recurrences, $options);
    }
}

$d = new MyDatePeriod(new DateTimeImmutable(), new DateInterval("PT5S"), 5, myProperty: true);
?>

with below ini

zend.assertions=1
zend_extension=/home/work/php-src/modules/opcache.so
opcache.enable_cli=1
opcache.jit_buffer_size=16M
opcache.jit_hot_func=1
opcache.jit_hot_loop=1
opcache.jit_hot_return=1
opcache.jit_hot_side_exit=1
opcache.jit=1152

PHP Version

master @ 7fcbedd

Operating System

Ubuntu 22.04

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions