dis-bench / src /php /php-src /ext /gmp /tests /bug67917.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
320 Bytes
--TEST--
Bug #67917: Using GMP objects with overloaded operators can cause memory exhaustion
--EXTENSIONS--
gmp
--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)