File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / Zend / tests / bug54268.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:47:52 2012 UTC (13 years, 1 month ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

    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>