[php-src] master: Merge branch 'PHP-8.6'
| From: | ndossche | Date: | Wed, 25 Nov 2026 18:20:16 +0000 |
| Subject: | [php-src] master: Merge branch 'PHP-8.6' | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-144177@lists.php.net to get a copy of this message | ||
Author: ndossche (ndossche)
Date: 2026-11-25T19:19:52+01:00
Commit: https://github.com/php/php-src/commit/5701fc611ecb3bd39a2323804b1e1811afb45f4f
Raw diff: https://github.com/php/php-src/commit/5701fc611ecb3bd39a2323804b1e1811afb45f4f.diff
Merge branch 'PHP-8.6'
* PHP-8.6:
Fix GH-25746: array_column() crashes with JIT when the result for an empty array is modified
Changed paths:
A ext/standard/tests/array/gh25746.phpt
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:
diff --git a/Zend/Optimizer/zend_func_infos.h b/Zend/Optimizer/zend_func_infos.h
index 0c1d4e36b931..a4e516a366dd 100644
--- a/Zend/Optimizer/zend_func_infos.h
+++ b/Zend/Optimizer/zend_func_infos.h
@@ -391,7 +391,6 @@ static const func_info_t func_infos[] = {
FN("array_keys",
MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_LONG|MAY_BE_ARRAY_OF_STRING),
FN("array_values",
MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF),
F1("array_count_values",
MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_LONG),
- F1("array_column",
MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF),
F1("array_reverse",
MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF),
F1("array_flip",
MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_LONG|MAY_BE_ARRAY_OF_STRING),
F1("array_change_key_case",
MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF),
diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php
index c12e2e18fb19..ec0645720b8c 100644
--- a/ext/standard/basic_functions.stub.php
+++ b/ext/standard/basic_functions.stub.php
@@ -1741,7 +1741,6 @@ function array_count_values(array $array): array {}
/**
* @compile-time-eval
- * @refcount 1
*/
function array_column(array $array, int|string|null $column_key, int|string|null $index_key =
null): array {}
diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h
index 439da1fe5e98..62fe3f768665 100644
--- a/ext/standard/basic_functions_arginfo.h
+++ b/ext/standard/basic_functions_arginfo.h
@@ -1,5 +1,5 @@
/* This is a generated file, edit basic_functions.stub.php instead.
- * Stub hash: b575a60521fe744a28cca59872a20baf5f64a798
+ * Stub hash: 53d47cfb46b55f62340f435b4637de62c4d0b531
* Has decl header: yes */
#include "zend_attributes.h"
diff --git a/ext/standard/basic_functions_decl.h b/ext/standard/basic_functions_decl.h
index 027fd983133d..a7614da39591 100644
--- a/ext/standard/basic_functions_decl.h
+++ b/ext/standard/basic_functions_decl.h
@@ -1,8 +1,8 @@
/* This is a generated file, edit basic_functions.stub.php instead.
- * Stub hash: b575a60521fe744a28cca59872a20baf5f64a798 */
+ * Stub hash: 53d47cfb46b55f62340f435b4637de62c4d0b531 */
-#ifndef ZEND_BASIC_FUNCTIONS_DECL_b575a60521fe744a28cca59872a20baf5f64a798_H
-#define ZEND_BASIC_FUNCTIONS_DECL_b575a60521fe744a28cca59872a20baf5f64a798_H
+#ifndef ZEND_BASIC_FUNCTIONS_DECL_53d47cfb46b55f62340f435b4637de62c4d0b531_H
+#define ZEND_BASIC_FUNCTIONS_DECL_53d47cfb46b55f62340f435b4637de62c4d0b531_H
typedef enum zend_enum_SortDirection {
ZEND_ENUM_SortDirection_Ascending = 1,
@@ -20,4 +20,4 @@ typedef enum zend_enum_RoundingMode {
ZEND_ENUM_RoundingMode_PositiveInfinity = 8,
} zend_enum_RoundingMode;
-#endif /* ZEND_BASIC_FUNCTIONS_DECL_b575a60521fe744a28cca59872a20baf5f64a798_H */
+#endif /* ZEND_BASIC_FUNCTIONS_DECL_53d47cfb46b55f62340f435b4637de62c4d0b531_H */
diff --git a/ext/standard/tests/array/gh25746.phpt b/ext/standard/tests/array/gh25746.phpt
new file mode 100644
index 000000000000..02d88576dfff
--- /dev/null
+++ b/ext/standard/tests/array/gh25746.phpt
@@ -0,0 +1,24 @@
+--TEST--
+GH-25746: array_column() crashes with JIT when the result for an empty array is modified
+--EXTENSIONS--
+opcache
+--INI--
+opcache.enable=1
+opcache.enable_cli=1
+opcache.jit=function
+opcache.jit_buffer_size=64M
+opcache.file_update_protection=0
+--FILE--
+<?php
+function test(array $rows) {
+ $ids = array_column($rows, "id");
+ $ids[] = 1;
+ return $ids;
+}
+var_dump(test([]));
+?>
+--EXPECT--
+array(1) {
+ [0]=>
+ int(1)
+}