LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-06-2012, 07:20 PM   #1
gothrog
Member
 
Registered: Jun 2004
Distribution: Yellow Dog, Fedora, RedHat, Centos, Ubuntu, Suse Linux
Posts: 106

Rep: Reputation: 15
glibc detected corrupted double-linked list - On AT91 board SRAM


All,

I have received this error message while running my code. I am using all STL code. I have also received stackdumps because of memory corruption.

Code:
*** glibc detected ***  corrupted double-linked list:
I am dealing with a memory leak. I launch several threads, but never tear them down or relaunch them.

I have 32 test cases that I can run and reiterate the same testcase at least 3 times in the same operational session. I can execute them some where between 3-7 times before it crashes.

I have increased the thread stack size and found that it has helped increase the number of testcases that can be ran. If I run the code off of an 8GB USB stick (attached to the AT91 Board), it can seemingly execute forever and never receive a crash.

Unfortunately I can't see which thread is crashing and I'm working on getting some better eyes on the board. If anyone can recommend a program for an Angstrom build to see threads let me know.

I was hoping that someone can give me some ideas on what to look for when dealing with memory corruption. I'm pretty sure the program is stepping on its own memory which causes the crash.

Regards,

Mike

Last edited by gothrog; 04-07-2012 at 09:36 AM.
 
Old 04-07-2012, 07:54 PM   #2
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
Quote:
Originally Posted by gothrog View Post
I was hoping that someone can give me some ideas on what to look for when dealing with memory corruption. I'm pretty sure the program is stepping on its own memory which causes the crash.
Look for pointers that might not be initialized, especially if you have global pointers. Also look for pointers that are freed without being set to NULL (generally with multithreading it's good to copy the pointer, set it to NULL, then free the copy.) Lastly, verify mutex protection for resources accessed by multiple threads.
Kevin Barry
 
1 members found this post helpful.
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] *** glibc detected *** ./a.out: corrupted double-linked list: 0x000000000187d240 *** deepikarc14 Programming 10 05-13-2015 12:28 AM
smallbin double linked list corrupted thirumalesh Programming 2 06-27-2011 03:40 AM
glibc detected *** corrupted double-linked list rubadub Programming 11 09-21-2008 01:21 PM
*** glibc detected *** corrupted double-linked list: 0x084a25c0 *** Looooooka Slackware 2 03-06-2006 08:41 AM
What the heck is a corrupted double linked list??? The_Nerd Programming 18 02-10-2006 03:17 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration