Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

'leaks' message

My app has a debugging mode in which it invokes 'leaks' on itself. I am now seeing this message on stderr:

Target process is an ancestor and permitting live process for ancestors so not generating a corpse to save resources by default.

This sort of makes sense, but I would like a more detailed explanation. Is there some option I should be sending to 'leaks' to operate in a better mode? Should I be invoking it differently?

Answered by DTS Engineer in 744965022

It sounds like it’s already operating in a better mode (-:

To understand what’s going on here, you need to understand what leaks means by “corpse”. Have a read of this post.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

It sounds like it’s already operating in a better mode (-:

To understand what’s going on here, you need to understand what leaks means by “corpse”. Have a read of this post.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks Quinn. Adding the --forkCorpse parameter does indeed make the message go away, which I guess is a good thing. But I now occasionally get messages like this:

leaks[60595]: [fatal] Malloc enumeration of zone "MallocStackLoggingLiteZone_0x113eb8000" failed to get full information about malloc metadata and/or allocations with the error "(os/kern) failure (5)". It is likely that the target was suspended while malloc metadata was being modified.

It appears that leaks itself is crashing in this case. Any idea what might be causing it or how I can prevent it?

Any idea what might be causing it or how I can prevent it?

So this happens intermittently, right?

If so, it sounds like leaks managed to snapshot the process at exactly the wrong time, when the memory management data structures were in an inconsistent state. I’m not sure if there’s anything you can do about that.

It appears that leaks itself is crashing in this case.

Well, leaks shouldn’t crash no matter what you throw at it, so that’s definitely bug worthy. Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

'leaks' message
 
 
Q