[xdebug-dev] Bug 0000142: xdebug crashes in PHP-CLI

From: <xdebug-dev[@]lists.xdebug.org>
Date: Thu, 22 Sep 2005 21:49:57 +0200

A BUGNOTE has been added to this bug.
======================================================================
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000142
======================================================================
Reporter: e-novative
Handler:
======================================================================
Project: Xdebug
Bug ID: 142
Category: Debug client (console)
Reproducibility: always
Severity: crash
Priority: normal
Status: feedback
Operating System: Windows XP
PHP Version: 5.0.4
Xdebug Version: 2.0-dev
======================================================================
Date Submitted: 2005-08-02 13:35 CEST
Last Modified: 2005-09-22 21:49 CEST
======================================================================
Summary: xdebug crashes in PHP-CLI
Description:
I am running PHPUnit2 tests at the command line. I'm testing a Collection
class implementing the Iterator interface. The script runs, but xdebug
seems to crash on shutdown.

When I disable xdebug in php.ini, everything works fine (naturally).

I'm not sure which additional information I can provide, so please give
instructions.
======================================================================

----------------------------------------------------------------------
 derick - 2005-08-02 13:40 CEST
----------------------------------------------------------------------
Please provide a short reproducable script that causes this crash - without
this I can not debug Xdebug, unless you manage to run this on linux and use
valgrind and gdb to create specific crash information, including a
backtrace.

----------------------------------------------------------------------
 e-novative - 2005-08-02 14:47 CEST
----------------------------------------------------------------------
Here is a minimal example that crashes on my system. If I comment out the
destructor of Object, the example works fine.

<?php

  class eno_Exception extends Exception {}

  require_once 'PHPUnit2/Framework/TestCase.php';

  class CollectionTest extends PHPUnit2_Framework_TestCase
  {
    public function testSomething()
    {
      $collection = new Collection;
      $collection->add(new Object);
    }
  }

  class Collection
  {
    var $Objects = array();

    public function __construct() { }
    public function rewind() { }
    public function current() { }
    public function key() { }
    public function next() { }
    public function valid() { }

    public function add(Object $aObject)
    {
      $this->Objects[] = $aObject;
    }
  }

  class Object
  {
    public function __construct() { }
    public function __destruct() { }
  }

?>

----------------------------------------------------------------------
 derick - 2005-09-22 21:49 CEST
----------------------------------------------------------------------
Although that wasn't a very short script, I did confirm it. It seems like
some structure in PHP isn't set correctly though. I'll have a look there.

Bug History
Date Modified Username Field Change
======================================================================
2005-08-02 13:35e-novative New Bug
2005-08-02 13:35e-novative Bug Monitored: e-novative
2005-08-02 13:40derick Bugnote Added: 0000271
2005-08-02 13:40derick Status new => feedback
2005-08-02 14:47e-novative Bugnote Added: 0000272
2005-09-22 21:49derick Bugnote Added: 0000291
======================================================================
Received on Thu Sep 22 2005 - 21:49:58 BST

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