Skip to content

Commit 027add9

Browse files
committed
[ci skip] UPGRADING
1 parent 0ff4a9a commit 027add9

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

UPGRADING

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ PHP 8.3 UPGRADE NOTES
1919
1. Backward Incompatible Changes
2020
========================================
2121

22+
- Core:
23+
. Programs that were very close to overflowing the call stack may now throw an
24+
Error when using more than
25+
`zend.max_allowed_stack_size-zend.reserved_stack_size` bytes of stack
26+
(`fiber.stack_size-zend.reserved_stack_size` for fibers).
27+
2228
========================================
2329
2. New Features
2430
========================================
@@ -104,6 +110,26 @@ PHP 8.3 UPGRADE NOTES
104110
11. Changes to INI File Handling
105111
========================================
106112

113+
- zend.max_allowed_stack_size
114+
. New INI directive to set the maximum allowed stack size. Possible
115+
values are `0` (detect the process or thread maximum stack size), `-1`
116+
(no limit), or a positive number of bytes. The default is `0`. When it
117+
is not possible to detect the the process or thread maximum stack size,
118+
a known system default is used. Setting this value too high has the same
119+
effect as disabling the stack size limit. Fibers use fiber.stack_size
120+
as maximum allowed stack size. An Error is thrown when the process call
121+
stack exceeds `zend.max_allowed_stack_size-zend.reserved_stack_size`
122+
bytes, to prevent stack-overflow-induced segmentation faults, with
123+
the goal of making debugging easier. The stack size increases during
124+
uncontrolled recursions involving internal functions or the magic methods
125+
__toString, __clone, __sleep, __destruct. This is not related to stack
126+
buffer overflows, and is not a security feature.
127+
128+
- zend.reserved_stack_size
129+
. New INI directive to set the reserved stack size, in bytes. This is
130+
subtracted from the max allowed stack size, as a buffer, when checking the
131+
stack size.
132+
107133
========================================
108134
12. Windows Support
109135
========================================
@@ -112,6 +138,13 @@ PHP 8.3 UPGRADE NOTES
112138
13. Other Changes
113139
========================================
114140

141+
- Core:
142+
. An Error is now thrown when the process call stack exceeds a certain size,
143+
to prevent stack-overflow-induced segmentation faults, with the goal of
144+
making debugging easier. The maximum allowed stack size is controlled
145+
by the INI directives zend.max_allowed_stack_size, zend.reserved_stack_size,
146+
and fiber.stack_size.
147+
115148
- FFI:
116149
. FFI::load() is now allowed during preloading when opcache.preload_user is the
117150
current system user. Previously, calling FFI::load() was not possible during

0 commit comments

Comments
 (0)