From: "John Spence" Newsgroups: comp.os.msdos.djgpp Subject: tracking down runtime error Date: Wed, 19 Aug 1998 03:08:02 +0930 Organization: Telstra Internet Browse Server Lines: 46 Message-ID: <35dab9f3.3381119@l> NNTP-Posting-Host: 203.33.18.66 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Using the following code to display the contents of a linked list with DJGPP (gcc2721b) void traverse(NODEPTR start) { while(start) { printf("%d\n", start->number); start = start->next; } } I get the error which follows during runtime. I can run this program without a problem under Linux with gcc and DOS with Turbo C so I am 99% confident that this is not a problem with my code. Cany anyone help me pinpoint the cause of this error with DJGPP/gcc (dos) or refer me to a doc that will. The values that should have been displayed are 5, 4, 3, 700, 900, 100 ====== start of program output ================== 5 4 3 700 134744064 Exiting due to signal SIGSEGV General Protection Fault at eip=000016ab eax=08080808 ebx=0004f120 ecx=00000000 edx=08080808 esi=00000054 edi=0000dac0 ebp=0004da7c esp=0004da7c program=D:\UNITEMP\C\PRAC3A.EXE cs: sel=00af base=82cc9000 limit=0006ffff ds: sel=00b7 base=82cc9000 limit=0006ffff es: sel=00b7 base=82cc9000 limit=0006ffff fs: sel=0087 base=0000af90 limit=0000ffff gs: sel=00c7 base=00000000 limit=ffffffff ss: sel=00b7 base=82cc9000 limit=0006ffff Call frame traceback EIPs: 0x000016ab 0x00001619 0x00001c5e