Re: [Valgrind-users] Errors for empty Xcode Cocoa app

2012-08-08 Thread Philippe Waroquiers
On Tue, 2012-08-07 at 17:12 -0700, John Reiser wrote:
 On 08/07/2012 04:43 PM, Jacob Goldstein wrote:
  --22925:0:schedule VG_(sema_down): read returned -4
 
 That unexpected behavior of sema_down should be investigated.
The code explicitely retry in case read on the sema returns
-4 (i.e. -VKI_EINTR).

Philippe



--
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


[Valgrind-users] Errors for empty Xcode Cocoa app

2012-08-07 Thread Jacob Goldstein
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 0x11511: 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 

Re: [Valgrind-users] Errors for empty Xcode Cocoa app

2012-08-07 Thread John Reiser
On 08/07/2012 04:43 PM, Jacob Goldstein wrote:
 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

That unexpected behavior of sema_down should be investigated.

 ==22925== 
 ==22925== HEAP SUMMARY:
 ==22925== in use at exit: 2,377,584 bytes in 11,686 blocks

I'd be more concerned about 2.4 MB in use (11686 blocks, average 0.21 KB)
than I would about 40 bytes (18 + 22) leaked.

-- 


--
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