[H-GEN] malloc() causing a segfault

Andrae Muys a.muys at mailbox.uq.edu.au
Wed Aug 30 23:33:18 EDT 2000


[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics.  Please observe the list's charter.          ]

On Thu, 31 Aug 2000, Nikolai Lusan wrote:

> [ Humbug *General* list - semi-serious discussions about Humbug and ]
> [ Unix-related topics.  Please observe the list's charter.          ]
> 
> The odd this is this code is part of a proccedure that can run a hundred
> time with no problems, the exact fault occurs with the malloc and a
> debugger gives "0x40065c06 in free () from /lib/libc.so.6". Personally I
> have no Idea why this is happening, and it has been eating me all
> morning.

Easy, you're looking in the wrong place.  This is a memory corruption
error, somewhere you've got a buffer overrun, or you've freed some memory
twice, or ????.  Regardless you've corrupted libc's heap management and so
it's segfaulting at that point.  Good luck, these bugs can be really
vicious.

Andrae

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Andrae Muys <andrae at humbug.org.au> "Never ascribe to malice that which is
Shortech International Ltd          adequately explained by incompetence."
                                                     -Napoleon Bonaparte


--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.



More information about the General mailing list