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


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to