Annotation of embedaddon/php/Zend/tests/bug54268.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Bug #54268 (Double free when destroy_zend_class fails)
        !             3: --INI--
        !             4: memory_limit=8M
        !             5: --SKIPIF--
        !             6: <?php
        !             7: $zend_mm_enabled = getenv("USE_ZEND_ALLOC");
        !             8: if ($zend_mm_enabled === "0") {
        !             9:        die("skip Zend MM disabled");
        !            10: }
        !            11: ?>
        !            12: --FILE--
        !            13: <?php
        !            14: class DestructableObject
        !            15: {
        !            16:         public function __destruct()
        !            17:         {
        !            18:                 DestructableObject::__destruct();
        !            19:         }
        !            20: }
        !            21: class DestructorCreator
        !            22: {
        !            23:         public function __destruct()
        !            24:         {
        !            25:                 $this->test = new DestructableObject;
        !            26:         }
        !            27: }
        !            28: class Test
        !            29: {
        !            30:         public static $mystatic;
        !            31: }
        !            32: $x = new Test();
        !            33: Test::$mystatic = new DestructorCreator();
        !            34: --EXPECTF--
        !            35: Fatal error: Allowed memory size of %s bytes exhausted%s(tried to allocate %s bytes) in %s on line %d

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>