php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17294 session_encode() fails with segmentation fault
Submitted: 2002-05-17 14:25 UTC Modified: 2002-05-17 17:58 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: rubens_gomes at hotmail dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.2.1 OS: Solaris 2.7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rubens_gomes at hotmail dot com
New email:
PHP Version: OS:

 

 [2002-05-17 14:25 UTC] rubens_gomes at hotmail dot com
I am running apache 1.3.24/PHP 4.2.1 on Solaris 2.7 (with
recent OS patches applied.)

When I call session_encode() as follows I get the 
segmentation fault error below...

$session_array = explode(";", session_encode());

Following is backtrace ...

[bash-2.03# gdb /usr/local/apache/bin/httpd
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "sparc-sun-solaris2.7"...
(gdb) run -X
Starting program: /usr/local/apache/bin/httpd -X
[New LWP    2        ]
[New LWP    3        ]
[New LWP    4        ]

Program received signal SIGSEGV, Segmentation fault.
0xfe5ec8c4 in _zval_dtor (zvalue=0x1586b0, __zend_filename=0xfe75c060
"zend_execute_API.c", 
    __zend_lineno=274) at zend_variables.c:43
43                              CHECK_ZVAL_STRING_REL(zvalue);
(gdb) bt
#0  0xfe5ec8c4 in _zval_dtor (zvalue=0x1586b0, 
    __zend_filename=0xfe75c060 "zend_execute_API.c", __zend_lineno=274)
    at zend_variables.c:43
#1  0xfe5dde08 in _zval_ptr_dtor (zval_ptr=0xfe7aac78, 
    __zend_filename=0xfe75ba90 "zend_execute_locks.h",
__zend_lineno=26)
    at zend_execute_API.c:274
#2  0xfe5db0d8 in zend_clean_garbage () at zend_execute_locks.h:26
#3  0xfe5d2b8c in execute (op_array=0x1436e8) at ./zend_execute.c:1056
#4  0xfe5d933c in execute (op_array=0x13de78) at ./zend_execute.c:2141
#5  0xfe5ef554 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at zend.c:810
#6  0xfe60b958 in php_execute_script (primary_file=0xffbeecb0) at
main.c:1381
#7  0xfe603b94 in apache_php_module_main (r=0x131558,
display_source_mode=0)
    at sapi_apache.c:90
#8  0xfe605170 in send_php (r=0x131558, display_source_mode=0, 
    filename=0x132078 "/home/httpd/html/dbiflex/sm/login.php") at
mod_php4.c:575
#9  0xfe6051e8 in send_parsed_php (r=0x131558) at mod_php4.c:590
#10 0x41620 in ap_invoke_handler () from /lib/libaio.so.1
#11 0x5fd04 in process_request_internal () from /lib/libaio.so.1
#12 0x5fd88 in ap_process_request () from /lib/libaio.so.1
#13 0x52f74 in child_main () from /lib/libaio.so.1
#14 0x53208 in make_child () from /lib/libaio.so.1
#15 0x53424 in startup_children () from /lib/libaio.so.1
#16 0x53e58 in standalone_main () from /lib/libaio.so.1
#17 0x54aa0 in main () from /lib/libaio.so.1
(gdb) frame 3
#3  0xfe5d2b8c in execute (op_array=0x1436e8) at ./zend_execute.c:1056
1056                    zend_clean_garbage(TSRMLS_C);
(gdb) print (char
*)(executor_globals.function_state_ptr->function)->common.function_name
$1 = 0x0
(gdb) print (char *)executor_globals.active_op_array->function_name
$2 = 0x0
(gdb) print (char *)executor_globals.active_op_array->filename
$3 = 0x14a970
"/home/nmsuser/dbiflex/docroot/common/page_login_header.inc"
(gdb) quit
The program is running.  Exit anyway? (y or n) y

--------------------
Here is the line that is causing the seg fault:

error_log( "{common/page_login_header.inc session_encode: " .
session_encode() );

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-17 17:57 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. Because of this, we hope you add your comments
to the original bug instead.

Thank you for your interest in PHP.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 02 04:01:29 2024 UTC