8000 bug #44327 [Debug][ErrorHandler] Increased the reserved memory from 1… · symfony/symfony@cacce1c · GitHub
[go: up one dir, main page]

Skip to content

Commit cacce1c

Browse files
committed
bug #44327 [Debug][ErrorHandler] Increased the reserved memory from 10k to 32k (sakalys)
This PR was merged into the 4.4 branch. Discussion ---------- [Debug][ErrorHandler] Increased the reserved memory from 10k to 32k | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #40824 | License | MIT | Doc PR | n/a The ErrorHandler's job includes handling out of memory (OOM) exceptions, therefore it is important that that feature works. In the current state, when handling OOM exceptions, the error handler produces an OOM error itself, because the old 10kB reserve is apparently not enough anymore. To mitigate that, the reserved memory gets bumped to 32k (which is enough). *Note* I'm not familiar with the whole open source submitting process, so any feedback and instructions on how to improve this PR are welcome. I am not sure on how to write a unit test to test something like that (talking about the issue here #40824). Commits ------- cbac313 Increased the reserved memory from 10k to 32k
2 parents f86c557 + cbac313 commit cacce1c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Component/Debug/ErrorHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class ErrorHandler
119119
public static function register(self $handler = null, $replace = true)
120120
{
121121
if (null === self::$reservedMemory) {
122-
self::$reservedMemory = str_repeat('x', 10240);
122+
self::$reservedMemory = str_repeat('x', 32768);
123123
register_shutdown_function(__CLASS__.'::handleFatalError');
124124
}
125125

src/Symfony/Component/ErrorHandler/ErrorHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class ErrorHandler
111111
public static function register(self $handler = null, bool $replace = true): self
112112
{
113113
if (null === self::$reservedMemory) {
114-
self::$reservedMemory = str_repeat('x', 10240);
114+
self::$reservedMemory = str_repeat('x', 32768);
115115
register_shutdown_function(__CLASS__.'::handleFatalError');
116116
}
117117

0 commit comments

Comments
 (0)
0