Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 02-06-2011, 01:35 AM   #1
LQ Newbie
Registered: Feb 2008
Distribution: Fedora
Posts: 18

Rep: Reputation: 0
glibc detected corruption errors

This is weird. So, I started getting an error message from a qt application I wanted to add a new feature to. The error is: *** glibc detected *** ./myprogram: double free or corruption (!prev): 0x08df0148 ***
A quick hit on google revealed what I thought would normally be the cause, a bad free(). Now, I had upgraded my harddrive to an ssd recently and the code was just copied over from the old hdd, so I thought maybe there was something wrong with my build environment. After a bit of searching, I couldn't find anything. I think I used the same parameters to recompile it and my environmental variables seem to be good.I finally just plugged in the old drive and ran the unmodified, untouched program off of that one. Same error. Now I didn't remember getting that error the last time, so I rebooted into the old drive and ran it. No errors. And then I ran my newly-compiled, fresh-off-the-ssd version and it worked perfectly. Very weird.

If anyone knows what might be causing this, any help would be appreciated. Also, both are running Fedora 13 with 686 PAE kernels and the program in question is a C++ qt app which appears to be generating these errors from a call to QSqlQuery::exec().

Old 02-06-2011, 11:53 PM   #2
Senior Member
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
That error means your program called free twice on the same pointer, which might not always happen since Qt applications take different courses depending on how you interact with them. There are three things that will help:
  1. Try to track all of your new or malloc pointers in the source code to see if they might be freed twice in some cases
  2. Compile with debug symbols and run your program with gdb until you get this error, then run a stack backtrace
  3. Run your program with valgrind to look for allocation-related problems at runtime (you might do this in conjunction with gdb)
Kevin Barry

Last edited by ta0kira; 02-06-2011 at 11:55 PM.


c++, fedora, glibc, qt

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
*** glibc detected ***: malloc() memory corruption Dinarchik Programming 5 02-16-2010 06:38 PM
*** glibc detected *** double free or corruption vvenugop Linux - General 0 02-19-2008 10:11 AM
*** glibc detected *** malloc(): memory corruption arvind.ayyangar Programming 2 11-21-2006 12:59 AM
*** glibc detected *** double free or corruption (C++) urzumph Programming 25 01-07-2006 05:03 PM
glibc detected ; memory corruption pingu Linux - Software 3 10-12-2005 02:29 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:56 PM.

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