Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15336 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43903 invoked by uid 1010); 9 Mar 2005 17:52:17 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 43685 invoked from network); 9 Mar 2005 17:52:15 -0000 Received: from unknown (HELO pb1.pair.com) (127.0.0.1) by localhost with SMTP; 9 Mar 2005 17:52:15 -0000 X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:52410] helo=mail.zend.com) by pb1.pair.com (ecelerity HEAD r(5124)) with SMTP id AC/69-53294-DB73F224 for ; Wed, 09 Mar 2005 12:51:58 -0500 Received: (qmail 18051 invoked from network); 9 Mar 2005 17:51:44 -0000 Received: from shire.zend.office (10.1.2.160) by internal.zend.office with SMTP; 9 Mar 2005 17:51:44 -0000 Date: Wed, 9 Mar 2005 19:51:44 +0200 (IST) X-X-Sender: frodo@shire.zend.office To: Marcus Boerger cc: Derick Rethans , PHP Development In-Reply-To: Message-ID: References: <4e89b4260503090718503f9a5@mail.gmail.com> <4e89b42605030907315a85ce74@mail.gmail.com> <4e89b426050309075047ce556c@mail.gmail.com> <4e89b42605030908146b8d99f3@mail.gmail.com> <4e89b42605030908535214ead0@mail.gmail.com> <1327184532.20050309183515@marcus-boerger.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] zend_stream_fixup From: stas@zend.com (Stanislav Malyshev) SM>>Do you know _any_ external extension that relies on the fact that SM>>file_handle is only STREAM - taking into account this is false - SM>>file-handle can perfectly well be anything else prior to calling fixup SM>>- and probably after too, since dtor does have switch? Can you explain BTW, after more look on the code - NOTHING guarantees you the handle is STREAM after the fixup, since fixup calls zend_stream_open, and zend_stream_open calls zend_stream_open_function which is overridable and can set file_handle to *anything* - and only FP would be converted to STREAM, but all others typed would not. So actually if anybody overrides zend_stream_open_function so that it returns anything but STREAM or FP (and there's no indication anywhere why such behaviour would not be acceptable) - the extension that supposes handles can be only STREAM even after fixup is broken. Only thing fixup is guaranteeing that the handle is never FP - which I don't see to be a reasonble thing anyway, why FP is so special that there's a dedicated function to kill it? -- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115