Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42454 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77366 invoked from network); 2 Jan 2009 22:23:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jan 2009 22:23:27 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 83.243.58.133 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 83.243.58.133 mailout1.netbeat.de Linux 2.6 Received: from [83.243.58.133] ([83.243.58.133:39021] helo=mailout1.netbeat.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4A/38-28540-DD39E594 for ; Fri, 02 Jan 2009 17:23:26 -0500 Received: (qmail 11191 invoked by uid 89); 2 Jan 2009 22:32:42 -0000 Received: from unknown (HELO ?192.168.1.102?) (johannes%schlueters.de@93.104.96.127) by mailout1.netbeat.de with ESMTPA; 2 Jan 2009 22:32:42 -0000 To: Derick Rethans Cc: dmitri@zend.com, PHP Developers Mailing List In-Reply-To: References: Content-Type: text/plain Date: Fri, 02 Jan 2009 23:23:18 +0100 Message-ID: <1230934998.6125.152.camel@goldfinger> Mime-Version: 1.0 X-Mailer: Evolution 2.24.2 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] call_user_func segfault From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Fri, 2009-01-02 at 16:55 +0100, Derick Rethans wrote: > Hello, > > I've been running into a strange segfault with PHP 5.2.x (it works in > PHP 5.3) when using call_user_func() recursively. I can not find out > what causes it, but I did manage to have a simple test case. For the > test to crash, you either need a debug build of PHP, or valgrind + > USE_ZEND_ALLOC=0. You need run the script from within the "test" > directory as it assumes file system layout. I didn't test it as I have no 5.2 right now at hand on this box but I think call_user_func messes with references in parameters to the called function. In 5.3 this is fixed by zend_parse_parameters. I saw some code (Serendipity's way of using Smarty) break with 5.3 since reference handling changed there, didn't investigate but 5.3 seemed to be correct on first sight. Not sure if that's enough of an pointer to help debugging that issue... johannes