From: davojan at mail dot ru
Operating system: FreeBSD 4.7-RELEASE
PHP version: 5.0.0b3 (beta3)
PHP Bug Type: Session related
Bug description: Unserializing cross-referenced objects causes segfault
Description:
------------
In changelog for php5.0.0b3 I saw:
"Fixed bug #24394 (Serializing cross-referenced objects causes segfault).
(Moriyoshi)"
I wrote a simplest example provided below and found out that unserializing
of cross_referenced objects doesn't work. So I couldn't even check - does
serializing work or not.
The script crashes on the second call of session_start().
Reproduce code:
---------------
<?
class foo {
public $bar = NULL;
}
class bar {
public $foo = NULL;
}
session_start();
$_SESSION['foo'] = new foo();
$_SESSION['bar'] = new bar();
$_SESSION['foo']->bar = $_SESSION['bar'];
$_SESSION['bar']->foo = $_SESSION['foo'];
session_write_close();
session_start();
?>
Expected result:
----------------
Blank page
or at least error message, if cross-referencing is not supported.
Actual result:
--------------
"The page cannot be displayed" in browser.
In /var/log/httpd-error.log:
[Tue Jan 6 12:10:50 2004] [notice] child pid 92645 exit signal
Segmentation fault (11)
[Tue Jan 6 12:10:50 2004] [notice] child pid 92626 exit signal
Segmentation fault (11)
In /var/log/messages:
Jan 6 12:10:49 freebsd /kernel: pid 92645 (httpd), uid 80: exited on
signal 11
Jan 6 12:10:49 freebsd /kernel: pid 92626 (httpd), uid 80: exited on
signal 11
--
Edit bug report at http://bugs.php.net/?id=26809&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26809&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26809&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26809&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26809&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26809&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=26809&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=26809&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26809&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26809&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26809&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26809&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26809&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26809&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26809&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26809&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26809&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26809&r=float