#26778 [Opn]: crash serializing objects with recursive references

2004-01-05 Thread helly
 ID:   26778
 Updated by:   [EMAIL PROTECTED]
 Reported By:  r2cosmin at rdstm dot ro
 Status:   Open
 Bug Type: Zend Engine 2 problem
 Operating System: windows xp
 PHP Version:  5.0.0b3 (beta3)
 New Comment:

Running in CLI on Win* and *nix there are memleaks but no SEGV. Please
try the following patch:
http://marcus-boerger.de/php/ext/ze2/ze2-object_dtor-20040104.diff.txt


Previous Comments:


[2004-01-03 09:52:05] r2cosmin at rdstm dot ro

Description:

Php craches when trying to serialize objects with deep recursive
references. It only works with two objects, each having a reference to
the other. When using three or more objects in a circular chain, it
crashes badly.

I have written a simplified example for help.

Thanks.

PS.
 I have found this bug ( and bug reports on it ) in the past but it
doesn't seem to be fixed. Maybe it has reapered in php5. 

Reproduce code:
---
?
class A
{
public $b;
}
class B
{
public $c;
}
class C
{
public $a;
}
$a = new A();
$b = new B();
$c = new C();
$a-b = $b;
$b-c = $c;
$c-a = $a;
echo serialize($a);
?

Expected result:

some serializaton string

Actual result:
--
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.

Please contact the server administrator, [EMAIL PROTECTED] and inform
them of the time the error occurred, and anything you might have done
that may have caused the error.

More information about this error may be available in the server error
log.




Apache/2.0.45 (Win32) Server at 127.0.0.1 Port 80





-- 
Edit this bug report at http://bugs.php.net/?id=26778edit=1


#26778 [Opn]: crash serializing objects with recursive references

2004-01-05 Thread r2cosmin at rdstm dot ro
 ID:   26778
 User updated by:  r2cosmin at rdstm dot ro
 Reported By:  r2cosmin at rdstm dot ro
 Status:   Open
 Bug Type: Zend Engine 2 problem
 Operating System: windows xp
 PHP Version:  5.0.0b3 (beta3)
 New Comment:

The last cvs is working around this bug but unfortunely there seems
serialisation has a more nasty bug that is screqing the references. I
have subbmitted a bug report on it (id=26790). Thanks for all your
help.


Previous Comments:


[2004-01-05 02:43:09] [EMAIL PROTECTED]

Running in CLI on Win* and *nix there are memleaks but no SEGV. Please
try the following patch:
http://marcus-boerger.de/php/ext/ze2/ze2-object_dtor-20040104.diff.txt



[2004-01-03 09:52:05] r2cosmin at rdstm dot ro

Description:

Php craches when trying to serialize objects with deep recursive
references. It only works with two objects, each having a reference to
the other. When using three or more objects in a circular chain, it
crashes badly.

I have written a simplified example for help.

Thanks.

PS.
 I have found this bug ( and bug reports on it ) in the past but it
doesn't seem to be fixed. Maybe it has reapered in php5. 

Reproduce code:
---
?
class A
{
public $b;
}
class B
{
public $c;
}
class C
{
public $a;
}
$a = new A();
$b = new B();
$c = new C();
$a-b = $b;
$b-c = $c;
$c-a = $a;
echo serialize($a);
?

Expected result:

some serializaton string

Actual result:
--
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.

Please contact the server administrator, [EMAIL PROTECTED] and inform
them of the time the error occurred, and anything you might have done
that may have caused the error.

More information about this error may be available in the server error
log.




Apache/2.0.45 (Win32) Server at 127.0.0.1 Port 80





-- 
Edit this bug report at http://bugs.php.net/?id=26778edit=1