From: "A. Sinan Unur" Newsgroups: comp.os.msdos.djgpp Subject: Re: problem with malloc and free Date: 14 Dec 2002 22:15:24 GMT Organization: Cornell University Lines: 32 Sender: asu1 AT cornell DOT invalid (on pool-141-149-208-55.syr.east.verizon.net) Message-ID: References: <000001c2a37a$59f41060$186a10ac AT citechbd DOT com> <3277-Sun15Dec2002000831+0200-eliz AT is DOT elta DOT co DOT il> NNTP-Posting-Host: pool-141-149-208-55.syr.east.verizon.net X-Trace: news01.cit.cornell.edu 1039904124 7012 141.149.208.55 (14 Dec 2002 22:15:24 GMT) X-Complaints-To: usenet AT news01 DOT cit DOT cornell DOT edu NNTP-Posting-Date: 14 Dec 2002 22:15:24 GMT User-Agent: Xnews/5.04.25 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Eli Zaretskii" wrote in news:3277- Sun15Dec2002000831+0200-eliz AT is DOT elta DOT co DOT il: >> From: "Lars O. Hansen" >> Newsgroups: comp.os.msdos.djgpp >> Date: Sat, 14 Dec 2002 16:30:55 +0100 >> > >> > Call frame traceback EIPs: >> > 0x00003825 _free+77 >> > 0x000018bb _freeall+99 >> > 0x0000353f _exit+31 >> > 0x0000171f _main+31 >> > 0x00003138 ___crt1_startup+176 >> >> also as you can see in the traceback in Re to Richard, it crashed in >> the first free. So free is somehow the problem. > > Crashes inside `free' or `malloc' usually mean that your program > overwrites buffers allocated with `malloc' and thus destroys hidden > data about the heap stored by `malloc' at both ends of the buffer it > allocates. > > So you need to look for such bugs in your program. in fact, they are pretty easy to locate. see my earlier response to the OP. -- A. Sinan Unur asu1 AT c-o-r-n-e-l-l DOT edu Remove dashes for address Spam bait: mailto:uce AT ftc DOT gov