From: Andrew Crabtree Message-Id: <199705311615.AA057665326@typhoon.rose.hp.com> Subject: One for the Gurus To: djgpp AT delorie DOT com Date: Sat, 31 May 1997 9:15:26 PDT Precedence: bulk Hi Guys - This is pretty embarrassing, and may seem somewhat stupid, but I can no longer compile and run a 'hello world' program. Please read on, it does get more interesting. I am using pgcc stuff, and I have also modified potions of libc, including the crt code. Here's my test program. #include int main(void) { printf("Hello World\n"); return 0; } It compiles OK. When I try to run it I get the following Exiting due to SIGSEGV General Protection Fault at eip=00003424 eax=00000004 ebx=00000000 ecx=0004beb1 edx=3a633d52 esi=fffffffc edi=00000001 ebp=00000001 esp=0004be80 program=C:\DJGPP\TEMP\HELLO.EXE cs: sel=00a7 base=831b2000 limit=0005ffff ds: sel=00b7 base=831b2000 limit=0005ffff es: sel=00b7 base=831b2000 limit=0005ffff fs: sel=0087 base=00010da0 limit=0000ffff gs: sel=00c7 base=00000000 limit=ffffffff ss: sel=00b7 base=831b2000 limit=0005ffff Call frame traceback EIPs: 0x00003424 Now - I would have run symify on it, but symify crashes too!. Things are pretty much similar, but eip is 469c. So, my next thought was to load it up into GDB and fix the problem. Well, no luck. Things run perfectly under GDB. (gdb) r Starting program: c:/djgpp/temp/hello.exe Hello World Program exited normally I did a bit more experimenting and found that other programs couldn't be run either. Notably, stubify. So, I can't run stubify manually, but I assume it can run because gcc invokes it after the link stage, and all that goes OK. Well, the last thing I tried is going over to my other computer (networked) and trying things. I mapped the drive where djgpp is to a local one, and ran the hello program (the exact same exe, not even copied). Everything worked fine! I don't know what to think now. Any help is appreciated. Andrew