mirror of
https://github.com/php/php-src.git
synced 2024-10-01 14:56:10 +00:00
4218e89f8d
Rather than using get_properties and __wakeup for serialization the code now uses Serializable::serialize() and Serializable::unserialize(). The get_properties handler is switched to a get_debug_info handler. Thus get_gc will now return only the normal properties and not do any modifications, thus fixing the leak. This also avoids a $num property from being publicly visible after the object was dumped or serialized, so that's an extra plus.
16 lines
257 B
PHP
16 lines
257 B
PHP
--TEST--
|
|
Bug #65997: Leak when using gc_collect_cycles with new GMP implementation
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("gmp")) print "skip"; ?>
|
|
--FILE--
|
|
<?php
|
|
|
|
gc_enable();
|
|
$gmp = gmp_init('10');
|
|
gc_collect_cycles();
|
|
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
===DONE===
|