1
0
mirror of https://github.com/php/php-src.git synced 2026-04-03 06:02:23 +02:00
Commit Graph

10 Commits

Author SHA1 Message Date
Nikita Popov
e9b005158f Fix output buffer discard on memory limit
Move this code directly into the error handler, and check the
heap->overflow flag. Discarding output here allows us to print
the normal memory limit message to standard output. Otherwise
nothing would be printed unless a different log medium was used,
which makes for a suboptimal debugging experience.
2021-05-31 16:30:36 +02:00
Peter van Dommelen
3a4ea6cb91 Don't automatically adjust memory_limit to 2M
As PHP has a minimum memory usage of 2M (size of allocator chunk),
setting a limit below that value is not meaningful and will be
automatically rounded up to the chunk size. Rather than doing this
silently, show the newly introduced error message.

The memory limit had to be increased to 2M for a number of tests.

tests/lang/bug45392 has been marked as XFAIL. This old bugfix is
not working as intended. The memory limit in main's `PG(memory_limit)`
differs from the one in zend_alloc. In zend_alloc the `AG(mm_heap)->limit`
is defined as `max(passed_value, ZEND_MM_CHUNK_SIZE)`. The check made in
an unclean shutdown will never be true unless the memory limit is lower
than ZEND_MM_CHUNK_SIZE, which happened to be the case in the test.
https://bugs.php.net/bug.php?id=45392
fcc0fdd125
2021-05-31 15:42:10 +02:00
Gabriel Caruso
9c144e0d82 Trim trailing whitespace in tests 2018-10-14 12:07:20 -03:00
Xinchen Hui
880a6cee00 Skip test while zend mm is disabled 2012-07-29 13:25:31 +08:00
Joey Smith
ec5b65473b Revert my previous change - getting different results in different environments, shouldn't have committed it 2011-08-24 16:15:35 +00:00
Joey Smith
864774c5b2 Fix tests/lang/bug45392.phpt to log expected error when run with -n flag 2011-08-24 15:56:12 +00:00
Jani Taskinen
782644535f MFH 2009-05-07 13:47:43 +00:00
Jani Taskinen
da7302f792 MFH 2009-05-07 13:44:23 +00:00
Arnaud Le Blanc
f5b2818225 MFH: fixed test 2008-12-09 22:53:42 +00:00
Arnaud Le Blanc
f59fbc3755 MFH: Fixed bug #45392 (ob_start()/ob_end_clean() and memory_limit). 2008-08-18 04:08:17 +00:00