Summary: | [OSX Yosemite 10.10.1] The memcheck tool always reports a leak regardless of the simplicity of the program. | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | fmendez <fernando.a.mendez69> |
Component: | memcheck | Assignee: | Julian Seward <jseward> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | austinenglish, rhyskidd |
Priority: | NOR | ||
Version: | 3.10 SVN | ||
Target Milestone: | --- | ||
Platform: | Homebrew (macOS) | ||
OS: | macOS | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
fmendez
2015-02-01 19:23:41 UTC
This is something I'm looking at. Can confirm the report. I've also seen it a few times in the regression tests. This is a duplicate of bz#344702. It appears fixed for me following r14972, but would appreciate your confirmation fmendez. After getting the latest from trunk, I can still see the issue: Hello word in C: #include<stdio.h> main() { printf("Hello World"); } fmendez@fmendez-mba ~/Desktop/start/oss/test-c $ valgrind --leak-check=full --show-leak-kinds=all ./a.out [2.0.0-p247] ==55904== Memcheck, a memory error detector ==55904== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==55904== Using Valgrind-3.11.0.SVN and LibVEX; rerun with -h for copyright info ==55904== Command: ./a.out ==55904== --55904-- ./a.out: --55904-- dSYM directory is missing; consider using --dsymutil=yes Hello World==55904== ==55904== HEAP SUMMARY: ==55904== in use at exit: 38,852 bytes in 426 blocks ==55904== total heap usage: 507 allocs, 81 frees, 44,996 bytes allocated ==55904== ==55904== 4,096 bytes in 1 blocks are still reachable in loss record 82 of 82 ==55904== at 0x10000859B: malloc (in /usr/local/Cellar/valgrind/HEAD/lib/valgrind/vgpreload_memcheck-amd64-darwin.so) ==55904== by 0x1001F0856: __smakebuf (in /usr/lib/system/libsystem_c.dylib) ==55904== by 0x1002053A7: __swsetup (in /usr/lib/system/libsystem_c.dylib) ==55904== by 0x10021F77D: __v2printf (in /usr/lib/system/libsystem_c.dylib) ==55904== by 0x10021FCA0: __xvprintf (in /usr/lib/system/libsystem_c.dylib) ==55904== by 0x1001F5B91: vfprintf_l (in /usr/lib/system/libsystem_c.dylib) ==55904== by 0x1001F39F7: printf (in /usr/lib/system/libsystem_c.dylib) ==55904== by 0x100000F55: main (in ./a.out) ==55904== ==55904== LEAK SUMMARY: ==55904== definitely lost: 0 bytes in 0 blocks ==55904== indirectly lost: 0 bytes in 0 blocks ==55904== possibly lost: 0 bytes in 0 blocks ==55904== still reachable: 4,096 bytes in 1 blocks ==55904== suppressed: 34,756 bytes in 425 blocks ==55904== ==55904== For counts of detected and suppressed errors, rerun with: -v ==55904== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 18 from 18) Hello world in Rust: fn main() { println!("hello world"); } fmendez@fmendez-mba ~/Desktop/start/oss/test-rs/target (master●)$ valgrind --leak-check=full --show-leak-kinds=all ./test-rs ==55341== Memcheck, a memory error detector ==55341== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==55341== Using Valgrind-3.11.0.SVN and LibVEX; rerun with -h for copyright info ==55341== Command: ./test-rs ==55341== hello world ==55341== ==55341== HEAP SUMMARY: ==55341== in use at exit: 35,060 bytes in 429 blocks ==55341== total heap usage: 517 allocs, 88 frees, 42,700 bytes allocated ==55341== ==55341== 152 bytes in 1 blocks are still reachable in loss record 50 of 82 ==55341== at 0x10005359B: malloc (in /usr/local/Cellar/valgrind/HEAD/lib/valgrind/vgpreload_memcheck-amd64-darwin.so) ==55341== by 0x1001A6D9F: tlv_allocate_and_initialize_for_key (in /usr/lib/system/libdyld.dylib) ==55341== by 0x1001A7548: tlv_get_addr (in /usr/lib/system/libdyld.dylib) ==55341== by 0x100003012: sys_common::thread_info::set::h29886cc577a55c14auH (in ./test-rs) ==55341== by 0x10000B32A: rt::lang_start::hf7db7ff2962d1e05DZI (in ./test-rs) ==55341== by 0x100000B1E: main (in ./test-rs) ==55341== ==55341== LEAK SUMMARY: ==55341== definitely lost: 0 bytes in 0 blocks ==55341== indirectly lost: 0 bytes in 0 blocks ==55341== possibly lost: 0 bytes in 0 blocks ==55341== still reachable: 152 bytes in 1 blocks ==55341== suppressed: 34,908 bytes in 428 blocks ==55341== ==55341== For counts of detected and suppressed errors, rerun with: -v If there any other information/help I can contribute, please let me know. Regards, Hi, Thanks for reverting with the new info. Many of the previous system library leaks are now suppressed (as expected). So that's good news. There are different leaks you are now seeing, which I also have seen with certain regression tests. Do you mind attaching the output of: 1. Those two programs with "-v" command line option added, and 2. The output of "nm /usr/lib/system/libdyld.dylib" and "nm /usr/lib/system/libsystem_c.dylib". Sure, here it is (had to create a gist since the comment didn't fit here): https://gist.github.com/fmendez/0f921fdf76d6e2a1eda0 Regards, fmendez, Would you mind confirming that with latest Valgrind trunk, you only see the Rust related issue of the two above that you reported? Austins-Mac-mini:valgrind austin$ cat foo.c #include <stdio.h> int main() { printf("Hello world\n"); } Austins-Mac-mini:valgrind austin$ gcc -o a.out foo.c Austins-Mac-mini:valgrind austin$ ./vg-in-place --leak-check=full ./a.out ==33055== Memcheck, a memory error detector ==33055== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==33055== Using Valgrind-3.11.0.SVN and LibVEX; rerun with -h for copyright info ==33055== Command: ./a.out ==33055== --33055-- ./a.out: --33055-- dSYM directory is missing; consider using --dsymutil=yes Hello world ==33055== ==33055== HEAP SUMMARY: ==33055== in use at exit: 38,764 bytes in 425 blocks ==33055== total heap usage: 505 allocs, 80 frees, 44,892 bytes allocated ==33055== ==33055== LEAK SUMMARY: ==33055== definitely lost: 0 bytes in 0 blocks ==33055== indirectly lost: 0 bytes in 0 blocks ==33055== possibly lost: 0 bytes in 0 blocks ==33055== still reachable: 0 bytes in 0 blocks ==33055== suppressed: 38,764 bytes in 425 blocks ==33055== ==33055== For counts of detected and suppressed errors, rerun with: -v ==33055== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 15 from 15) Austins-Mac-mini:valgrind austin$ svn info Path: . Working Copy Root Path: /Users/austin/src/valgrind URL: svn://svn.valgrind.org/valgrind/trunk Repository Root: svn://svn.valgrind.org/valgrind Repository UUID: a5019735-40e9-0310-863c-91ae7b9d1cf9 Revision: 15258 Node Kind: directory Schedule: normal Last Changed Author: carll Last Changed Rev: 15258 Last Changed Date: 2015-05-19 11:16:52 -0500 (Tue, 19 May 2015) works here. Can't confirm the rust results (I don't use rust :) ). Austin, Thanks for your confirmation that a simple Hello World test program also reports cleanly on your system, after r15255. I am seeing that too here across both of my OS X 10.10 development systems. I'm inclined to close this bug report as RESOLVED because valgrind no longer reports leaks on OS X 10.10 regardless of the simplicity of a program. A new specific bug report can be opened for further reports from Rust (or any other program). |