php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26809 Unserializing cross-referenced objects causes segfault
Submitted: 2004-01-06 04:16 UTC Modified: 2004-01-11 10:52 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: davojan at mail dot ru Assigned:
Status: Not a bug Package: Session related
PHP Version: 5.0.0b3 (beta3) OS: FreeBSD 4.7-RELEASE
Private report: No CVE-ID: None
 [2004-01-06 04:16 UTC] davojan at mail dot ru
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-11 10:52 UTC] sniper@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

See bug #26765

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 22:01:33 2024 UTC