1
0
mirror of https://github.com/php/php-src.git synced 2026-04-17 13:01:02 +02:00
Files
archived-php-src/ext/gmp/bug67917.phpt
2014-08-27 22:16:20 +02:00

18 lines
301 B
PHP

--TEST--
Bug #67917: Using GMP objects with overloaded operators can cause memory exhaustion
--FILE--
<?php
$mem1 = memory_get_usage();
for ($i = 0; $i < 1000; $i++) {
$gmp = gmp_init(42);
$gmp <<= 1;
}
$mem2 = memory_get_usage();
var_dump($mem2 - $mem1 < 100000);
?>
--EXPECT--
bool(true)