Date: Tue, 25 Aug 1998 15:27:26 +0300 (IDT) From: Eli Zaretskii To: Mike Rusch cc: djgpp AT delorie DOT com Subject: Re: keyword "new" causes SIGSEV In-Reply-To: <35E1C842.45EFF366@newnorth.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Mon, 24 Aug 1998, Mike Rusch wrote: > When I run the program and get to a point where reptfmtcpy is used (in > function formatnew(), I get a SIGSEV: > > 0x0000c8d0 _malloc+192 First, please never censor the traceback that is printed at the point of crash; always post it in its entirety. The part that you omitted (the register dump, selectors, etc.) includes important information that tells a lot to those who know how to read it. And second, crashes at _malloc+192 usually mean that some part of your program writes past the end of an allocated buffer, like if you allocate 20-byte buffer and copy a 20-character string into it. I suggest to look for such code in your program. > From the traceback it almost looks like "new" calls > malloc, but this seems strange to me since new is supposed to be a > keyword, and supposedly more efficient than malloc. `new' calls `malloc' internally. But I don't think the problem is with `malloc', most probably your code is doing something bad.