[php-src] master: ext/standard: Fix refcount info for set_include_path()
| From: | Ilia Alshanetsky | Date: | Thu, 19 Nov 2026 23:37:51 +0000 |
| Subject: | [php-src] master: ext/standard: Fix refcount info for set_include_path() | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-143941@lists.php.net to get a copy of this message | ||
Author: Ilia Alshanetsky (iliaal)
Date: 2026-11-19T18:31:45-05:00
Commit: https://github.com/php/php-src/commit/195a8fd2db306dbec498500c59e3ffd26cafacdc
Raw diff: https://github.com/php/php-src/commit/195a8fd2db306dbec498500c59e3ffd26cafacdc.diff
ext/standard: Fix refcount info for set_include_path()
Since cd753007ce1, set_include_path() returns the previous include_path INI
string with an added reference instead of a copy. That string is the one
passed to the earlier set_include_path() call, so the result can be shared
with the caller's variable, with values read through get_include_path() or
ini_get(), and with the INI entry itself. The stub still declared
@refcount 1, which lets function JIT and hot tracing JIT destroy a discarded
result without checking its refcount and free a string that is still in use.
Drop the annotation, as ecb90c1db7e did for get_include_path(). The other
@refcount 1 functions touched by cd753007ce1 still return fresh values.
Closes GH-25607
Changed paths:
A ext/standard/tests/general_functions/set_include_path_jit_refcount.phpt
M NEWS
M Zend/Optimizer/zend_func_infos.h
M ext/standard/basic_functions.stub.php
M ext/standard/basic_functions_arginfo.h
M ext/standard/basic_functions_decl.h
Diff: