#45801 [Fbk->Csd]: PHPUnit testcase crashes (segfault)
| From: | nicos@php.net | Date: | Wed, 13 Aug 2008 23:27:54 +0000 |
| Subject: | #45801 [Fbk->Csd]: PHPUnit testcase crashes (segfault) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-128037@lists.php.net to get a copy of this message | ||
ID: 45801
Updated by: nicos@php.net
Reported By: jtaal at eljakim dot nl
-Status: Feedback
+Status: Closed
Bug Type: Reproducible crash
Operating System: *
PHP Version: 5.2.6
Assigned To: fb-req-jani
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Thanks to Dmitry.
Previous Comments:
------------------------------------------------------------------------
[2008-08-13 07:51:33] jtaal at eljakim dot nl
Sebastian Bergman managed to narrow it down:
http://bugs.php.net/bug.php?id=45805
please close this bug
------------------------------------------------------------------------
[2008-08-13 01:04:25] jani@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows (zip):
http://snaps.php.net/win32/php5.2-win32-latest.zip
For Windows (installer):
http://snaps.php.net/win32/php5.2-win32-installer-latest.msi
------------------------------------------------------------------------
[2008-08-12 16:22:27] jtaal at eljakim dot nl
Description:
------------
I'm getting a segmentation fault when running a very simple PHPUnit
testcase.
I'm using the latest pear package from pear.phpunit.de.
The testcase is issuing an E_STRICT.
I think deep inside PHPUnit something happens that causes this to
happen. However, since PHPUnit is "just" a bunch of PHP classes, I dare
say this is a bug inside the PHP interpreter.
I've been able to run and crash this on both Linux (debian lenny) and
Windows XP SP3 (both using PHP 5.2.6).
Reproduce code:
---------------
<?php // MyTest.php
require_once 'PHPUnit/Framework.php';
class MyObject {
public function getX() {
return NULL;
}
}
class MyTest extends PHPUnit_Framework_TestCase {
public function test1() {
$obj = new MyObject;
$source = & $obj->getX();
}
}
Actual result:
--------------
$ phpunit MyTest.php
Strict Standards: Only variables should be assigned by reference in
/home/jtaal/public_html/MyTest.php on line 18
PHPUnit 3.2.21 by Sebastian Bergmann.
Segmentation fault
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45801&edit=1