Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Zend/tests/bug70258.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
Bug #70258 (Segfault if do_resize fails to allocated memory)
--INI--
memory_limit=2M
memory_limit=4M
--SKIPIF--
<?php
if (PHP_OS_FAMILY === 'Windows') {
Expand All @@ -28,4 +28,4 @@ $a = new A;
$a->core();
?>
--EXPECTF--
Fatal error: Allowed memory size of 2097152 bytes exhausted%s(tried to allocate %d bytes) in %s on line %d
Fatal error: Allowed memory size of 4194304 bytes exhausted%s(tried to allocate %d bytes) in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/closures/gh12073.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function test() {
};
}

ini_set('memory_limit', '2M');
ini_set('memory_limit', '4M');

$array = [];
for ($i = 0; $i < 10_000; $i++) {
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/fibers/out-of-memory-in-fiber.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
Out of Memory in a fiber
--INI--
memory_limit=2M
memory_limit=4M
--SKIPIF--
<?php
if (getenv("USE_ZEND_ALLOC") === "0") {
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/fibers/out-of-memory-in-nested-fiber.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
Out of Memory in a nested fiber
--INI--
memory_limit=2M
memory_limit=4M
--SKIPIF--
<?php
if (getenv("USE_ZEND_ALLOC") === "0") {
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/fibers/out-of-memory-in-recursive-fiber.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
Out of Memory from recursive fiber creation
--INI--
memory_limit=2M
memory_limit=4M
--SKIPIF--
<?php
if (getenv("USE_ZEND_ALLOC") === "0") {
Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/gh11189_1.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if (PHP_OS_FAMILY === 'Windows') {
if (getenv("USE_ZEND_ALLOC") === "0") die("skip ZMM is disabled");
?>
--INI--
memory_limit=2M
memory_limit=4M
--FILE--
<?php

Expand All @@ -29,4 +29,4 @@ while (1) {

?>
--EXPECTF--
Fatal error: Allowed memory size of 2097152 bytes exhausted %S(tried to allocate %d bytes) in %s on line %d
Fatal error: Allowed memory size of 4194304 bytes exhausted %S(tried to allocate %d bytes) in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/new_oom.inc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

$mb_used = (int) ceil(memory_get_usage() / (1024 ** 2));
$mb_used = (int) ceil(memory_get_usage(true) / (1024 ** 2));
ini_set('memory_limit', ($mb_used + 1) . 'M');

$class = $argv[1];
Expand Down
6 changes: 4 additions & 2 deletions Zend/tests/oom_SplFixedArray___wakeup.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
--TEST--
OOM SplFixedArray::fromArray() 003
--SKIPIF--
<?php if (PHP_INT_SIZE != 8) die("skip 64bit only"); ?>
--INI--
memory_limit=16M
memory_limit=17M
--FILE--
<?php

Expand All @@ -18,4 +20,4 @@ $a->__wakeup();
--EXPECTF--
Deprecated: Method SplFixedArray::__wakeup() is deprecated since 8.4, this method is obsolete, as serialization hooks are provided by __unserialize() and __serialize() in %s on line %d

Fatal error: Allowed memory size of 16777216 bytes exhausted %S(tried to allocate %d bytes) in %s on line 10
Fatal error: Allowed memory size of 17825792 bytes exhausted %S(tried to allocate %d bytes) in %s on line 10
4 changes: 2 additions & 2 deletions Zend/tests/oom_SplFixedArray_fromArray_002.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
OOM SplFixedArray::fromArray() 002
--INI--
memory_limit=10M
memory_limit=11M
--FILE--
<?php

Expand All @@ -11,4 +11,4 @@ SplFixedArray::fromArray($array, false);

?>
--EXPECTF--
Fatal error: Allowed memory size of 10485760 bytes exhausted %S(tried to allocate %d bytes) in %s on line 5
Fatal error: Allowed memory size of 11534336 bytes exhausted %S(tried to allocate %d bytes) in %s on line 5
4 changes: 2 additions & 2 deletions Zend/tests/oom_json_decode_001.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
OOM json_decode() array
--INI--
memory_limit=10M
memory_limit=12M
--FILE--
<?php

Expand All @@ -11,4 +11,4 @@ var_dump(json_decode($json));

?>
--EXPECTF--
Fatal error: Allowed memory size of 10485760 bytes exhausted %S(tried to allocate %d bytes) in %s on line 5
Fatal error: Allowed memory size of 12582912 bytes exhausted %S(tried to allocate %d bytes) in %s on line 5
4 changes: 2 additions & 2 deletions Zend/tests/oom_json_decode_002.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
OOM json_decode() nested arrays
--INI--
memory_limit=10M
memory_limit=12M
--FILE--
<?php

Expand All @@ -12,4 +12,4 @@ var_dump(json_decode($json, depth: $depth+2));

?>
--EXPECTF--
Fatal error: Allowed memory size of 10485760 bytes exhausted %S(tried to allocate %d bytes) in %s on line 6
Fatal error: Allowed memory size of 12582912 bytes exhausted %S(tried to allocate %d bytes) in %s on line 6
4 changes: 2 additions & 2 deletions Zend/tests/oom_json_decode_007.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
OOM json_decode() empty objects
--INI--
memory_limit=10M
memory_limit=12M
--FILE--
<?php

Expand All @@ -11,4 +11,4 @@ var_dump(json_decode($json));

?>
--EXPECTF--
Fatal error: Allowed memory size of 10485760 bytes exhausted %S(tried to allocate %d bytes) in %s on line 5
Fatal error: Allowed memory size of 12582912 bytes exhausted %S(tried to allocate %d bytes) in %s on line 5
4 changes: 2 additions & 2 deletions Zend/tests/shutdown_functions/object_gc_in_shutdown.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
Bug object gc not working in shutdown
--FILE--
<?php
ini_set('memory_limit', '2M');
ini_set('memory_limit', '4M');
register_shutdown_function(function () {
for ($n = 1000 * 1000; $n--;) {
for ($n = 2 * 1000 * 1000; $n--;) {
new stdClass;
}
echo "OK\n";
Expand Down
Loading
Loading