logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Apache 2.2.3 & mod_rewrite (win32 works, win64 does not)
Author
EElyn



Joined: 16 Oct 2006
Posts: 4

PostPosted: Mon 16 Oct '06 1:51    Post subject: Apache 2.2.3 & mod_rewrite (win32 works, win64 does not) Reply with quote

Hi,

I've been hunting an irritating bug for the past 3 hours and finally managed to boil the problem down to mod_rewrite on my x64 platform.

I've got a standard XP32 and a 2003x64 available on two separate machines, and performed out-of-the-box testing on v2.2.3 on both to narrow down the problem.

Turning on logging for mod_rewrite currently cause the win64 httpd child process to crash. This does not happen on the 32 platform, so I guess mod_rewrite hasn't been ported totally yet.

To reproduce, simply add the following lines to the bottom of the installer generated httpd.conf file:

LoadModule rewrite_module modules/mod_rewrite.so
RewriteEngine on
RewriteLog C:/rewrite.log
RewriteLogLevel 10

Could someone please verify this? My client fails with 0xC0000005, which could be caused by DEP or simply a memory corruption.. I haven't fiddled with it though..

My current dev environment cannot handle x64 code, so I’m searching for confirmation on the problem before starting to create one..

So.. I would greatly appreciate it if someone could try the above code on an out-of-the-box config of apache v2.2.3 on win64 Smile
Back to top
EElyn



Joined: 16 Oct 2006
Posts: 4

PostPosted: Mon 16 Oct '06 5:11    Post subject: Reply with quote

Pfew.. okay, after getting my remote x64 debugger up and running, I continued the hunt for the bug.. The solution is to apply an apparently missing flag to the libapr compilation.

Unless the flag APR_VOID_P_IS_QUAD is defined, the apr_vformatter (part of a snprintf equivalent function) will always fail when trying to parse a pointer request (%p).. If it fails, it cannot correctly increase the data-to-be-formatted pointer (va_arg(ap, void*)) with the correct bytes. If any other data is to be formatted after this failure, then the pointers to that data will most likely be wrong. This was the case with my mod_rewrite log bug Sad

so.. To fix:
Apply the APR_VOID_P_IS_QUAD flag to the compilation of libapr.

Do this by adding '/D "APR_VOID_P_IS_QUAD"' to the Additional Options under Command Line part of libapr Property pages.

I've searched through the entire 2.2.3 sourcetree for additional APR_VOID_P_IS_QUAD's, but none was found.. so it is only possible to apply this flag through /D.
Back to top
PaRK_7677



Joined: 01 Jun 2006
Posts: 65
Location: Missouri

PostPosted: Thu 19 Oct '06 3:09    Post subject: Reply with quote

Thank you for the detective work EElyn. Unfortunately I'm not the one working on Apache x64 (I've done it but my accomplishments with it are far behind Jorge's)

Hopefully he will see this thread and can look into it Smile Thanks for supporting the cause Mr. Green
Back to top
Jorge



Joined: 12 Mar 2006
Posts: 376
Location: Belgium

PostPosted: Thu 19 Oct '06 17:39    Post subject: Reply with quote

I have no experience with debugging C Code, I maged to submit a minor patch to the 2.2 source tree that is currently under revision of wrowe.

I passed along the error description to ASF aswel. Not sure if they'll fix this in a hurry.

x64 support isn't there top priority.
Back to top


Reply to topic   Topic: Apache 2.2.3 & mod_rewrite (win32 works, win64 does not) View previous topic :: View next topic
Post new topic   Forum Index -> Apache