xref: /PHP-8.1/ext/spl/tests/bug80663.phpt (revision 2d668409)
1--TEST--
2Bug #80663 (Recursive SplFixedArray::setSize() may cause double-free)
3--FILE--
4<?php
5class InvalidDestructor {
6    public function __destruct() {
7        $GLOBALS['obj']->setSize(0);
8    }
9}
10
11$obj = new SplFixedArray(1000);
12$obj[0] = new InvalidDestructor();
13$obj->setSize(0);
14?>
15--EXPECT--
16