[xdebug-dev] Bug 0000093: crash in lookup_hostname on x86_64

From: <xdebug-dev[@]lists.xdebug.org>
Date: Wed, 6 Oct 2004 16:59:17 +0200

The following bug has been CLOSED
======================================================================
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000093
======================================================================
Reporter: ratchet
Handler:
======================================================================
Project: Xdebug
Bug ID: 93
Category: Usage problems
Reproducibility: always
Severity: crash
Priority: normal
Status: closed
Operating System: SUSE Linux 9.1/x86_64
PHP Version: 4.3.4
Xdebug Version: 2.0-dev
======================================================================
Date Submitted: 2004-10-06 16:23 CEST
Last Modified: 2004-10-06 16:59 CEST
======================================================================
Summary: crash in lookup_hostname on x86_64
Description:
Under certain circumstances, setting the remote_port seems to be
overwriting the memory that stores the remote_host. Using PHP CLI, this
occurs when setting remote_port after remote_host in the environment:

ratchet[@]rsdev:~> XDEBUG_CONFIG="remote_enable=1 remote_handler=dbgp
remote_host=localhost remote_port=8009" php test.php
Segmentation fault
======================================================================

----------------------------------------------------------------------
 ratchet - 2004-10-06 16:25 CEST
----------------------------------------------------------------------
Proposed fix, made against the CVS code as of 2004-10-05:

Index: php_xdebug.h
===================================================================
RCS file: /repository/xdebug/php_xdebug.h,v
retrieving revision 1.81
diff -u -r1.81 php_xdebug.h
--- php_xdebug.h 3 Oct 2004 13:10:56 -0000 1.81
+++ php_xdebug.h 6 Oct 2004 01:43:45 -0000
@@ -93,7 +93,7 @@

        int level;
        xdebug_llist *stack;
- int max_nesting_level;
+ long max_nesting_level;
        zend_bool default_enable;
        zend_bool collect_includes;
        zend_bool collect_params;
@@ -138,7 +138,7 @@

        /* remote settings */
        zend_bool remote_enable; /* 0 */
- int remote_port; /* 9000 */
+ long remote_port; /* 9000 */
        char *remote_host; /* localhost */
        int remote_mode; /* XDEBUG_NONE, XDEBUG_JIT,
XDEBUG_REQ */
        char *remote_handler; /* php3, gdb, dbgp */

----------------------------------------------------------------------
 derick - 2004-10-06 16:59 CEST
----------------------------------------------------------------------
Fixed in Cvs, thanks for the patch. There might be some more 64bit issues,
but unfortunately I do not have access to a 64bit machine running linux.

Bug History
Date Modified Username Field Change
======================================================================
2004-10-06 16:23ratchet New Bug
2004-10-06 16:25ratchet Bugnote Added: 0000197
2004-10-06 16:59derick Bugnote Added: 0000198
2004-10-06 16:59derick Status new => closed
======================================================================
Received on Wed Oct 06 2004 - 16:59:22 BST

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