php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37933 Segfault passing _SESSION to SESSION using function
Submitted: 2006-06-27 18:28 UTC Modified: 2006-07-06 01:00 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: ylee at peragrin dot com Assigned:
Status: No Feedback Package: Session related
PHP Version: 5.1.4 OS: Linux FC5
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2006-06-27 18:28 UTC] ylee at peragrin dot com
Description:
------------
When S_SESSION is passed through a function with global $_SESSION, the apache's child processor segfaults.



Reproduce code:
---------------
<?php

session_id("temp");
session_start();

$_SESSION['a'] = 'test';

function my_get_from($list)
{
  global $_SESSION;

  // removed code related to manipulating $_SESSION using $list.
}

my_get_from('a', $_SESSION);

if (isset($_SESSION))
{
   print_r($_SESSION);
}

?>


Expected result:
----------------
An error message would be nice or being able to access both list will be the most desirable solution.
This code used work on 4.* releases. 



Actual result:
--------------
[Tue Jun 27 11:14:16 2006] [notice] child pid 15899 exit signal Segmentation fault (11)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-27 18:29 UTC] tony2001@php.net
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 for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

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.


 [2006-06-27 19:56 UTC] ylee at peragrin dot com
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208891712 (LWP 16496)]
0x0750ab17 in zend_hash_find () from /etc/httpd/modules/libphp5.so
(gdb) bt
#0  0x0750ab17 in zend_hash_find () from /etc/httpd/modules/libphp5.so
#1  0x07412f18 in php_get_session_var () from /etc/httpd/modules/libphp5.so
#2  0x07414fc3 in ps_srlzr_encode_php () from /etc/httpd/modules/libphp5.so
#3  0x07412927 in zm_startup_session () from /etc/httpd/modules/libphp5.so
#4  0x07415866 in zm_info_session () from /etc/httpd/modules/libphp5.so
#5  0x07415b5b in zm_deactivate_session () from /etc/httpd/modules/libphp5.so
#6  0x07500c20 in module_registry_cleanup () from /etc/httpd/modules/libphp5.so
#7  0x07508f9d in zend_hash_apply () from /etc/httpd/modules/libphp5.so
#8  0x074ff14e in zend_deactivate_modules () from /etc/httpd/modules/libphp5.so
#9  0x074bc9ba in php_request_shutdown () from /etc/httpd/modules/libphp5.so
#10 0x075820c4 in php_ap2_register_hook () from /etc/httpd/modules/libphp5.so
#11 0x00d3cfbd in ap_run_handler () from /usr/sbin/httpd
#12 0x00d40958 in ap_invoke_handler () from /usr/sbin/httpd
#13 0x00d4c811 in ap_process_request () from /usr/sbin/httpd
#14 0x00d4962f in ap_register_input_filter () from /usr/sbin/httpd
#15 0x00d44e5d in ap_run_process_connection () from /usr/sbin/httpd
#16 0x00d44f5c in ap_process_connection () from /usr/sbin/httpd
#17 0x00d50ae2 in ap_graceful_stop_signalled () from /usr/sbin/httpd
#18 0x00d50d54 in ap_graceful_stop_signalled () from /usr/sbin/httpd
#19 0x00d51c69 in ap_mpm_run () from /usr/sbin/httpd
#20 0x00d28917 in main () from /usr/sbin/httpd
 [2006-06-28 07:57 UTC] tony2001@php.net
I don't see any crashes or any other problems with your code.
Please providee a reproduce code that actually reproduces the problem.
 [2006-07-06 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 23:01:29 2024 UTC