Commit 94c4be9d2fd for php
commit 94c4be9d2fdba54638d9e7709aace2d7e45d7bc7
Merge: 67fb87b3517 8bd690e20ec
Author: Ilia Alshanetsky <ilia@ilia.ws>
Date: Fri Dec 4 15:05:12 2026 -0500
Merge branch 'PHP-8.5' into PHP-8.6
* PHP-8.5:
ext/odbc: Free results when their last reference is dropped
diff --cc NEWS
index 11708cfe2c0,a8f6318dcde..f5bb1188fac
--- a/NEWS
+++ b/NEWS
@@@ -9,11 -9,13 +9,15 @@@ PH
- Intl:
. Fixed Locale::isRightToLeft() and locale_is_right_to_left() retaining a
stale global intl error after a successful call. (ChrisAbner)
- . Fixed NULL pointer dereference in IntlListFormatter::format() on an
- unconstructed object. (hohphu8)
+ - ODBC:
+ . Fixed bug GH-26053 (Odbc\Result not freed when its last reference is
+ dropped). (merrillh, Ilia Alshanetsky)
+
+- Opcache:
+ . Fixed segfault when array_map() is called with a first-class callable and
+ an array that becomes constant only after optimization. (Pawel Wankiewicz)
+
- Opcache:
. Fixed type inference of JIT trace after FE_FETCH_R[W] with identical
branches. (ilutov, Arnaud)
diff --cc ext/odbc/php_odbc.c
index e10d60d64cb,455026a9f4c..70441e4f3c3
--- a/ext/odbc/php_odbc.c
+++ b/ext/odbc/php_odbc.c
@@@ -81,10 -84,12 +81,9 @@@ static void odbc_insert_new_result(odbc
res->index = connection->results.nNextFreeElement;
zend_hash_index_add_new(&connection->results, res->index, result);
- Z_ADDREF_P(result);
}
-static inline odbc_link *odbc_link_from_obj(zend_object *obj)
-{
- return (odbc_link *)((char *)(obj) - XtOffsetOf(odbc_link, std));
-}
+#define odbc_link_from_obj(obj) ZEND_CONTAINER_OF(obj, odbc_link, std)
static int _close_pconn_with_res(zval *zv, void *p)
{