History log of /PHP-8.1/ext/standard/tests/streams/bug78902.phpt (Results 1 – 3 of 3)
Revision Date Author Comments
# 3a4ea6cb 30-May-2021 Peter van Dommelen

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
automa

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
https://github.com/php/php-src/commit/fcc0fdd125fdb9e1713f91d027fe07d680a0cf36

show more ...


# 67421a78 16-Dec-2019 liudaixiao

Fixed bug #78902


# f720fb1e 04-Dec-2019 Léopold Jacquot

Add unit test for bug #78902