1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/bz2/tests/gh20620.phpt
Ilija Tovilo c6ad84fb9e Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Add RUN_RESOURCE_HEAVY_TESTS env var
2026-02-27 15:04:24 +01:00

23 lines
559 B
PHP

--TEST--
Bug GH-20620 (bzcompress with large source)
--EXTENSIONS--
bz2
--SKIPIF--
<?php
if (!getenv('RUN_RESOURCE_HEAVY_TESTS')) die('skip resource-heavy test');
if (PHP_INT_SIZE != 8) die('skip this test is for 64bit platforms only');
if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
?>
--INI--
memory_limit=-1
--FILE--
<?php
try {
bzcompress(str_repeat('1', 4295163906));
} catch (\ValueError $e) {
echo $e->getMessage(), PHP_EOL;
}
?>
--EXPECTF--
bzcompress(): Argument #1 ($data) must have a length less than or equal to %d