#19243 [Opn]: Seg Fault Restoring Session Variables with References to Objects

From: Date: Sat, 07 Sep 2002 22:40:00 +0000
Subject: #19243 [Opn]: Seg Fault Restoring Session Variables with References to Objects
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-18644@lists.php.net to get a copy of this message
ID: 19243 Updated by: kalowsky@php.net Reported By: fdruseikis@sc.rr.com Status: Open Bug Type: Session related Operating System: Linux RH 7.0 -PHP Version: 4.2.2 +PHP Version: 4.2.2 + php4-200209060600 New Comment: Updating version Previous Comments: ------------------------------------------------------------------------ [2002-09-06 10:50:29] fdruseikis@sc.rr.com This last build is really broken. It won't even serialize strings and integers. ------------------------------------------------------------------------ [2002-09-06 10:23:38] fdruseikis@sc.rr.com php4-latest = php4-200209060600 No discernable difference. Same as previously reported; No segfault and objects not serialized if they contain interior references. ------------------------------------------------------------------------ [2002-09-06 09:38:56] kalowsky@php.net Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip Once again, as code has changed yet again. Give it a try. :) ------------------------------------------------------------------------ [2002-09-06 09:24:22] fdruseikis@sc.rr.com To elaborate on what I see: In php4.3.0-dev If there are any references within an array/object you don't serialize it. Otherwise it is serialized. So, array( 1, 2, 3) and array( new TFoo(1), new TFoo(2) ) save and restore. However, in php4.3.0-dev global $a; $a = array(null,null) $a[0] =& new TFoo(1); $a[1] =& $a[0]; $a serializes as null. This would be a change from 4.2.2, which permits this latter example (but segfaults on the global $o1, $o2 of the original bug report). In 4.2.2 $a example does not segfault and the restored array has references to the same object instance. Did you want to take away functionality? ------------------------------------------------------------------------ [2002-09-06 08:16:38] fdruseikis@sc.rr.com Also: doesn't save/restore arrays either. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/19243 -- Edit this bug report at http://bugs.php.net/?id=19243&edit=1

« previous php.bugs (#18644) next »