[xdebug-dev] Bug 0000167: [php4] crashed with user session handler

From: <xdebug-dev[@]lists.xdebug.org>
Date: Tue, 14 Feb 2006 05:43:15 +0100

The following NEW bug has been ADDED.
======================================================================
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000167
======================================================================
Reporter: Xuefer
Handler:
======================================================================
Project: Xdebug
Bug ID: 167
Category: Usage problems
Reproducibility: always
Severity: crash
Priority: normal
Status: new
Operating System:
PHP Version: 4.3.11
Xdebug Version: 2.0.0beta4
======================================================================
Date Submitted: 2006-02-14 05:43 CET
Last Modified: 2006-02-14 05:43 CET
======================================================================
Summary: [php4] crashed with user session handler
Description:
i guess the same fix is done for php5+ by ZE2's post_deactive func, but
it's not enough for php4
patch here

cvs diff: Diffing .
Index: xdebug.c
===================================================================
RCS file: /repository/xdebug/xdebug.c,v
retrieving revision 1.298
diff -u -r1.298 xdebug.c
--- xdebug.c 10 Feb 2006 14:44:55 -0000 1.298
+++ xdebug.c 14 Feb 2006 04:41:59 -0000
@@ -1165,6 +1165,12 @@
    int function_nr = 0;
    xdebug_llist_element *le;
 
+ if (XG(stack) == NULL) {
+ /* in request shutdown */
+ xdebug_old_execute(op_array TSRMLS_CC);
+ return;
+ }
+
    if (XG(level) == 0) {
        /* Set session cookie if requested */
        if (
@@ -1339,6 +1345,12 @@
    int do_return = (XG(do_trace) && XG(trace_file));
    int function_nr = 0;
 
+ if (XG(stack) == NULL) {
+ /* in request shutdown */
+ execute_internal(current_execute_data, return_value_used
TSRMLS_CC);
+ return;
+ }
+
    XG(level)++;
    if (XG(level) == XG(max_nesting_level)) {
        php_error(E_ERROR, "Maximum function nesting level of '%ld'
reached, aborting!", XG(max_nesting_level));

======================================================================

Bug History
Date Modified Username Field Change
======================================================================
2006-02-14 05:43Xuefer New Bug
2006-02-14 05:43Xuefer Bug Monitored: Xuefer
======================================================================
Received on Tue Feb 14 2006 - 05:43:18 GMT

This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST