Bug 359264 - Memcheck shows 2,064 bytes possibly lost and 20,036 suppressed bytes in simplistic program on OS X El Capitan
Summary: Memcheck shows 2,064 bytes possibly lost and 20,036 suppressed bytes in simpl...
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: memcheck (other bugs)
Version First Reported In: 3.11.0
Platform: Homebrew (macOS) macOS
: NOR normal
Target Milestone: ---
Assignee: Rhys Kidd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-11 10:41 UTC by Matthias
Modified: 2016-02-14 05:11 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias 2016-02-11 10:41:20 UTC
I ran this simplistic C-program through valgrind:

int main() {

  return 0;
}

Here is the output:

==35961== Memcheck, a memory error detector
==35961== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==35961== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==35961== Command: ./valgrind.o
==35961== 
==35961== 
==35961== HEAP SUMMARY:
==35961==     in use at exit: 22,100 bytes in 187 blocks
==35961==   total heap usage: 271 allocs, 84 frees, 28,340 bytes allocated
==35961== 
==35961== LEAK SUMMARY:
==35961==    definitely lost: 0 bytes in 0 blocks
==35961==    indirectly lost: 0 bytes in 0 blocks
==35961==      possibly lost: 2,064 bytes in 1 blocks
==35961==    still reachable: 0 bytes in 0 blocks
==35961==         suppressed: 20,036 bytes in 186 blocks
==35961== Rerun with --leak-check=full to see details of leaked memory
==35961== 
==35961== For counts of detected and suppressed errors, rerun with: -v
==35961== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

As you can see there are 2,064 bytes possibly lost and 20,036 bytes suppressed. I've already read about this, but heard that it should be fixed... 
Otherwise is there a way to exclude the system libraries for valgrind?

Reproducible: Always

Steps to Reproduce:
1. Create simplistic program (empty main - no includes). 
2. Run valgrind.

Actual Results:  
2,064 bytes possibly lost.
20,035 bytes suppressed.

Expected Results:  
No lost bytes.