From: jtaal at eljakim dot nl Operating system: Linux & Windows PHP version: 5.2.6 PHP Bug Type: Reproducible crash Bug description: PHPUnit testcase crashes (segfault)
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 bug report at http://bugs.php.net/?id=45801&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45801&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45801&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45801&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45801&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45801&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45801&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=45801&r=needscript Try newer version: http://bugs.php.net/fix.php?id=45801&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45801&r=support Expected behavior: http://bugs.php.net/fix.php?id=45801&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45801&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45801&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45801&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45801&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45801&r=dst IIS Stability: http://bugs.php.net/fix.php?id=45801&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45801&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45801&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45801&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=45801&r=mysqlcfg