php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2301 SIGSEGV when using complex object-in-array variables in sessions.
Submitted: 1999-09-15 05:07 UTC Modified: 1999-09-15 07:13 UTC
From: j at kubs dot cz Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 4.0 Latest CVS (15/09/1999) OS: Linux 2.2.11
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: j at kubs dot cz
New email:
PHP Version: OS:

 

 [1999-09-15 05:07 UTC] j at kubs dot cz
---- pokus.php ---- cut here ----
<?
  class CClass {
        var $aa, $bb;
  }
  session_start();
  session_register("tmp");
  $tmp["blee"] = new CClass;
  $tmp["fuuj"] = new CClass;
  $tmp["blee"]->aa = "neee";
  echo $tmp["blee"];            // displays "object"
  echo "<br><a href=\"pokus1.php\">next</a>";
?>

---- pokus1.php ---- cut here ----
<?
  session_start();
  echo $tmp["blee"];            // SIGSEGVs
?>

----------------------------------
What am I trying to do is to pass an object-in-array variable in session. I've even tried to do:

$b = serialize($tmp);
$tmp1 = unserialize($b);
echo $tmp1["blee"];

which resulted into "Array" instead of object, bud didn't cause any crash.

------------------ gdb bt -----
#0  0x80b706e in zend_hash_find (ht=0x14, arKey=0x8190bf0 to_string,
    nKeyLength=10, pData=0xbffff928) at zend_hash.c:919
#1  0x80af68d in call_user_function_ex (function_table=0x0, object=0x81983d8,
    function_name=0xbffff9a0, retval=0xbffff9d4, param_count=0,
    params=0x8197540, no_separation=1) at zend_execute_API.c:329
#2  0x80af623 in call_user_function (function_table=0x0, object=0x81983d8,
    function_name=0xbffff9a0, retval=0xbffff9d4, param_count=0, params=0x0)
    at zend_execute_API.c:303
#3  0x80b406d in zend_make_printable_zval (expr=0x81983d8,
    expr_copy=0xbffff9d4, use_copy=0xbffff9d0) at zend.c:151
#4  0x80b4105 in zend_print_zval (expr=0x81983d8, indent=0) at zend.c:174
#5  0x80b3dad in zend_print_variable (var=0x81983d8) at zend_variables.c:154
#6  0x80bc081 in execute (op_array=0x8193d40) at zend_execute.c:1127
#7  0x807a45d in php_execute_script (primary_file=0xbffffbc0) at main.c:1168
#8  0x807a4d9 in apache_php_module_main (r=0x818e4fc, fd=21,
    display_source_mode=0) at main.c:1209
#9  0x8078c80 in send_php ()
#10 0x8078cc4 in send_parsed_php ()
#11 0x80c2c5f in ap_invoke_handler ()
#12 0x80d5cfd in process_request_internal ()
#13 0x80d5d5c in ap_process_request ()
#14 0x80cd5c1 in child_main ()
#15 0x80cd74c in make_child ()
#16 0x80cd8a7 in startup_children ()
#17 0x80cde94 in standalone_main ()
#18 0x80ce6e7 in main ()
---

  Jakub

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-09-15 07:13 UTC] thies at cvs dot php dot net
fixed in CVS
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sun Oct 11 18:00:01 2026 UTC