bug80663.phpt 300 B

123456789101112131415
  1. --TEST--
  2. Bug #80663 (Recursive SplFixedArray::setSize() may cause double-free)
  3. --FILE--
  4. <?php
  5. class InvalidDestructor {
  6. public function __destruct() {
  7. $GLOBALS['obj']->setSize(0);
  8. }
  9. }
  10. $obj = new SplFixedArray(1000);
  11. $obj[0] = new InvalidDestructor();
  12. $obj->setSize(0);
  13. ?>
  14. --EXPECT--