From: Richard Dawe Newsgroups: comp.os.msdos.djgpp Subject: Re: problem with malloc and free Date: Sat, 14 Dec 2002 12:38:03 +0000 Lines: 44 Message-ID: <3DFB262B.805C9F0E@phekda.freeserve.co.uk> References: NNTP-Posting-Host: 62.136.92.240 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news6.svr.pol.co.uk 1039871104 27402 62.136.92.240 (14 Dec 2002 13:05:04 GMT) NNTP-Posting-Date: 14 Dec 2002 13:05:04 GMT X-Complaints-To: abuse AT theplanet DOT net X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.23 i586) X-Accept-Language: de,fr To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hello. "Lars O. Hansen" wrote: > > Still stripped down, but this always crashes when compiled with gcc -pedantic -Wall is.c -lalleg > > C:\Programme\djgpp\projects>a > Exiting due to signal SIGSEGV > General Protection Fault at eip=00003180 > eax=00000000 ebx=000084f9 ecx=00000000 edx=76202000 esi=00000054 edi=000656c4 > ebp=000e5668 esp=000e5630 program=C:\PROGRA~1\DJGPP\PROJECTS\A.EXE > cs: sel=00a7 base=84f99000 limit=000effff > ds: sel=00af base=84f99000 limit=000effff > es: sel=00af base=84f99000 limit=000effff > fs: sel=0087 base=000111c0 limit=0000ffff > gs: sel=00c7 base=00000000 limit=0010ffff > ss: sel=00af base=84f99000 limit=000effff > App stack: [000e56c4..000656c4] Exceptn stack: [0006561c..000636dc] > > Call frame traceback EIPs: > 0x00003180 > 0x000017b1 > 0x0000184a > 0x000015f5 > 0x00040af8 [snip] Try rebuilding the objects and executable with the -g option. Then please post what: symify C:\PROGRA~1\DJGPP\PROJECTS\A.EXE or: bfdsymify C:\PROGRA~1\DJGPP\PROJECTS\A.EXE displays. These programs decode the backtrace. You may also want to read the DJGPP FAQ (readable at http://www.delorie.com/djgpp/ ), which describes how to debug DJGPP programs. Regards, -- Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]