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

From: Date: Thu, 22 Oct 2026 13:01:27 +0000
Subject: [php-src] master: Merge branch 'PHP-8.6'
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-142570@lists.php.net to get a copy of this message
Author: ndossche (ndossche) Date: 2026-10-22T15:01:10+02:00 Commit: https://github.com/php/php-src/commit/ef8d77b3bd183f2363ae550b9a77228e81ccb5c7 Raw diff: https://github.com/php/php-src/commit/ef8d77b3bd183f2363ae550b9a77228e81ccb5c7.diff Merge branch 'PHP-8.6' * PHP-8.6: Tracing JIT: give the type guard on entry of an inlined call an exit opline Changed paths: A ext/opcache/tests/jit/gh24389.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 04f312c906ee..c7c10dfb44bc 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -6978,7 +6978,7 @@ static zend_vm_opcode_handler_t zend_jit_trace(zend_jit_trace_rec *trace_buffer, ssa->var_info[j].type &= ~MAY_BE_GUARD; op_type = concrete_type(ssa->var_info[j].type); - if (!zend_jit_type_guard(&ctx, NULL, EX_NUM_TO_VAR(i), op_type)) { + if (!zend_jit_type_guard(&ctx, (p+1)->opline, EX_NUM_TO_VAR(i), op_type)) { goto jit_failure; } SET_STACK_TYPE(stack, i, op_type, 1); diff --git a/ext/opcache/tests/jit/gh24389.phpt b/ext/opcache/tests/jit/gh24389.phpt new file mode 100644 index 000000000000..8c8d5725f614 --- /dev/null +++ b/ext/opcache/tests/jit/gh24389.phpt @@ -0,0 +1,30 @@ +--TEST-- +GH-24389 (Tracing JIT: type guard on entry of an inlined call exits with an uninitialized opline) +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.file_update_protection=0 +opcache.jit_buffer_size=64M +opcache.jit=tracing +--EXTENSIONS-- +opcache +--FILE-- +<?php +function right($x, $y) { + $a = $x + $y; + return $x - $y; +} +function driver($x, $y) { + $xr = &$x; + $yr = &$y; + for ($i = 0; $i < 300; $i++) { + $r = right($x, $y); + } + return $r; +} +var_dump(driver(3, 2)); +var_dump(driver(3.5, 2.5)); +?> +--EXPECT-- +int(1) +float(1)

« previous php.cvs (#142570) next »