linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* "double free or corruption" - how to solve this?
@ 2006-05-12  8:11 Shriramana Sharma
  2006-05-12  8:19 ` wwp
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Shriramana Sharma @ 2006-05-12  8:11 UTC (permalink / raw)
  To: linux-c-programming

One of my programs, which was working quite well till now, suddenly
gives me the error:

*** glibc detected *** double free or corruption (top): 0x0808a338 ***
Aborted

It is a pure C program compiled with GCC 4.02 -- I do not understand
why it does not work suddenly. Please tell me what the above error can
be.

Thanks.

^ permalink raw reply	[flat|nested] 9+ messages in thread
* AW: "double free or corruption" - how to solve this?
@ 2006-05-12 20:40 Jedenastik, Günther
  2006-05-12 22:18 ` Steve Graegert
  0 siblings, 1 reply; 9+ messages in thread
From: Jedenastik, Günther @ 2006-05-12 20:40 UTC (permalink / raw)
  To: linux-c-programming


>Hello Shriramana,


>On Fri, 12 May 2006 13:41:12 +0530 "Shriramana Sharma" <samjnaa@gmail.com> >wrote:

>> One of my programs, which was working quite well till now, suddenly
>> gives me the error:
>> 
>> *** glibc detected *** double free or corruption (top): 0x0808a338 ***
>> Aborted
>> 
>> It is a pure C program compiled with GCC 4.02 -- I do not understand
>> why it does not work suddenly. Please tell me what the above error can
>> be.

>Would be nice to run it from gdb, in order to get the backtrace when it
>crashes. This should help you understand where and why :).


>Regards,

>-- 
>wwp

I have a similar problem, but i don't know how gdb can help with this?
I tried with gdb (btw: I have one process forked (and a few threads) and I think this process creates the problem) but I only get the problem during exit handlers (e.g. SIGINT)

To get back to my question: how can I trace the problem with gdb, if I have forked processes and threads?

Cause it seems, that glibc only prints the line "*** glibc detected *** double free or corruption" and then continues
It doesn't send a SIGABORT or something else, so why should gdb "know" something was wrong? And how could I trace back (using "bt") if I have the problem, but don't know where it occures (cause glibc just prints and continues, not?)
I think the only "simple" way is using electric fence (?)

I'll try this next Monday

But some internal explanations what "*** glibc detected ***" does (not why it occures, but internally happens if it occures), if anyone knows, would be great

Thx and regards

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-05-12 22:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-12  8:11 "double free or corruption" - how to solve this? Shriramana Sharma
2006-05-12  8:19 ` wwp
2006-05-12  8:45   ` Steve Graegert
2006-05-12 21:06     ` Nate Jenkins
2006-05-12 21:35       ` Steve Graegert
2006-05-12 21:46         ` Nate Jenkins
2006-05-12 12:01 ` james-lists
2006-05-12 21:53 ` Steve Graegert
  -- strict thread matches above, loose matches on Subject: below --
2006-05-12 20:40 AW: " Jedenastik, Günther
2006-05-12 22:18 ` Steve Graegert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).