Crash on CFRelease(res)
com.zscaler.zscaler.TRPTunnel-2026-03-02-195306.ips.txt
,
com.zscaler.zscaler.TRPTunnel-2026-03-02-200554.ips.txt
below is the codes, please help how to fix it.
{
dispatch_block_t block = ^{
//All this dancing is an attempt to work around some weird crash:
//seems like ARC is trying to release NULL before assigning new value
CFDictionaryRef res = SCDynamicStoreCopyMultiple(store, NULL, keyPatterns);
if (res && store) {
NSDictionary *nsRes = (__bridge_transfer NSDictionary *)CFPropertyListCreateDeepCopy(kCFAllocatorDefault,
(CFPropertyListRef)res,
kCFPropertyListImmutable);
setDynamicStore(nsRes);
} else {
ZLogError("SCU:[%s]%s refreshDynamicStore failed",
dispatch_queue_get_label(DISPATCH_CURRENT_QUEUE_LABEL),
__FUNCTION__);
setDynamicStore(NULL);
}
if(res) {
CFRelease(res);
}
};
if (dispatch_queue_get_label(DISPATCH_CURRENT_QUEUE_LABEL) == dispatch_queue_get_label(queue)) {
block();
} else {
dispatch_async(queue, block);
}
}
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Created
My process running with root privilege, but got below error with API SecStaticCodeCreateWithPath(::_:) to create static code object for Cortex XDR Agent app, it working fine for other app like Safari on same device.
2025-07-22 02:02:05.857719(-0600)[23221:520725] DBG Found /Library/Application Support/PaloAltoNetworks/Traps/bin/Cortex XDR Agent.app,/Library/Application Support/PaloAltoNetworks/Traps/bin/Cortex XDR Agent.app running. Will verify the process now
2025-07-22 02:02:05.859209(-0600)[23221:520725] ERR Failed to create static code for path /Library/Application Support/PaloAltoNetworks/Traps/bin/Cortex XDR Agent.app/Contents/MacOS/Cortex XDR Agent. Error: Optional(UNIX[Operation not permitted])
Code Snippet
let fileURL = URL(fileURLWithPath: processPath)
var code: SecStaticCode?
let rc = SecStaticCodeCreateWithPath(fileURL as CFURL, [], &code)
if rc == errSecSuccess, let code = code {
staticCode = code
} else {
ZSLoggerError("Failed to create static code for path \(processPath). Error: \(String(describing: SecCopyErrorMessageString(rc, nil)))")
return nil
}