From: Nate Eldredge Newsgroups: comp.os.msdos.djgpp Subject: Re: Newbie: HELP! It won't work!!!! Date: Mon, 04 Oct 1999 16:17:48 -0700 Organization: Harvey Mudd College Lines: 42 Message-ID: <37F9359C.DDC426F2@hmc.edu> References: <37f92508 DOT 181091 AT news DOT image DOT dk> NNTP-Posting-Host: mercury.st.hmc.edu Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: nntp1.interworld.net 939079109 16063 134.173.45.219 (4 Oct 1999 23:18:29 GMT) X-Complaints-To: usenet AT nntp1 DOT interworld DOT net NNTP-Posting-Date: 4 Oct 1999 23:18:29 GMT X-Mailer: Mozilla 4.61 [en] (X11; U; Linux 2.2.13pre12 i586) X-Accept-Language: en To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Sune Nielsen wrote: > > Please don't rip my head off for posting this rather longish email, > but I seriously need help :( > > I've recently upgraded DJGPP from version 2.01 to 2.02, and now, for > some reason of which I have absolutely no idea, it compiles my code > into completely rubbish. Well... it actually compiles rather fine, but > when I try to run the program it tells me something like > > ---------------------- > Call frame traceback: > in function malloc+99 > in function _flsbuf+76 > etc... > --------------------- > > I mean "malloc"... I donīt even use that function (itīs supposed to be > C++ ;) > Have I totally missed some point or... is my code really that buggy? I > am positive that it worked under v2.01! It's very likely to be a bug in your code. v2.02 introduced a new implementation of malloc (and C++'s `new' and `delete' are built on top of the `malloc' family) that happens to be much less tolerant of erroneous behavior like overrunning arrays and multiple freeing. Note that your traceback doesn't necessarily point to the buggy code; often something like an overrun will corrupt malloc's internal state and cause it to crash on a later, valid operation. Anyway, you should start hunting the bug. An automated malloc checking tool is often helpful in cases like these. I've written one called YAMD available from http://www3.hmc.edu/~neldredge/yamd/ There are others on Simtelnet if you prefer. -- Nate Eldredge neldredge AT hmc DOT edu