Bug 347379 - valgrind --leak-check=full memleak errors from system libraries in OS X 10.8
Summary: valgrind --leak-check=full memleak errors from system libraries in OS X 10.8
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: memcheck (show other bugs)
Version: 3.10 SVN
Platform: MacPorts macOS
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks: 304259
  Show dependency treegraph
 
Reported: 2015-05-07 11:57 UTC by Rhys Kidd
Modified: 2015-05-07 13:20 UTC (History)
3 users (show)

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


Attachments
Proposed patch (1.83 KB, patch)
2015-05-07 12:23 UTC, Rhys Kidd
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rhys Kidd 2015-05-07 11:57:49 UTC
+++ This bug was initially created as a clone of Bug #344543 +++

I'm in OS X 10.8 (Mountain Lion), uname -r shows "12.6.0" for the kernel version.

My "cc -v" says:

Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin12.6.0
Thread model: posix

My C program, "cat zero.c":

int main() { return 0; }

With "valgrind ./zero" I get no errors, but with "valgrind --leak-check=full" I get 18 memleak errors from system libraries. This includes from malloc_zone_malloc() and friends.



Reproducible: Always

Steps to Reproduce:
1. See the details.
2.
3.

Actual Results:  
Got errors from system libraries.


Expected Results:  
No errors from system libraries.  (Or if they have some, suppressed.)
Comment 1 Rhys Kidd 2015-05-07 12:23:46 UTC
Created attachment 92477 [details]
Proposed patch
Comment 2 Rhys Kidd 2015-05-07 12:24:58 UTC
Proposed patch addresses test case and the following related regression tests, which otherwise fail on OS X 10.8:

$ perl tests/vg_regtest memcheck/tests/leak-delta memcheck/tests/threadname_xml none/tests/manythreads drd/tests/unit_bitmap drd/tests/unit_vc
leak-delta:      valgrind   -q --leak-check=yes --show-reachable=yes --leak-resolution=high ./leak-delta 
threadname_xml:  valgrind   --xml=yes --xml-fd=2 --log-file=/dev/null ./threadname 
manythreads:     valgrind   ./manythreads 
unit_bitmap:     valgrind   -q --tool=memcheck --leak-check=full --show-reachable=yes ./unit_bitmap -s 93 -t 97 -q
unit_vc:         valgrind   -q --tool=memcheck --leak-check=full --show-reachable=yes ./unit_vc 

== 5 tests, 0 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
Comment 3 Rhys Kidd 2015-05-07 13:20:54 UTC
Resolved in r15190.