Subject: Re: MinGW & Windows DEP

Re: MinGW & Windows DEP

From: Eric Nichols (DirWiz) <eric_at_dirwiz.com>
Date: Wed, 8 Dec 2010 09:26:43 -0500 (EST)

On Fri, December 3, 2010 10:32 am, Eric Nichols (DirWiz) wrote:
> Hello all,
> I've run into something that definitely left me scratching my head. I am
> currently compiling c-ares (1.7.3) on a Windows XP Machine running MinGW (gcc
> -v3.4.5), the sample program adig.exe runs pefectly fine in this environment.
>
> This was until I copied the program to a Windows 2003 machine which had DEP
> (Data Execution Prevention) turned on for all programs. The program crashes.
> I even built my own sample program with the same results (crashing on
> ares_process). There is no crash message when either program dies other than
> the fact that the program just halts and on next login DEP starts complaining.
>
> According to Wikipedia
> (http://en.wikipedia.org/wiki/Data_Execution_Prevention) this DEP is basically
> turned on for all programs in server installs but only turned on for system
> programs on desktop OS's.
>
> Has anyone run into this kind of issue? I did some quick googling and
> couldn't find anything.
> Many thanks
> Eric
>

So I believe I've fixed my own bug. I upgraded to mingw-gcc 4.5.0 and found
that I was inadvertently setting the following:
int optmask=ARES_OPT_FLAGS;

I think it failed because I didn't set any flags just the mask. I reset it to
zero and all is well.
Keep up the great work!
Received on 2010-12-08