Guard Malloc not working

I am experimenting with various profiling options that Xcode provides, but when I enable the Guard Malloc option on the Diagnostics tab and try to run, I get this error with an immediate failure:

dyld: could not load inserted library: /usr/lib/libgmalloc.dylib 

And rightly so, /usr/lib/ does not contain this library. I found it in:

 Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/lib/ 

So, I created the link and started the Command Line Tool (just to make sure it seems to be part of the MacOS SDK), turned on Guard Malloc again, but the problem remains. I don’t quite understand where the problem is: is there a new Xcode 4.3 error, a problem with my system, or Apple’s planned decision to replace it with something else (possibly Tools )?

+6
source share
4 answers

Well, I'm stuck too. From the apple list:

http://prod.lists.apple.com/archives/xcode-users/2012/Feb/msg00197.html

This is a well-known issue that is being investigated. I think you can get around this by installing the 10.7.3 compiler

Does this mean that you need to download the combo installer from: http://support.apple.com/kb/DL1484 ?

Now I'm trying to make sure this works, but the person on the mailing list said that it worked.

+4
source

on a device or simulator?

According to http://developer.apple.com/library/ios/#DOCUMENTATION/Performance/Conceptual/ManagingMemory/Articles/MallocDebug.html

You can use this option for both Mac apps and iPhone apps running in the simulator. .

+10
source

The problem arose recently, the combo update did not help (libgmalloc.dylib was in place).

A new solution is to restore disk permissions in Disk Utility: Disk utility interface

0
source

It seems that you cannot turn on Guard Malloc when debugging directly on the device (at least the iPad in my case), even when starting the latest and best versions of everything. However, work continues in the simulator.

0
source

Source: https://habr.com/ru/post/909301/


All Articles