ptr_refs will crash lldb when used on iOS simulator processes

Originator:insertjokehere
Number:rdar://15259972 Date Originated:18-Oct-2013
Status:Open Resolved:No
Product:Developer Tools Product Version:XCode 5.0
Classification:Crash Reproducible:Yes
 
Summary:
ptr_refs is a very useful way for tracking memory leaks by scanning the heap for all objects that have a pointer to a region of memory. Whenever invoking it for the iOS simulator, lldb will crash itself and the app.

Steps to Reproduce:
1. Open a debugger session on an iOS app launched in the simulator
2. Execute 'command script import lldb.macosx.heap' in lldb
3. Execute 'ptr_refs <anobjectaddress>' 

Expected Results:
A list of all objects in the heap that point to a specific memory address

Actual Results:
lldb and xcode crash

Version:
XCode 5.0
OSX 10.8.5
lldb-300.5.46

Notes:
I've tried this on three different machines with the same results. I recall a conversation from WWDC2013 labs with an Apple Engineer who demonstrated that the leaks tool has changed in Mavericks, he showed that the leaks instrument via the command line can do the same thing. I can't find any documentation for this in the manpage or on the developer portal,

Configuration:
15" Retina MacBook Pro

Attachments:

Comments

I have this problem too in Xcode 7.3.

By revoltes666 at June 16, 2016, 8:35 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!