Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:269 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91254 invoked from network); 25 Mar 2003 14:13:08 -0000 Received: from unknown (HELO ammma.de) (213.83.39.131) by pb1.pair.com with SMTP; 25 Mar 2003 14:13:08 -0000 Received: from ammma.net (ammma.net [62.225.101.66]) by ammma.de (8.11.6/8.11.6/AMMMa AG) with ESMTP id h2PEClR30444 for ; Tue, 25 Mar 2003 15:12:47 +0100 Received: from neo.wg.de (jan.ammma.mil [192.168.100.11]) by ammma.net (8.9.3/8.9.3/AMMMa AG) with ESMTP id PAA22762 for ; Tue, 25 Mar 2003 15:13:06 +0100 Received: by neo.wg.de (Postfix, from userid 30) id 007094FCD5; Tue, 25 Mar 2003 15:13:07 +0100 (CET) Received: from ammma.net (ammma.net [62.225.101.66]) by jan.dip.ammma.net (Horde) with HTTP for ; Tue, 25 Mar 2003 15:13:07 +0100 Message-ID: <1048601587.22f84c63a1eac@jan.dip.ammma.net> X-Priority: 3 (Normal) Date: Tue, 25 Mar 2003 15:13:07 +0100 To: internals@lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) 4.0-cvs X-Virus-Scanned: by AMaViS-perl11-milter (http://amavis.org/) Subject: ZE2 race condition From: jan@horde.org (Jan Schneider) Running the following code: class Foo { var $bar_ref; } class Bar { var $foo_ref; } $foo = new Foo(); $bar = new Bar(); $foo->bar_ref = $bar; $bar->foo_ref = $foo; var_dump($foo); var_dump($bar); $s = serialize($foo); var_dump($s); $s = serialize($bar); var_dump($s); in PHP_4_3 results to: object(foo)(1) { ["bar_ref"]=> object(bar)(1) { ["foo_ref"]=> NULL } } object(bar)(1) { ["foo_ref"]=> object(foo)(1) { ["bar_ref"]=> object(bar)(1) { ["foo_ref"]=> NULL } } } string(58) "O:3:"foo":1:{s:7:"bar_ref";O:3:"bar":1:{s:7:"foo_ref";N;}}" string(86) "O:3:"bar":1:{s:7:"foo_ref";O:3:"foo":1:{s:7:"bar_ref";O:3:"bar":1:{s:7:"foo_ref";N;}}}" in HEAD: object(foo)#1 (1) { ["bar_ref"]=> object(bar)#2 (1) { ["foo_ref"]=> object(foo)#1 (1) { ["bar_ref"]=> object(bar)#2 (1) { ["foo_ref"]=> *RECURSION* } } } } object(bar)#2 (1) { ["foo_ref"]=> object(foo)#1 (1) { ["bar_ref"]=> object(bar)#2 (1) { ["foo_ref"]=> object(foo)#1 (1) { ["bar_ref"]=> *RECURSION* } } } } and a segfault (apache 1 sapi) or a runaway process (cli sapi). Jan. -- http://www.horde.org - The Horde Project http://www.ammma.de - discover your knowledge http://www.tip4all.de - Deine private Tippgemeinschaft