Oops! [Re: envp corrupted in Interix gcc]

Jerry Miller gmiller@cs.sunysb.edu
Wed Jun 13 14:20:00 GMT 2001


Oops!  Never mind!  I missed the response to this one.
Sorry!

----- Original Message ----- 
From: Jerry Miller <gmiller@cs.sunysb.edu>
To: <gcc-help@gcc.gnu.org>
Sent: Wednesday, June 13, 2001 3:35 PM
Subject: Re: envp corrupted in Interix gcc


> ... or this one either - what gives?  Am I persona non grata?
> 
> ----- Original Message ----- 
> From: Jerry Miller <gmiller@cs.sunysb.edu>
> To: <gcc-help@gcc.gnu.org>
> Sent: Friday, June 08, 2001 1:11 PM
> Subject: envp corrupted in Interix gcc
> 
> 
> > #include <stdio.h>
> > 
> > main(int argc,char*argv[],char **envp)
> > {
> > printf("%p\n",envp);
> > printf("%p\n",envp[0]);
> > }
> > 
> > /* Pretty simple program, huh?  Well, on the Sparc, it yields,
> >     as expected:
> >         effffcf4
> >         effffdad
> >     On my website CGI server, it yields, also as expected:
> >         0xbffffbc8
> >         0xbffffc97
> >     However, on my PC, compiled under the version of gcc,
> >     supplied with Interix, it yields:
> >         0x5
> >         Memory fault
> > 
> >     All three compilers are gcc, and it's not the PC/NT environment,
> >     because VC++ compiles the same code to yield:
> >         00420290
> >         00420340
> > 
> >     What is up with this compiler?  Did Interix (now owned by
> >     Microsoft, but not when we purchased it) mangle the compiler
> >     in some way??  BTW, getenv() and putenv() work despite
> >     this - although, as I mentioned in a previous message, putenv()
> >     for XKEYSYMDB is ineffective unless I specify the one that
> >     resides on the "correct" path!  */
> > 
> 



More information about the Gcc-help mailing list