--TEST-- Bug #72434: ZipArchive class Use After Free Vulnerability in PHP's GC algorithm and unserialize --FILE-- rc is 0 $a = $unserialized_payload[1]; // Increment the reference counter by 1 again -> rc is 1 $b = $a; // Trigger free of $free_me (referenced by $m[1]). unset($b); $fill_freed_space_1 = "filler_zval_1"; $fill_freed_space_2 = "filler_zval_2"; $fill_freed_space_3 = "filler_zval_3"; $fill_freed_space_4 = "filler_zval_4"; debug_zval_dump($unserialized_payload[1]); ?> --EXPECTF-- array(1) refcount(3){ [0]=> object(stdClass)#%d (0) refcount(1){ } }