I created a new Xcode Cocoa project, built and ran it under Valgrind, and the
following leaks are reported. Is this expected? Could this be a bug?
MacOS> valgrind --num-callers=200 ./valgrindtest2
==22925== Memcheck, a memory error detector
==22925== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==22925== Using Valgrind-3.8.0.SVN and LibVEX; rerun with -h for copyright info
==22925== Command: ./valgrindtest2
==22925==
--22925:0:schedule VG_(sema_down): read returned -4
==22925==
==22925== HEAP SUMMARY:
==22925== in use at exit: 2,377,584 bytes in 11,686 blocks
==22925== total heap usage: 49,569 allocs, 37,883 frees, 11,880,661 bytes
allocated
==22925==
==22925== 18 bytes in 1 blocks are definitely lost in loss record 1,058 of 6,815
==22925== at 0xC8E6: malloc_zone_malloc (vg_replace_malloc.c:273)
==22925== by 0x3AC68C6: malloc_set_zone_name (in
/usr/lib/system/libsystem_c.dylib)
==22925== by 0x3AC6DF2: _malloc_initialize (in
/usr/lib/system/libsystem_c.dylib)
==22925== by 0x3AC6F2B: malloc_good_size (in
/usr/lib/system/libsystem_c.dylib)
==22925== by 0x15CE06: __CFStringChangeSizeMultiple (in
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
==22925== by 0x1610E7: CFStringAppend (in
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
==22925== by 0x17359D: _convertToURLRepresentation (in
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
==22925== by 0x26AE56: _CFURLInit (in
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
==22925== by 0x16BF81: CFURLCreateWithFileSystemPathRelativeToBase (in
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
==22925== by 0x181388: _CFBundleGetMainBundleAlreadyLocked (in
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
==22925== by 0x1812C5: CFBundleGetMainBundle (in
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
==22925== by 0x1A42BDC: +[NSBundle mainBundle] (in
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation)
==22925== by 0x6F6F13: NSApplicationMain (in
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit)
==22925== by 0x100001511: main (main.m:13)
==22925==
==22925== 22 bytes in 1 blocks are definitely lost in loss record 1,065 of 6,815
==22925== at 0xC8E6: malloc_zone_malloc (vg_replace_malloc.c:273)
==22925== by 0x3AC68C6: malloc_set_zone_name (in
/usr/lib/system/libsystem_c.dylib)
==22925== by 0x39C33EF: dispatch_once_f (in
/usr/lib/system/libdispatch.dylib)
==22925== by 0x39C04D1: _dispatch_continuation_alloc_from_heap (in
/usr/lib/system/libdispatch.dylib)
==22925== by 0x39C1A6D: _dispatch_barrier_async_f_slow (in
/usr/lib/system/libdispatch.dylib)
==22925== by 0x3C0C415: _xpc_connection_create (in
/usr/lib/system/libxpc.dylib)
==22925== by 0x3C0CD99: xpc_connection_create (in
/usr/lib/system/libxpc.dylib)
==22925== by 0x1A29E7: -[NSXPCConnection initWithServiceName:privileged:]
(in
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
==22925== by 0x1A257F: __CFXNotificationCenterSetupConnection (in
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
==22925== by 0x1A24C0: __CFXNotificationCenterCreate (in
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
==22925== by 0x1A2399:
__CFNotificationCenterGetDistributedCenter_block_invoke_1 (in
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
==22925== by 0x39C33EF: dispatch_once_f (in
/usr/lib/system/libdispatch.dylib)
==22925== by 0x1917A9: CFNotificationCenterGetDistributedCenter (in
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
==22925== by 0x1D0867: ____CFXPreferencesGetSourceForTriplet_block_invoke_1
(in
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
==22925== by 0x39C33EF: dispatch_once_f (in
/usr/lib/system/libdispatch.dylib)
==22925== by 0x19D3E9: __CFXPreferencesGetSourceForTriplet (in
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
==22925== by 0x1A9816: __CFXPreferencesGetSearchListForBundleID (in
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
==22925== by 0x1A96F7: ___CFXPreferencesCopyAppValue_block_invoke_1 (in
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
==22925== by 0x1A9699: CFPreferencesCopyAppValue (in
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
==22925== by 0x1A20FFE: -[NSUserDefaults(NSUserDefaults) initWithUser:] (in
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation)
==22925== by 0x1A20B2C: +[NSUserDefaults(NSUserDefaults)
standardUserDefaults] (in
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation)
==22925== by 0x6A7D46: +[NSApplication initialize] (in
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit)
==22925== by 0x65661: _class_initialize (in /usr/lib/libobjc.A.dylib)
==22925== by 0x65516: prepareForMethodLookup (in /usr/lib/libobjc.A.dylib)
==22925== by 0x652BA: lookUpMethod (in /usr/lib/libobjc.A.dylib)
==22925== by 0x62F3B: objc_msgSend (in /usr/lib/libobjc.A.dylib)
==22925== by 0x6F6F9C: NSApplicationMain (in
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit)
==22925== by 0x100001511: main (main.m:13)
==22925==
==22925== LEAK SUMMARY:
==22925== definitely lost: 40 bytes in 2 blocks
==22925== indirectly lost: 0 bytes in 0 blocks
==22925== possibly lost: 2,836 bytes in 17 blocks
==22925== still reachable: 2,374,708 bytes in 11,667 blocks
==22925== suppressed: 0 bytes in 0 blocks
==22925== Reachable blocks (those to which a pointer was found) are not shown.
==22925== To see them, rerun with: --leak-check=full --show-reachable=yes
==22925==
==22925== For counts of detected and suppressed errors, rerun with: -v
==22925== ERROR SUMMARY: 19 errors from 19 contexts (suppressed: 2440149 from
29)
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users