Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 402021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T17:05:14+00:00 2026-05-12T17:05:14+00:00

I am trying to debug a large application build using Qt/C++ and valgrind is

  • 0

I am trying to debug a large application build using Qt/C++ and valgrind is reporting a lot of memory leak from internal Qt stuff.
Could anyone share a proper valgrind suppression file for Qt apps ?

Thanks !

Eg.

#include <qobject.h>
int main()
{
  QObject o;
  return 0;
}

returns:

$ valgrind  --leak-check=full  --show-reachable=yes  ./leak
==12655== Memcheck, a memory error detector
==12655== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==12655== Using Valgrind-3.5.0-Debian and LibVEX; rerun with -h for copyright info
==12655== Command: ./leak
==12655== 
==12655== 
==12655== HEAP SUMMARY:
==12655==     in use at exit: 744 bytes in 7 blocks
==12655==   total heap usage: 28 allocs, 21 frees, 1,640 bytes allocated
==12655== 
==12655== 16 bytes in 1 blocks are still reachable in loss record 1 of 7
==12655==    at 0x4C229C7: operator new(unsigned long) (vg_replace_malloc.c:220)
==12655==    by 0x6203124: QThreadData::current() (in /usr/lib/libQtCore.so.4.5.2)
==12655==    by 0x62FC4BC: QObject::QObject(QObject*) (in /usr/lib/libQtCore.so.4.5.2)
==12655==    by 0x4008D2: main (in /tmp/Qt/bin/leak)
==12655== 
==12655== 96 bytes in 1 blocks are still reachable in loss record 2 of 7
==12655==    at 0x4C229C7: operator new(unsigned long) (vg_replace_malloc.c:220)
==12655==    by 0x62030FC: QThreadData::current() (in /usr/lib/libQtCore.so.4.5.2)
==12655==    by 0x62FC4BC: QObject::QObject(QObject*) (in /usr/lib/libQtCore.so.4.5.2)
==12655==    by 0x4008D2: main (in /tmp/Qt/bin/leak)
==12655== 
==12655== 96 bytes in 1 blocks are still reachable in loss record 3 of 7
==12655==    at 0x4C229C7: operator new(unsigned long) (vg_replace_malloc.c:220)
==12655==    by 0x62041CD: QWaitCondition::QWaitCondition() (in /usr/lib/libQtCore.so.4.5.2)
==12655==    by 0x6200EAF: ??? (in /usr/lib/libQtCore.so.4.5.2)
==12655==    by 0x62010A0: ??? (in /usr/lib/libQtCore.so.4.5.2)
==12655==    by 0x6203132: QThreadData::current() (in /usr/lib/libQtCore.so.4.5.2)
==12655==    by 0x62FC4BC: QObject::QObject(QObject*) (in /usr/lib/libQtCore.so.4.5.2)
==12655==    by 0x4008D2: main (in /tmp/Qt/bin/leak)
==12655== 
==12655== 120 bytes in 1 blocks are still reachable in loss record 4 of 7
==12655==    at 0x4C229C7: operator new(unsigned long) (vg_replace_malloc.c:220)
==12655==    by 0x61FE681: QMutex::QMutex(QMutex::RecursionMode) (in /usr/lib/libQtCore.so.4.5.2)
==12655==    by 0x6200DC8: QThreadData::QThreadData(int) (in /usr/lib/libQtCore.so.4.5.2)
==12655==    by 0x620310C: QThreadData::current() (in /usr/lib/libQtCore.so.4.5.2)
==12655==    by 0x62FC4BC: QObject::QObject(QObject*) (in /usr/lib/libQtCore.so.4.5.2)
==12655==    by 0x4008D2: main (in /tmp/Qt/bin/leak)
==12655== 
==12655== 120 bytes in 1 blocks are still reachable in loss record 5 of 7
==12655==    at 0x4C229C7: operator new(unsigned long) (vg_replace_malloc.c:220)
==12655==    by 0x61FE681: QMutex::QMutex(QMutex::RecursionMode) (in /usr/lib/libQtCore.so.4.5.2)
==12655==    by 0x6200DE9: QThreadData::QThreadData(int) (in /usr/lib/libQtCore.so.4.5.2)
==12655==    by 0x620310C: QThreadData::current() (in /usr/lib/libQtCore.so.4.5.2)
==12655==    by 0x62FC4BC: QObject::QObject(QObject*) (in /usr/lib/libQtCore.so.4.5.2)
==12655==    by 0x4008D2: main (in /tmp/Qt/bin/leak)
==12655== 
==12655== 120 bytes in 1 blocks are still reachable in loss record 6 of 7
==12655==    at 0x4C229C7: operator new(unsigned long) (vg_replace_malloc.c:220)
==12655==    by 0x61FE681: QMutex::QMutex(QMutex::RecursionMode) (in /usr/lib/libQtCore.so.4.5.2)
==12655==    by 0x6200E77: ??? (in /usr/lib/libQtCore.so.4.5.2)
==12655==    by 0x62010A0: ??? (in /usr/lib/libQtCore.so.4.5.2)
==12655==    by 0x6203132: QThreadData::current() (in /usr/lib/libQtCore.so.4.5.2)
==12655==    by 0x62FC4BC: QObject::QObject(QObject*) (in /usr/lib/libQtCore.so.4.5.2)
==12655==    by 0x4008D2: main (in /tmp/Qt/bin/leak)
==12655== 
==12655== 176 bytes in 1 blocks are still reachable in loss record 7 of 7
==12655==    at 0x4C229C7: operator new(unsigned long) (vg_replace_malloc.c:220)
==12655==    by 0x6201092: ??? (in /usr/lib/libQtCore.so.4.5.2)
==12655==    by 0x6203132: QThreadData::current() (in /usr/lib/libQtCore.so.4.5.2)
==12655==    by 0x62FC4BC: QObject::QObject(QObject*) (in /usr/lib/libQtCore.so.4.5.2)
==12655==    by 0x4008D2: main (in /tmp/Qt/bin/leak)
==12655== 
==12655== LEAK SUMMARY:
==12655==    definitely lost: 0 bytes in 0 blocks
==12655==    indirectly lost: 0 bytes in 0 blocks
==12655==      possibly lost: 0 bytes in 0 blocks
==12655==    still reachable: 744 bytes in 7 blocks
==12655==         suppressed: 0 bytes in 0 blocks
==12655== 
==12655== For counts of detected and suppressed errors, rerun with: -v
==12655== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 8 from 8)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T17:05:14+00:00Added an answer on May 12, 2026 at 5:05 pm

    –show-reachable shows memory that hasn’t actually leaked, even though valgrind calls it a loss record. Your test app doesn’t leak any memory.

    You don’t need any valgrind suppressions for this particular case. For others, maybe, but you should use valgrind’s –gen-suppressions option to generate those suppressions for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to debug a large ASP.NET application. I set a breakpoint on the
While trying to debug why my multi threaded Java application is consuming large amount
I am trying to debug a large (1.1Gb) SQL dump file. The file says
I am trying to debug a few regular expressions using: perl -Mre=debug file.pl The
I am trying to debug a large and complex webapp that makes heavy use
I have an application which predictably generates out-of-memory errors on very, very (very) large
I am trying to debug an OutOfMemoryException that occurs when creating a fairly large
I'm trying to debug a really large c++/c program in Visual Studio. Changing value
I'm trying to debug an error message in a large and complicated frames based
I am trying to debug the behaviour of a large library I depend on,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.