Hi -
You might be able to get rid of the message by setting this before you run the program:
This will NOT fix the underlying problem - it will just mask the symptoms. Your code (or some library your code is using) will still have a very serious bug in it. But if you try it, and the error goes away - that would definitely be useful information.
Look at all your "malloc()" statements, and where you use "malloc'ed" memory.
Here is one example of the kind of bug that can cause this error:
Code:
// !!! BAD CODE: guaranteed to cause problems!!!!
char *c = malloc (strlen ("abc"));
strcpy (c, "abc");
Here is how you might improve this example:
Code:
// Much better!
char *c = NULL; // Always initialze your pointers to NULL!!!
c = malloc (strlen ("abc") + 1); // Never forget to allocate space for the NULL byte
// at the END of strings!
// For example, be sure you allocate *4* bytes for a 3-character string!
if (!c) // Always check the return from "malloc()"
{
perror ("UNABLE TO ALLOC STRING!");
abort (); // Calling "abort()" (and leaving a well-debugable core dump)
// is often times BETTER than trying to "recover"
}
else
strcpy (c, "abc");
You can read more about your "*** glibc detected *** corrupted double-linked list: 0x0805beb8 ***" error and $MALLOC_CHECK_ here:
http://www.gnu.org/software/libc/man...-Checking.html
'Hope that helps .. PSM
PS:
Valgrind is a very helpful tool:
http://www.valgrind.org