mirror of
https://github.com/php/php-src.git
synced 2024-11-27 20:03:40 +08:00
18 lines
301 B
PHP
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)
|