mirror of
https://github.com/php/php-src.git
synced 2024-09-21 01:47:25 +00:00
Fix GH-15821: Core dumped in Zend/Optimizer/zend_inference.c:4062
This commit is contained in:
parent
025ed70ce3
commit
7c8b3b2c96
@ -4056,11 +4056,11 @@ static zend_always_inline zend_result _zend_update_type_info(
|
||||
fprintf(stderr, "Missing op2 type inference for opcode %s, line %d\n", zend_get_opcode_name(opline->opcode), opline->lineno);
|
||||
}
|
||||
#endif
|
||||
unknown_opcode:
|
||||
if (ssa_op->op1_def >= 0) {
|
||||
tmp = MAY_BE_ANY | MAY_BE_REF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
|
||||
UPDATE_SSA_TYPE(tmp, ssa_op->op1_def);
|
||||
}
|
||||
unknown_opcode:
|
||||
if (ssa_op->result_def >= 0) {
|
||||
tmp = MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
|
||||
if (opline->result_type == IS_TMP_VAR) {
|
||||
|
20
ext/opcache/tests/jit/gh15821.phpt
Normal file
20
ext/opcache/tests/jit/gh15821.phpt
Normal file
@ -0,0 +1,20 @@
|
||||
--TEST--
|
||||
GH-15821 (Core dumped in Zend/Optimizer/zend_inference.c:4062)
|
||||
--EXTENSIONS--
|
||||
opcache
|
||||
--INI--
|
||||
opcache.jit=1203
|
||||
opcache.jit_buffer_size=64M
|
||||
--FILE--
|
||||
<?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;
|
||||
});
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
Done
|
Loading…
Reference in New Issue
Block a user