Re: Re: RC6 ISAPI problems
| From: | Phil Driscoll | Date: | Mon, 18 Dec 2000 10:56:42 +0000 |
| Subject: | Re: Re: RC6 ISAPI problems | ||
| Groups: | php.dev php.qa | ||
| Request: | Send a blank email to php-dev+get-41721@lists.php.net to get a copy of this message | ||
When I run the debug version of RC6 as an isapi module on NT4 SP6, I cannot
even get a simple phpinfo() page to display.
Now that I have the thing running in my VC++ debugger in what seems to be a
reliable way, I can see where things hang up. (Note that the non debug
version definitely gets past this point - as I suspect there is less (or no)
heap integrity checking.)
The problem seems to be due to a corrupt heap which comes to light in
virtual_cwd as it tries to free(cwd) immediately before the final return in
the function. The debugger reports that 'a user breakpoint has been
encountered', and when I continue from there, the code just goes round in
circles.
I can't work out whether the cwd passed to free is a dodgy pointer or the
heap itself is corrupted somehow. cwd certainly contains the null terminated
string 'C:\WINNT\system32' which should have been allocated by the strdup at
the return from virtual_getcwd_ex.
The nearest I know how to get to a stack backtrace is to manually copy out
the Context fields from the debug window:
Loads of stuff before php gets called, then:
DLLMain
php_isapi_startup
php_module_startup
php_config_ini_startup
php_init_config
php_fopen_with_path
php_fopen_and_set_opened_path
expand_filepath
virtual_get_cwd
then we are into the C runtime with
free
_free_dbg
_free_dbg_lk
_CrtlsValidHeapPointer
then into the Kernel (no debug symbols here - just memory locations
KERNEL32! (memory location)
NTDLL! (memory location)
NTDLL! (memory location)
So, does anyone have any suggestions as to where I should go from here?
Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org