[php-src] master: Merge branch 'PHP-8.3'

From: Date: Mon, 11 Mar 2024 14:31:03 +0000
Subject: [php-src] master: Merge branch 'PHP-8.3'
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-127701@lists.php.net to get a copy of this message
Author: Arnaud Le Blanc (arnaud-lb) Date: 2024-03-11T15:15:36+01:00 Commit: https://github.com/php/php-src/commit/ef8dcbda4968aac87b797eb3536fb0845370d3ea Raw diff: https://github.com/php/php-src/commit/ef8dcbda4968aac87b797eb3536fb0845370d3ea.diff Merge branch 'PHP-8.3' * PHP-8.3: [ci skip] NEWS [ci skip] NEWS Fix GH-13508: JITed QM_ASSIGN may be optimized out when op1 is null (#13610) Changed paths: A ext/opcache/tests/jit/qm_assign_004.phpt M ext/opcache/jit/zend_jit_trace.c Diff: diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 5ccea0149bc7f..1bb5f8e8daf6c 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -2881,7 +2881,7 @@ static zend_jit_reg_var* zend_jit_trace_allocate_registers(zend_jit_trace_rec *t RA_IVAL_DEL(ssa_op->op1_use); count--; } else if (!zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op1_use)) { - zend_jit_trace_use_var(idx, ssa_op->op1_use, ssa_op->op1_def, ssa_op->op1_use_chain, + zend_jit_trace_use_var(idx, ssa_op->op1_use, ssa_op->op1_def, ssa_op->op1_use_chain, ra, ssa, ssa_opcodes, op_array, op_array_ssa); if (opline->op1_type != IS_CV) { diff --git a/ext/opcache/tests/jit/qm_assign_004.phpt b/ext/opcache/tests/jit/qm_assign_004.phpt new file mode 100644 index 0000000000000..975d46be41cec --- /dev/null +++ b/ext/opcache/tests/jit/qm_assign_004.phpt @@ -0,0 +1,39 @@ +--TEST-- +JIT QM_ASSIGN: 004 missing type store +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.file_update_protection=0 +opcache.jit_buffer_size=1M +--FILE-- +<?php + +function getPropertyScopes($props, $flags): array +{ + $propertyScopes = []; + foreach ($props as $prop) { + $tmp = 'x'.$flags; + $propertyScopes[] = $propertyScopes[] = ($flags & 1 ? false : null) . ''; + } + + return $propertyScopes; +} + +var_dump(getPropertyScopes(['a'], 0)); +var_dump(getPropertyScopes(['a'], 0)); +?> +DONE +--EXPECT-- +array(2) { + [0]=> + string(0) "" + [1]=> + string(0) "" +} +array(2) { + [0]=> + string(0) "" + [1]=> + string(0) "" +} +DONE

« previous php.cvs (#127701) next »