mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
5f8ed7765a
We partially fixed this in bug #78379, but still don't handle the case where the properties array is marked as grey first, which causes a delref to not be performed later. Fix this by treating the object properties HT the same way as other refcounted values, including addrefs/delrefs. The object dtor code already handles properties HT with NULL GC type, so out of order destruction should not be a problem. Fixes oss-fuzz #36023.
17 lines
248 B
PHP
17 lines
248 B
PHP
--TEST--
|
|
GC of object property table (order variation)
|
|
--FILE--
|
|
<?php
|
|
function test() {
|
|
$o1 = new stdClass;
|
|
$o2 = new stdClass;
|
|
$a = ['prop' => $o2];
|
|
$o = $o1;
|
|
$o2->a = (object) $a;
|
|
}
|
|
test();
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
===DONE===
|