mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
Bug #80447 (Strange out of memory error when running with JIT)
This commit is contained in:
parent
8ad2b59e12
commit
1674c96c0b
1
NEWS
1
NEWS
@ -25,6 +25,7 @@ PHP NEWS
|
||||
. Fixed bug #80377 (Opcache misses executor_globals). (Nikita)
|
||||
. Fixed bug #80433 (Unable to disable the use of the AVX command when using
|
||||
JIT). (Nikita)
|
||||
. Bug #80447 (Strange out of memory error when running with JIT). (Dmitry)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #80368 (OpenSSL extension fails to build against LibreSSL due to
|
||||
|
@ -3662,7 +3662,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
|
||||
|
||||
zend_jit_label(&dasm_state, 0); /* start of of trace loop */
|
||||
|
||||
if (ra && trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP) {
|
||||
if (ra) {
|
||||
zend_ssa_phi *phi = ssa->blocks[1].phis;
|
||||
|
||||
while (phi) {
|
||||
|
34
ext/opcache/tests/jit/bug80447.phpt
Normal file
34
ext/opcache/tests/jit/bug80447.phpt
Normal file
@ -0,0 +1,34 @@
|
||||
--TEST--
|
||||
Bug #80447 (Strange out of memory error when running with JIT)
|
||||
--INI--
|
||||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
opcache.file_update_protection=0
|
||||
opcache.jit_buffer_size=1M
|
||||
opcache.protect_memory=1
|
||||
--SKIPIF--
|
||||
<?php require_once('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
function createTree($depth) {
|
||||
if (!$depth) {
|
||||
return [null, null];
|
||||
}
|
||||
$depth--;
|
||||
|
||||
return [
|
||||
createTree($depth),
|
||||
createTree($depth)
|
||||
];
|
||||
}
|
||||
|
||||
function checkTree($treeNode) {
|
||||
return 1
|
||||
+ ($treeNode[0][0] === null ? 1 : checkTree($treeNode[0]))
|
||||
+ ($treeNode[1][0] === null ? 1 : checkTree($treeNode[1]));
|
||||
}
|
||||
|
||||
$tree = createTree(12);
|
||||
var_dump(checkTree($tree));
|
||||
--EXPECT--
|
||||
int(8191)
|
Loading…
Reference in New Issue
Block a user