Segfault with PHPUnit in PHP_5_2 and PHP_5_3

From: Date: Tue, 12 Aug 2008 23:47:38 +0000
Subject: Segfault with PHPUnit in PHP_5_2 and PHP_5_3
Groups: php.internals 
Request: Send a blank email to internals+get-39901@lists.php.net to get a copy of this message
I got a report about a segfault in PHP_5_2 and PHP_5_3 today that is triggered by PHPUnit running the test below.
     class MyObject {
         public function getX() {
             return NULL;
         }
     }
     class MyTest extends PHPUnit_Framework_TestCase {
         public function test1() {
             $obj = new MyObject;
             $source = & $obj->getX();
         }
     }
Running the test code "manually" only results in the expected E_STRICT ("Only variables should be assigned by reference"). Details from GDB and Valgrind are here: - http://static.phpunit.de/gdb-5.2.txt - http://static.phpunit.de/gdb-5.3.txt - http://static.phpunit.de/valgrind-5.2.txt - http://static.phpunit.de/valgrind-5.3.txt Unfortunately I could not come up with a short reproducable script that does not involve PHPUnit. -- Sebastian Bergmann http://sebastian-bergmann.de/ GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69

« previous php.internals (#39901) next »