Mailing List Archive

Re: A bug with httpd-2.4.2 Win-x64
Hi Bing,
you did hit the apr list - I think this should go to the httpd list
instead ... ;-)


Am 16.04.2012 14:32, schrieb Bing Swen:
> After building the httpd-2.4.2 x64 binaries with VS2010, I encountered a runtime error in the module libhttpd.dll, which alerts that a heap corruption occurred at somewhere:
> file D:\_bsDev\KSE\httpd-2.4.2\server\config.c
> line 680:
> free(ap_module_short_names[m->module_index]);
>
> The free() call always led to heap corruption like this:
> HeapFree(_crtheap, 0, pBlock);
> // access error with pBlock == NULL.
>
> My temp solution is commenting off this single line to get httpd.exe run. Please verify if it is a bug.
>
> Regards,
> Bing
RE: A bug with httpd-2.4.2 Win-x64 [ In reply to ]
The problem reported below was only with the binaries of the Debug configuration, but
disappeared in the Release configuration. So here is my temporay way out:

/* line no. 680: */
#ifndef _DEBUG
free(ap_module_short_names[m->module_index]);
#endif

Regards,
Bing


Guenter Knauf [mailto:fuankg@apache.org] wrote on 2012年4月16日 21:06

Hi Bing,
you did hit the apr list - I think this should go to the httpd list instead ... ;-)


Am 16.04.2012 14:32, schrieb Bing Swen:
> After building the httpd-2.4.2 x64 binaries with VS2010, I encountered a runtime error in the module libhttpd.dll, which alerts that a heap corruption occurred at somewhere:
> file D:\_bsDev\KSE\httpd-2.4.2\server\config.c
> line 680:
> free(ap_module_short_names[m->module_index]);
>
> The free() call always led to heap corruption like this:
> HeapFree(_crtheap, 0, pBlock);
> // access error with pBlock == NULL.
>
> My temp solution is commenting off this single line to get httpd.exe run. Please verify if it is a bug.
>
RE: A bug with httpd-2.4.2 Win-x64 [ In reply to ]
On Tue, 17 Apr 2012, Bing Swen wrote:

> The problem reported below was only with the binaries of the Debug configuration, but
> disappeared in the Release configuration. So here is my temporay way out:
>
> /* line no. 680: */
> #ifndef _DEBUG
> free(ap_module_short_names[m->module_index]);
> #endif

I can't see anything wrong with that code. I fear the heap corruption
happens at some other place and it is coincidence that it is detected
here. Are there any additional heap consistency checks that you can switch
on?

>
> Regards,
> Bing
>
>
> Guenter Knauf [mailto:fuankg@apache.org] wrote on 2012年4月16日 21:06
>
> Hi Bing,
> you did hit the apr list - I think this should go to the httpd list instead ... ;-)
>
>
> Am 16.04.2012 14:32, schrieb Bing Swen:
>> After building the httpd-2.4.2 x64 binaries with VS2010, I encountered a runtime error in the module libhttpd.dll, which alerts that a heap corruption occurred at somewhere:
>> file D:\_bsDev\KSE\httpd-2.4.2\server\config.c
>> line 680:
>> free(ap_module_short_names[m->module_index]);
>>
>> The free() call always led to heap corruption like this:
>> HeapFree(_crtheap, 0, pBlock);
>> // access error with pBlock == NULL.
>>
>> My temp solution is commenting off this single line to get httpd.exe run. Please verify if it is a bug.
>>
>
>
Re: A bug with httpd-2.4.2 Win-x64 [ In reply to ]
Hi Stefan,

I tried many possible ways, and only found this clue for now:

/* main.c, line 707 */
apr_pool_clear(pconf);
/* bad pointer: pBlock */

It always happens with the Debug config of the VS2010 x64 platform setting, not with the Release version, or both of the VS2008(VS9) x64 builds.
BTW, I converted the project files in this way:
Apache.dsw + *.dsp ==> Apache(VS9).sln + *.vcproj ==> Apache(VS10).sln + *.vcXproj

Regards,
Bing



Stefan Fritsch [mailto:sf@sfritsch.de] wrote on 2012年4月18日 3:29

On Tue, 17 Apr 2012, Bing Swen wrote:
> The problem reported below was only with the binaries of the Debug
> configuration, but disappeared in the Release configuration. So here is my temporay way out:
>
> /* line no. 680: */
> #ifndef _DEBUG
> free(ap_module_short_names[m->module_index]);
> #endif

I can't see anything wrong with that code. I fear the heap corruption happens at some other place and it is coincidence that it is detected here. Are there any additional heap consistency checks that you can switch on?