-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
33 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--TEST-- | ||
Bug #76846: Segfault in shutdown function after memory limit error | ||
--INI-- | ||
memory_limit=33M | ||
--SKIPIF-- | ||
<?php | ||
$zend_mm_enabled = getenv("USE_ZEND_ALLOC"); | ||
if ($zend_mm_enabled === "0") { | ||
die("skip Zend MM disabled"); | ||
} | ||
?> | ||
--FILE-- | ||
<?php | ||
|
||
register_shutdown_function(function() { | ||
new stdClass; | ||
}); | ||
|
||
$ary = []; | ||
while (true) { | ||
$ary[] = new stdClass; | ||
} | ||
|
||
?> | ||
--EXPECTF-- | ||
Fatal error: Allowed memory size of %d bytes exhausted at %s:%d (tried to allocate %d bytes) in %s on line %d | ||
%A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters