#37933 [Opn->Fbk]: Segfault passing _SESSION to SESSION using function
| From: | tony2001@php.net | Date: | Wed, 28 Jun 2006 07:57:48 +0000 |
| Subject: | #37933 [Opn->Fbk]: Segfault passing _SESSION to SESSION using function | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-98876@lists.php.net to get a copy of this message | ||
ID: 37933
Updated by: tony2001@php.net
Reported By: ylee at peragrin dot com
-Status: Open
+Status: Feedback
Bug Type: Session related
Operating System: Linux FC5
PHP Version: 5.1.4
New Comment:
I don't see any crashes or any other problems with your code.
Please providee a reproduce code that actually reproduces the problem.
Previous Comments:
------------------------------------------------------------------------
[2006-06-27 19:56:40] 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-27 18:29:52] 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 18:28:44] 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)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37933&edit=1