mirror of
https://github.com/php/php-src.git
synced 2026-04-11 10:03:18 +02:00
variant objects have no (declared) properties, so the `get_properties` handlers returns a pointer to constant storage for efficiency reasons. This pointer must not be returned from the `get_gc` handler, though; instead we set up an own `get_gc` handler and return NULL from it, to signal that there are no properties to collect.
14 lines
266 B
PHP
14 lines
266 B
PHP
--TEST--
|
|
Bug #79247 (Garbage collecting variant objects segfaults)
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('com_dotnet')) die('skip com_dotnet extension not available');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$keep = new variant(null);
|
|
var_dump(gc_collect_cycles());
|
|
?>
|
|
--EXPECT--
|
|
int(0)
|