Mail Archives: djgpp/1998/08/25/08:31:22
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.
- Raw text -