Commit cd9b9c37444 for php
commit cd9b9c37444591481c4537ffa18da6b2c778c863
Author: Ilija Tovilo <ilija.tovilo@me.com>
Date: Tue Nov 10 01:25:43 2026 +0100
Add padding to globals to maintain ABI compatibility when adding fields in patches
Closes GH-25356
diff --git a/NEWS b/NEWS
index e48b3dbc5d9..d701e02926f 100644
--- a/NEWS
+++ b/NEWS
@@ -109,6 +109,12 @@ PHP NEWS
. Fixed bug GH-15701 (Build failure: incompatible funopen() seeker pointer
type on 32-bit platforms). (Kamil Tekiela)
+12 Nov 2026, PHP 8.6.0RC6
+
+- Core:
+ . Fix potential ABI incompatibility when adding fields in patches by adding
+ padding to globals. (ilutov)
+
05 Nov 2026, PHP 8.6.0RC5
- Core:
diff --git a/Zend/zend_globals.h b/Zend/zend_globals.h
index c3034f8c8ed..81d04b5b159 100644
--- a/Zend/zend_globals.h
+++ b/Zend/zend_globals.h
@@ -169,6 +169,14 @@ struct _zend_compiler_globals {
#ifdef ZTS
uint32_t copied_functions_count;
#endif
+
+ /* Padding to maintain ABI compatibility for ZTS compile-time offsets. For
+ * supported versions, add fields to this nested struct. For master, move them
+ * to the top-level struct. */
+ union {
+ uint64_t padding[8];
+ // struct { Add here. };
+ };
};
@@ -339,6 +347,12 @@ struct _zend_executor_globals {
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
zend_oom_info delayed_oom;
+
+ /* See comment on zend_compiler_globals.padding. */
+ union {
+ uint64_t padding[8];
+ // struct { Add here. };
+ };
};
#ifdef ZTS