#49040 [Com]: GPF when passing non-absolute file name
| From: | sant9442 at gmail dot com | Date: | Thu, 23 Jul 2009 19:51:17 +0000 |
| Subject: | #49040 [Com]: GPF when passing non-absolute file name | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-140156@lists.php.net to get a copy of this message | ||
ID: 49040
Comment by: sant9442 at gmail dot com
Reported By: sant9442 at gmail dot com
Status: Feedback
Bug Type: CGI related
Operating System: Windows XP
PHP Version: 5.3.0
New Comment:
With this 5.3.1-dev binaries, source and debug symbols installed and
running:
G:\files\php>cd php-5.3.1-dev-Win32
G:\files\php\php-5.3.1-dev-Win32>php-cgi foobar\foobar.php
the JIT debugger shows the same fault source location in
sapi\cgi\cgi-main.c location with the path pointer of 0x0000000.
A NULL check should be done here, but the odds are very good that the
massive 5.3 changes in the filename parsing is the origin of the
problem.
I say that because bug #49039 was the original problem found and in the
midst of resolving why that was happening by trying relative paths, this
GPF was discovered.
So I might suggest both these bugs be lumped together because the odds
are good resolved #bug 49039 will resolve this one as well. However,
adding a NULL check here probably is not a bad idea.
Previous Comments:
------------------------------------------------------------------------
[2009-07-23 19:27:45] jani@php.net
Please try using this snapshot:
http://snaps.php.net/php5.3-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
------------------------------------------------------------------------
[2009-07-23 19:25:00] sant9442 at gmail dot com
Description:
------------
A GPF was observed in line #737 in sapi\cgi\cgi_main.c:
if (!IS_ABSOLUTE_PATH(path, path_len)) {
real_path = tsrm_realpath(path, NULL TSRMLS_CC);
fault-> real_path_len = strlen(real_path);
path = real_path;
path_len = real_path_len;
}
Reproduce code:
---------------
1) Install PHP 5.3 for win32 (VC6) version (I have not tried the VC9
version).
2) Switch to the folder and type:
C:\PHP-5.3.0.WIN32
php-cgi.exe FOOBAR\FOOBAR.PHP
It doesn't matter if FOOBAR folder exist or not.
Under Windows XP, with Visual Studio installed, the JIT debugger
appears. With the debug symbols avaiable, it shows the error location.
NOTE: I can not repeat this under Windows 2000, which tells me it is a
RANDOM memory bug. Whatever the pointer has in memory.
Expected result:
----------------
A "No Input File Specified" (NO GPF)
Actual result:
--------------
Under Windows XP, with Visual Studio installed, the JIT debugger
appears. With the debug symbols avaiable, it shows the error location.
NOTE: I can not repeat this under Windows 2000, which tells me it is a
RANDOM memory bug. Whatever the pointer has in memory.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49040&edit=1