[php-src] Issue #15821: Core dumped in Zend/Optimizer/zend_inference.c:4062
| From: | YuanchengJiang | Date: | Tue, 10 Sep 2024 05:32:42 +0000 |
| Subject: | [php-src] Issue #15821: Core dumped in Zend/Optimizer/zend_inference.c:4062 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-247739@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/15821
Author: YuanchengJiang
### Description
The following code:
```php
<?php
$allInternalFunctions = array();
$definedFunctions = get_defined_functions();
$internalFunctions = $definedFunctions['internal'];
$allInternalFunctions = array_merge($allInternalFunctions, $internalFunctions);
$allInternalFunctions = array_filter($allInternalFunctions, function($func) {
strpos($func, 'posix_') !== 0;
});
?>
```
Resulted in this output:
```
/php-src/Zend/Optimizer/zend_inference.c:4062: zend_result _zend_update_type_info(const
zend_op_array *, zend_ssa *, const zend_script *, zend_bitset, const zend_op *, zend_ssa_op *, const
zend_op **, zend_long, _Bool): Assertion `ssa_opcodes != ((void*)0) || __ssa_var->var >=
op_array->last_var || (ssa_var_info[__var].type & (1 << 10)) == (__type & (1
<< 10))' failed.
Aborted (core dumped)
```
To reproduce:
```
-d "extension_dir=/php-src/modules/" -d
"zend_extension=/php-src/modules/opcache.so" -d "opcache.enable=1" -d
"opcache.enable_cli=1" -d "opcache.jit=1033"
```
### PHP Version
PHP 8.4.0-dev
### Operating System
ubuntu 22.04