GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 11-Apr-2006, 12:52
asarje asarje is offline
New Member
 
Join Date: Apr 2006
Posts: 3
asarje is on a distinguished road

*** glibc detected *** double free or corruption (out): 0x08065060 ***


Hi,

I have a huge program in c++ using lots of pointers. I have been working on it for few months now. Since about few days I am getting this error:

*** glibc detected *** double free or corruption (out): 0x08065060 ***

when I delete a memory allocated using "new". This error comes the first time I try to delete. I have been trying to find the problem, but I am kind of given up now. As for as I think, there is no overwriting/overflowing taking place.

Can someone help me with ideas as to what may be causing this problem?

Thanks.

Abhi.
  #2  
Old 11-Apr-2006, 13:05
QED's Avatar
QED QED is offline
Member
 
Join Date: Feb 2005
Location: Hudson Valley, NY
Posts: 231
QED is a jewel in the roughQED is a jewel in the roughQED is a jewel in the rough

Re: *** glibc detected *** double free or corruption (out): 0x08065060 ***


Two possibilities come to mind.
  1. You are actually deleting the same thing twice, though you think it is just once.
  2. You are deleting something that was not allocated via calling operator new.
Without some more specific info or some code, I don't have much to add.

Matthew
__________________
I was born not knowing and have only had a little time to change that here and there. -- Richard P. Feynman

Boris Podolsky: James! How's the rat business?
James Moreland: Well, actually it's mostly students I'm experimenting on now.
Kurt Gödel: My God, the mazes must be enormous.
  #3  
Old 11-Apr-2006, 14:48
asarje asarje is offline
New Member
 
Join Date: Apr 2006
Posts: 3
asarje is on a distinguished road

Re: *** glibc detected *** double free or corruption (out): 0x08065060 ***


Thanks for reply. But none of the two possibilities are happening.

I have a tree structure, and I create new nodes in the tree using "new" with the structure for the node. The 'first' time I try to delete one node, I get that error. Using GDB, I tried to locate something but everything seems fine. Just before deleting the node, I perform some modifications to other nodes (reassign some variables), and then isolate the node I want to delete and call "delete" to free the memory. In GDB, I can clearly see that the node to be deleted is working fine, and everything exists. I do not delete anything before this (this is the first delete operation called).

I am not able to put some code here due to huge size of it, and isolating few things might be difficult (and may not include the code having the problem). If you have any other ideas, do tell me.

Thanks again.

Abhi.
  #4  
Old 11-Apr-2006, 19:36
TurboPT's Avatar
TurboPT TurboPT is offline
Senior Member
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 1,233
TurboPT is a jewel in the roughTurboPT is a jewel in the roughTurboPT is a jewel in the rough

Re: *** glibc detected *** double free or corruption (out): 0x08065060 ***


Search for this string in google:

"double free or corruption (out):"

This problem seems to be common and varies by platform (or distribution).
(there are over 15 million hits without the quotes, but < 900 hits with the quotes)

Maybe one of the hits can be helpful for you, by further narrowing the results with your version/distribution.

Please let us know what you discover.
__________________
Use the force...read the source!!
WYCIWYG -- what you code is what you get!
  #5  
Old 11-Apr-2006, 19:55
asarje asarje is offline
New Member
 
Join Date: Apr 2006
Posts: 3
asarje is on a distinguished road

Re: *** glibc detected *** double free or corruption (out): 0x08065060 ***


Ofcourse I searched a lot in google before posting this problem here. Unfortunately I did not find any link that was useful to me.
  #6  
Old 16-Apr-2006, 01:25
prahlad prahlad is offline
New Member
 
Join Date: Apr 2006
Location: Hungary
Posts: 1
prahlad is on a distinguished road

Re: *** glibc detected *** double free or corruption (out): 0x08065060 ***


hi asarje,

i had the same problem in the software i am currently working on. I managed to solve it by deleting all files from my working directory except *.cpp *.h and Makefile. When i recompiled everything from the beginning, the runtime error you specified disappeared.

So i guess something was not up2date in my previously compiled .o files, though i am not an expert at all. Maybe we should fix something in our Makefiles.

Hope i could help you,
prahlad
 
 

Recent GIDBlogInstall Adobe Flash - Without Administrator Rights by LocalTech

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hip Hop and All kinds of New Beats Heard on This Site>>> hiphop2006 Music Forum 0 08-Mar-2006 18:47
Double output leanieleanz C++ Forum 1 11-Mar-2005 20:19

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 03:08.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.