Skip to content

Assertion `ctx->control' failed with new JIT and CALL VM #12584

Closed
@pfustc

Description

@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 [email protected]: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 @ 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