On Thu, 15 Mar 2012 19:56:11 +0100, Eric Stenson <erics...@microsoft.com> wrote:


The problem I'm running into is the php_cgi!main() on PHP5.4 has changed
behavior. The php_cgi!main() function is seeing us return a ZEND_HANDLE_STREAM,
and it's assuming that the zend_file_handle.handle.stream.handle (void *)
is a (php_stream*), when in fact it's php_wincache's (fcache_handle *).
It then attempts to access the php_stream.ops (a v-table-ish struct), which is not in the fcache_handle, and it jumps off into an invalid address and
promptly AV's.

[...]

I think you should contact Dmitry, as he was the one that committed r301058. That code looks very strange. It seems to want to break the abstraction of zend_stream and assume that handle stores a php_stream (to use e.g. zend_stream_getc instead of php_stream_getc).

But I don't think the assumption done to break the abstraction is correct. For instance, see

http://lxr.php.net/opengrok/xref/PHP_TRUNK/ext/phar/phar.c#3364

which has:

file_handle->handle.stream.handle = phar;

and *phar is of type phar_archive_data, which is not a php_stream (or an augmentation thereof).

--
Gustavo Lopes

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to