[php-src] master: Add padding to globals to maintain ABI compatibility when adding fields in patches
| From: | Ilija Tovilo | Date: | Tue, 10 Nov 2026 12:29:15 +0000 |
| Subject: | [php-src] master: Add padding to globals to maintain ABI compatibility when adding fields in patches | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-143529@lists.php.net to get a copy of this message | ||
Author: Ilija Tovilo (iluuu1994)
Date: 2026-11-10T13:27:31+01:00
Commit: https://github.com/php/php-src/commit/cd9b9c37444591481c4537ffa18da6b2c778c863
Raw diff: https://github.com/php/php-src/commit/cd9b9c37444591481c4537ffa18da6b2c778c863.diff
Add padding to globals to maintain ABI compatibility when adding fields in patches
Closes GH-25356
Changed paths:
M NEWS
M Zend/zend_globals.h
Diff:
diff --git a/NEWS b/NEWS
index e48b3dbc5d93..d701e02926f8 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 c3034f8c8edc..81d04b5b1596 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