#27263 [Opn->Fbk]: Unserialize crashes on multiple objects, stored in session explicitly
| From: | sniper@php.net | Date: | Sun, 15 Feb 2004 21:05:24 +0000 |
| Subject: | #27263 [Opn->Fbk]: Unserialize crashes on multiple objects, stored in session explicitly | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-54965@lists.php.net to get a copy of this message | ||
ID: 27263
Updated by: sniper@php.net
Reported By: davojan at mail dot ru
-Status: Open
+Status: Feedback
Bug Type: Session related
Operating System: FreeBSD 4.7-RELEASE
PHP Version: 5.0.0b4 (beta4)
New Comment:
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2004-02-15 13:31:17] davojan at mail dot ru
Description:
------------
PHP crashes on session_start() if object "foo" references to object
"bar" and both "foo" and "bar" are put into session explicitly each
into it's element.
The example below will work if we comment line:
$_SESSION['bar'] = $bar;
the only one "foo" is put to session explicitly and "bar" is also put,
but as a member of "foo".
Reproduce code:
---------------
<?
class foo {
public $bar = NULL;
}
class bar {}
//=============================[]
$foo = new foo();
$bar = new bar();
$foo->bar = $bar;
session_start();
$_SESSION['foo'] = $foo;
$_SESSION['bar'] = $bar; // it will be all right, if we comment this
session_write_close();
session_start(); // crashing here
echo "OK";
?>
Expected result:
----------------
OK
Actual result:
--------------
In browser:
"The page cannot be displayed"
In /var/log/httpd-error.log:
[Sun Feb 15 21:21:22 2004] [notice] child pid 230 exit signal
Segmentation fault (11)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27263&edit=1