By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,105 Members | 1,452 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,105 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.