Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42448 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10634 invoked from network); 2 Jan 2009 15:55:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jan 2009 15:55:49 -0000 Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.94.239.7 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.94.239.7 mail.jdi-ict.nl Linux 2.6 Received: from [82.94.239.7] ([82.94.239.7:32774] helo=mail.jdi-ict.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 09/30-07761-1093E594 for ; Fri, 02 Jan 2009 10:55:48 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.jdi-ict.nl (8.13.7/8.12.11) with ESMTP id n02FtfvV016754; Fri, 2 Jan 2009 16:55:41 +0100 Date: Fri, 2 Jan 2009 16:55:41 +0100 (CET) X-X-Sender: derick@kossu.ez.no To: dmitri@zend.com cc: PHP Developers Mailing List Message-ID: User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: call_user_func segfault From: derick@php.net (Derick Rethans) 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. There is luckily a simple work around for the bug, by replacing: call_user_func( $callback, $callbackContext, $sourceDir, $entry, 42 ); with call_user_func_array( $callback, array( $callbackContext, $sourceDir, $entry, 42 ) ); I uploaded the test case as a .tar archive to http://files.derickrethans.nl/test.tar.gz It'd be ace if you could have a look at it (before I file a bug report). regards, Derick -- HEAD before 5_3!: http://tinyurl.com/6d2esb http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org