-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I'm running 3.8.1 on MacOS 10.7 with an Objective-C app compiled using ARC. I need to see where an object was allocated, not just where it was freed.
An object is getting accessed after free in an autoreleasepool. However due to ARC pretty much everything is freed in an autoreleasepool so I can't tell where the item was actually allocated to further help diagnose. ==30881== Invalid read of size 8 ==30881== at 0x51FE8C: objc_msgSend (in /usr/lib/libobjc.A.dylib) ==30881== by 0x1000023B0: -[MiniPython setCode:error:] (MiniPython.m:241) ==30881== by 0x100014159: main (testMiniPython.m:96) ==30881== Address 0x10104b9e0 is 0 bytes inside a block of size 48 free'd ==30881== at 0xDCB8: free (vg_replace_malloc.c:450) ==30881== by 0x524D52: object_dispose (in /usr/lib/libobjc.A.dylib) ==30881== by 0x67E085: -[NSObject dealloc] (in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation) ==30881== by 0x67E00D: -[__NSArrayM dealloc] (in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation) ==30881== by 0x52503B: (anonymous namespace)::AutoreleasePoolPage::pop(void*) (in /usr/lib/libobjc.A.dylib) ==30881== by 0x1000023B0: -[MiniPython setCode:error:] (MiniPython.m:241) ==30881== by 0x100014159: main (testMiniPython.m:96) This is an NSMutableArray (or its contents) which I use many of all over the place. The diagnostic telling me where it was freed is nowhere near as helpful as it telling me where the allocation happened. I am running with --track-origins=yes --freelist-vol=1000000000 Roger -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlDekXQACgkQmOOfHg372QT6dgCePGTcnr16ICl+a4ofG8qQ2UFJ /CMAoLU15AD11XKBk5BWzdgAJvB9puaD =flVn -----END PGP SIGNATURE----- ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122912 _______________________________________________ Valgrind-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/valgrind-users
