Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39901 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19794 invoked from network); 12 Aug 2008 23:47:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Aug 2008 23:47:56 -0000 Authentication-Results: pb1.pair.com header.from=news@ger.gmane.org; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=php-php-dev@m.gmane.org; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain m.gmane.org designates 80.91.229.2 as permitted sender) X-PHP-List-Original-Sender: php-php-dev@m.gmane.org X-Host-Fingerprint: 80.91.229.2 main.gmane.org Linux 2.5 (sometimes 2.4) (4) Received: from [80.91.229.2] ([80.91.229.2:35630] helo=ciao.gmane.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8D/0F-04075-82122A84 for ; Tue, 12 Aug 2008 19:47:54 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KT3ad-0004QC-N5 for internals@lists.php.net; Tue, 12 Aug 2008 23:47:47 +0000 Received: from hartes-php.de ([85.214.110.30]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 12 Aug 2008 23:47:47 +0000 Received: from sb by hartes-php.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 12 Aug 2008 23:47:47 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: internals@lists.php.net Date: Wed, 13 Aug 2008 09:47:38 +1000 Lines: 32 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: hartes-php.de User-Agent: Thunderbird 2.0.0.16 (X11/20080724) Sender: news Subject: Segfault with PHPUnit in PHP_5_2 and PHP_5_3 From: sb@sebastian-bergmann.de (Sebastian Bergmann) 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