Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:8609 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30631 invoked by uid 1010); 19 Mar 2004 17:16:48 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 30597 invoked by uid 1007); 19 Mar 2004 17:16:48 -0000 Message-ID: <20040319171648.30596.qmail@pb1.pair.com> To: internals@lists.php.net Reply-To: jay@php.net Mail-Copies-To: jay@php.net Date: Fri, 19 Mar 2004 12:16:45 -0500 Lines: 51 User-Agent: KNode/0.7.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Posted-By: 216.94.11.234 Subject: __autoload() stream leak? From: jay@php.net (Jay Smith) Hello, interals... Kind of stumbled onto this by accident. Some kind of FD leak in streams. In the current HEAD (and 5.0.0 RC1, I suppose, although I didn't specifically test that, just my CVS checkout)... class.one.php: class.two.php: foo.php: jay@monty $ php5 foo.php Warning: __autoload(bug_class.one.php): failed to open stream: No such file or directory in /home/jay/bug/class.two.php on line 1 Fatal error: __autoload(): Failed opening required 'bug_class.one.php' (include_path='/usr/local/lib/php:.') in /home/jay/bug/class.two.php on line 3 /home/jay/setup/php/php5/main/streams/streams.c(371) : Stream of type 'STDIO' 0x4014dfac (path:class.two.php) was not closed Getting rid of the line that reads "require('class.two.php');" gets rid of the leak. The "bug_class." in autoload() is also not a typo; fixing that also gets rid of the leak (along with the warnings and such, too, obviously.) No idea what the problem is here, as my knowledge of the streams code is pitiful. J