Re: include bug in 5.3
| From: | Pierre Joye | Date: | Sat, 09 Aug 2008 18:54:27 +0000 |
| Subject: | Re: include bug in 5.3 | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-39799@lists.php.net to get a copy of this message | ||
hi Dmitry,
On Sat, Aug 9, 2008 at 5:28 PM, Dmitry Stogov <dmitry@zend.com> wrote:
> The improved patch fixes all the issues I found during testing.
> However I wasn't able to test it on NETWARE and on Solaris with relative
> paths.
>
> Please test it as much as possible.
I run the test suite and the results can be seen here:
http://phpfi.com/341752
There is two failing for real path (Server 2008, Vista 64 and XP (32 and 64)):
Test realpath() function: basic functionality
[C:\Users\pierre\Documents\php-sdk\vc9\x86\php_5_3\ext\standard\tests\file\realpath_basic-win32.phpt]
realpath() with relative directory
[C:\Users\pierre\Documents\php-sdk\vc9\x86\php_5_3\ext\standard\tests\file\realpath_basic2.phpt]
Some other may fail because of a change in realpath behavior. I will
run them again without the patch and post again the affected tests.
> I'm going to commit it on Tuesday in case of no objections.
A FindClose is missing:
> +#ifdef TSRM_WIN32
> + if (save && (hFind = FindFirstFile(path, &data)) ==
> INVALID_HANDLE_VALUE) {
> if (use_realpath == CWD_REALPATH) {
> - return 1;
> + /* file not found */
> + return -1;
> }
.....
> + if (save) {
> + directory = (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) !=
> 0;
> + if (is_dir && !directory) {
> + /* not a directory */
FindClose(hFind);
> + return -1;
> + }
> + }
> + tmp = tsrm_do_alloca(len+1, use_heap);
> + memcpy(tmp, path, len+1);
> +#elif defined(NETWARE)
> + save = 0;
> + tmp = tsrm_do_alloca(len+1, use_heap);
> + memcpy(tmp, path, len+1);
> #else
Cheers,
--
Pierre
http://blog.thepimp.net | http://www.libgd.org