472,141 Members | 1,003 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,141 software developers and data experts.

*** glibc detected *** malloc(): memory corruption (fast): 0x0804c008 ***

I get this error after running my application for some time. What does it
mean and what should I be looking for in my code?
Nov 15 '05 #1
3 94750
Paminu <ja******@asd.com> wrote in news:di**********@news.net.uni-c.dk:
Subject: *** glibc detected *** malloc(): memory corruption (fast):
0x0804c008 ***
Don't put important information only in the subject line.
I get this error after running my application for some time. What does
it mean and what should I be looking for in my code?


You seem to be using a specific tool for detecting memory usage errors.
You are going to have to find a way to get more information out of that
tool, or seek help from sources devoted to providing help for that tool.

Without any more information, you probably write beyond the end of an
allocated memory block somewhere in your program. You should examine how
you use pointers.

Sinan

--
A. Sinan Unur <1u**@llenroc.ude.invalid>
(reverse each component and remove .invalid for email address)
Nov 15 '05 #2
In article <di**********@news.net.uni-c.dk>, Paminu <ja******@asd.com> wrote:
I get this error after running my application for some time. What does it
mean and what should I be looking for in my code?


Probably you are either writing outside the bounds of a block of
memory that you have malloc()ed, are you are using a block after you
have free()d it.

Most operating systems have tools available to help you find such bugs.
It looks like you're using Linux: "man -k malloc" may help you find
some.

-- Richard
Nov 15 '05 #3
Paminu wrote:
I get this error after running my application for some time. What does it
mean and what should I be looking for in my code?


Recent versions of glibc offer this minimal diagnostic. Probable
causes:

* Writing beyond the end of a memory block obtained via malloc
or realloc.

* Writing/reading memory that has been released with free().

To get more detail, try the very exellent valgrind.

http://valgrind.org/

Allin Cottrell
Nov 15 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

32 posts views Thread by Clunixchit | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.