TypePHP 编译器 https://swoole.com/aot/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

26 lines
662 B

--TEST--
GH-15613 overflow on hex strings repeater value
--SKIPIF--
<?php
if (!getenv('RUN_RESOURCE_HEAVY_TESTS')) die('skip resource-heavy test');
if (PHP_INT_SIZE != 8) die("skip this test is for 64 bit platform only");
?>
--INI--
memory_limit=-1
--FILE--
<?php
try {
unpack('h2147483647', str_repeat('X', 2**31 + 10));
} catch (\ValueError $e) {
echo $e->getMessage() . PHP_EOL;
}
try {
unpack('H2147483647', str_repeat('X', 2**31 + 10));
} catch (\ValueError $e) {
echo $e->getMessage();
}
?>
--EXPECTF--
unpack(): Argument #1 ($format) repeater must be less than or equal to %d
unpack(): Argument #1 ($format) repeater must be less than or equal to %d