Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39818 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13343 invoked from network); 11 Aug 2008 07:31:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Aug 2008 07:31:20 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.163 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 212.25.124.163 il-gw1.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.163] ([212.25.124.163:31999] helo=il-gw1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 42/90-08773-5CAEF984 for ; Mon, 11 Aug 2008 03:31:19 -0400 Received: from [10.1.10.36] ([10.1.10.36]) by il-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 11 Aug 2008 10:32:04 +0300 Message-ID: <489FEABA.5080408@zend.com> Date: Mon, 11 Aug 2008 11:31:06 +0400 User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Pierre Joye CC: Rasmus Lerdorf , Hannes Magnusson , Arnaud Le Blanc , internals@lists.php.net, Felipe Pena , Christian Stocker , Andi Gutmans , Stanislav Malyshev References: <4899C4B4.3060902@liip.ch> <1218138548.5346.3.camel@felipe> <489B5285.1070000@lerdorf.com> <200808072237.01841.arnaud.lb@gmail.com> <7f3ed2c30808080011l3c62d416k7fd9b4dd455df99e@mail.gmail.com> <489C6BBA.8030101@zend.com> <489CBDD8.6070502@lerdorf.com> <489CBE81.5030003@lerdorf.com> <489DB787.8060508@zend.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 11 Aug 2008 07:32:05.0151 (UTC) FILETIME=[5A6E92F0:01C8FB84] Subject: Re: [PHP-DEV] include bug in 5.3 From: dmitry@zend.com (Dmitry Stogov) Hi Pierre, Thank you for feedback. You are definitely right about FindClose(). The failure of realpath_basic-win32.phpt is expected, as behavior of realpath() became the same as on Linux (slashes after regular file name are not allowed). I wasn't able to reproduce realpath_basic2.phpt failure (may be because I added missing FindClose()). Thanks. Dmitry. Pierre Joye wrote: > hi Dmitry, > > On Sat, Aug 9, 2008 at 5:28 PM, Dmitry Stogov 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,