Re: [PHP-DEV] Bug #11432 Updated: crash when restoring references to objects From: Thies C. Arntzen (thies <email protected>)
Date: 06/20/01

    please try attached patch and report back!

    tc

On Tue, Jun 12, 2001 at 05:40:40PM -0000, sniper <email protected> wrote:
> ID: 11432
> Updated by: sniper
> Reported By: zork <email protected>
> Status: Open
> Bug Type: Reproducible crash
> Operating system:
> PHP Version: 4.0.5
> Assigned To:
> Comments:
>
> reproduced with 4.0.6RC3
>
>
> Previous Comments:
> ---------------------------------------------------------------------------
>
> [2001-06-12 08:29:39] zork <email protected>
> Here are two scripts that operates on referenced objects. make.php creates object $b with reference to object $a as argument.
>
> After serialize/unserialize show.php checks if the reference still exists.
>
> PHP 4.0.1pl1 lost references.
> PHP 4.0.4pl1 segfaults on show.php
> PHP 4.0.5 segfaults on show.php and(!) sometimes on make.php
>
> Config line:
> ./configure --with-pgsql=shared --with-apxs --sysconfdir=/etc --prefix=/usr
> --localstatedir =/var --with-config-file-path=/etc/httpd/conf/
> --with-gettext=/usr/share/gettext
>
> make.php:
> <?
> class ClassA {
> var $arg_a;
> };
>
> class ClassB {
> var $arg_b;
>
> function ClassB(&$a) {
> $this -> arg_b = &$a;
> }
> };
>
> session_start();
> session_destroy();
> session_register("b");
> session_register("a");
>
> $a = new ClassA();
> $a -> arg_a = 4;
> $b = new ClassB($a);
> echo "done. Click <a href="show.php">here</a>";
> ?>
>
>
> show.php:
> <?
> class ClassA {
> var $arg_a;
> };
>
> class ClassB {
> var $arg_b;
>
> function ClassB(&$a) {
> $this -> arg_b = &$a;
> }
> };
>
> session_start();
> $a -> arg_a = 6;
> echo $b -> arg_b -> arg_a;
> ?>
>
> ---------------------------------------------------------------------------
>
>
>
> ATTENTION! Do NOT reply to this email!
> To reply, use the web interface found at http://bugs.php.net/?id=11432&edit=2
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
> For additional commands, e-mail: php-dev-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>

  • text/plain attachment: patch

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>