Summary: | Valgrind on OS X always reports some memory "still reachable" | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | Prashant Kumar <yoshis88> |
Component: | general | Assignee: | Rhys Kidd <rhyskidd> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | ionic, mac.yosef, rhyskidd |
Priority: | NOR | ||
Version: | 3.10 SVN | ||
Target Milestone: | --- | ||
Platform: | Unlisted Binaries | ||
OS: | macOS | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
valgrind --leak-check=full --dsymutil=yes --leak-check=full --show-reachable=yes -v ./main
./valgrind -d -v echo hi (with some system info) |
Description
Prashant Kumar
2010-11-28 07:09:54 UTC
Created attachment 56211 [details]
valgrind --leak-check=full --dsymutil=yes --leak-check=full --show-reachable=yes -v ./main
Hi Prashant,
please allow me to hijack your bug report.
I am seeing the exact same issue on my Mac OS X 10.6 x86_64 (w/ 64bit Kernel) machine.
Tested with valgrind 3.6.0 so far.
Additionally, it is not dependent on the compiler version, as I'm seeing it with everyone I've tried so far (Apple GCC 4.2, MacPorts GCC 4.4 and MacPorts GCC 4.5.)
Even a simple program like
int main (void) {
return (0);
}
will trigger this "bug" (please read below for an explanation of why I hesitate to call this a bug.)
A sample valgrind output is attached and should help to clear things up.
Basically, it may well be a mem leak in libSystem (OS X' libc), or dyld. Given the bugs I've seen on Apple systems, I'd not be that surprised... then again, OS X support in valgrind is still pretty new and this may indeed be a false positive which has to be looked upon.
Unfortunately I'm far from being an expert on this stuff, so I hope some dev can figure it out or at least give a helpful hand. :)
This whole stuff is not critical, but it may actually disturb other users or indeed confuse them for good.
Best regards,
Mihai
Created attachment 57383 [details]
./valgrind -d -v echo hi (with some system info)
@Mihai, I welcome your hijacking of my ticket :) I was indeed hoping this to be a false positive. I don't know much about Macs, just recently jumped on the bandwagon, and I just use them pretending they are Unix-type machines. The valgrind testers were testing on Mac OS X 10.5, correct? And if they didn't find any problems on that version of the platform, then at least the problem could be pinpointed as some change between the two versions. Which brings me to the question, where should I go to push this upstream for some input? lists.apple.com? I agree (and am thankful) this is not of critical priority, but I'd be curious to see this resolved (even though I'm sure the problem is beyond my understanding). Hello, It is a know issue that Valgrind on OS X always reports some memory "still reachable". This is not specific to OS X 10.5, and still present through OS X 10.10 (and OS X 10.11 pre release) with latest Valgrind SVN trunk. For now, please don't report these upstream to Apple. These may be false positives, and we'd need to undertake more work to ensure the reports are valid. Resolving these reports are a "nice to have" rather than a pressing bug that must be fixed. Per the Valgrind documentation: http://valgrind.org/docs/manual/faq.html * "still reachable" means your program is probably ok -- it didn't free some memory it could have. This is quite common and often reasonable. Don't use --show-reachable=yes if you don't want to see these reports. *** Bug 354428 has been marked as a duplicate of this bug. *** |