Skip to content

Assertion failure in Zend/zend_operators.c:2708 #16186

Closed
@YuanchengJiang

Description

@YuanchengJiang

Description

The following code:

<?php
$o = new stdClass();
$fusion = $o;
class A {
private $x;
public function getIncrementor() {
return function() { return ++$this->x; };
}
}
$a = new A(0);
$ca = $a->getIncrementor();
$cb2 = Closure::bind($ca, $fusion);
var_dump($cb2());

Resulted in this output:

/php-src/Zend/zend_operators.c:2708: zend_result increment_function(zval *): Assertion `0' failed.
Aborted (core dumped)

To reproduce:

-d "opcache.jit_hot_func=1" -d "zend_extension=/php-src/modules/opcache.so" -d "opcache.enable_cli=1" -d "opcache.jit=0234"

PHP Version

PHP 8.4.0-dev

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