[php-src] Issue #12584: Assertion `ctx->control' failed with new JIT and CALL VM
Issue: https://github.com/php/php-src/issues/12584
Author: pfustc
### Description
Hi @dstogov,
```
php: /tmp/php-src/ext/opcache/jit/ir/ir.c:2093: _ir_RETURN: Assertion `ctx->control' failed.
```
This is another assertion failure issue I see after the integration of the new JIT. It's
reproducible with CALL VM and GCC global regs **disabled** on both x86 and AArch64. Please see below
steps for details.
**1. Checkout and build PHP with some configurations**
```
$ cd /tmp
$ git clone git@github.com:php/php-src.git
$ cd php-src
$ php Zend/zend_vm_gen.php --with-vm-kind=CALL
$ bash buildconf
$ bash configure --enable-bcmath --enable-calendar --enable-dba --enable-debug --enable-exif \
--enable-fpm --enable-ftp --enable-gd --enable-intl --enable-mbstring
--enable-option-checking=fatal \
--enable-pcntl --enable-phpdbg --enable-shmop --enable-soap --enable-sockets --enable-sysvmsg \
--enable-sysvsem --enable-xmlreader --enable-zend-test --with-mysqli=mysqlnd
--with-pdo-mysql=mysqlnd \
--disable-gcc-global-regs
$ make
```
**2. Checkout and build Laravel**
```
$ cd /tmp
$ git clone https://github.com/laravel/framework.git
$ cd framework
$ composer install
```
**3. Run Laravel tests with the PHP we just build**
```
$ cd /tmp/framework
$ /tmp/php-src/sapi/cli/php -d zend_extension=/tmp/php-src/modules/opcache.so -d \
opcache.jit_buffer_size=128M -d opcache.enable_cli=1 vendor/bin/phpunit
PHPUnit 10.4.2 by Sebastian Bergmann and contributors.
Runtime: PHP 8.4.0-dev
Configuration: /tmp/framework/phpunit.xml.dist
............................................................. 61 / 9139 ( 0%)
............................................................. 122 / 9139 ( 1%)
............................................................. 183 / 9139 ( 2%)
............................................................. 244 / 9139 ( 2%)
............................................................. 305 / 9139 ( 3%)
............................................................. 366 / 9139 ( 4%)
...........................................................php:
/tmp/php-src/ext/opcache/jit/ir/ir.c:2093: _ir_RETURN: Assertion `ctx->control' failed.
Aborted (core dumped)
```
### PHP Version
master @ https://github.com/php/php-src/commit/7fcbedd7df0302c38149d65ce860c00666f38236
### Operating System
Ubuntu 22.04
Thread (1 message)
- pfustc