Hello,

There are some leaks in PHP associated with virtual_file_ex() usage.
The problem is that that function doesn't free the new 'cwd' on error (path not found).

Taking a look at http://lxr.php.net/ident?i=virtual_file_ex we can see the function usage. For example, expand_filepath() free()s the cwd on failure, while ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER() doesn't.


I'm not sure if you want virtual_file_ex() to clean the cwd itself, or leave that responsibility to the caller, but we should define the convention and patch the relevant places (and fix those mem leaks).

One test that triggers the problem is: tests/lang/bug35176.phpt


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

Reply via email to