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 6692147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:50:02+00:00 2026-05-26T05:50:02+00:00

How do you get Valgrind to show exactly where an error occured? I compiled

  • 0

How do you get Valgrind to show exactly where an error occured? I compiled my program (on a Windows machine over a Linux terminal via PuTTy) adding the -g debug option.

When I run Valgrind, I get the Leak and Heap summary, and I definitely have lost memory, but I never get information about where it happens (file name, line). Shouldn’t Valgrind be telling me on what line after I allocate memory, it fails to deallocate later?

==15746==
==15746== HEAP SUMMARY:
==15746==     in use at exit: 54 bytes in 6 blocks
==15746==   total heap usage: 295 allocs, 289 frees, 11,029 bytes allocated
==15746==
==15746== LEAK SUMMARY:
==15746==    definitely lost: 12 bytes in 3 blocks
==15746==    indirectly lost: 42 bytes in 3 blocks
==15746==      possibly lost: 0 bytes in 0 blocks
==15746==    still reachable: 0 bytes in 0 blocks
==15746==         suppressed: 0 bytes in 0 blocks
==15746== Rerun with --leak-check=full to see details of leaked memory
==15746==
==15746== For counts of detected and suppressed errors, rerun with: -v
==15746== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 15 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-26T05:50:03+00:00Added an answer on May 26, 2026 at 5:50 am

    Try valgrind --leak-check=full

    This normally prints more useful information.
    Also add the -O0 flag when compiling so your code doesn’t get optimized.

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

Sidebar

Related Questions

I get the following error when building my Windows Forms solution: LC.exe exited with
I am getting a strange error with valgrind on a program that makes use
We get the following error; The request was aborted: Could not create SSL/TLS secure
I get an Access is Denied error message when I use the strong name
I get the following error when running my Visual Studio 2008 ASP.NET project (start
I get this error: Can't locate Foo.pm in @INC Is there an easier way
I get the following error when trying to run the latest Cygwin version of
I am trying to trace a segfault with valgrind. I get the following message
I'm using valgrind to check that my program is within the required memory bounds
After checked my code with Valgrind, it shows a lot of error messages and

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.