[php-src] Issue #12585: Assertion failure at ext/opcache/jit/zend_jit_ir.c:721 of the new JIT

From: Date: Wed, 01 Nov 2023 09:25:23 +0000
Subject: [php-src] Issue #12585: Assertion failure at ext/opcache/jit/zend_jit_ir.c:721 of the new JIT
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-245709@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/12585 Author: 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 @ https://github.com/php/php-src/commit/7fcbedd7df0302c38149d65ce860c00666f38236 ### Operating System Ubuntu 22.04

« previous php.bugs (#245709) next »