mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Runtime] Check the weak-linked _dyld_has_preoptimized_swift_protocol_conformances for NULL before calling it.
rdar://89522018
This commit is contained in:
@@ -581,7 +581,8 @@ void swift::addImageProtocolConformanceBlockCallbackUnsafe(
|
||||
ConformanceSection{conformances, conformancesSize});
|
||||
return;
|
||||
#if DYLD_FIND_PROTOCOL_ON_DISK_CONFORMANCE_DEFINED
|
||||
} else if (_dyld_has_preoptimized_swift_protocol_conformances(
|
||||
} else if (&_dyld_has_preoptimized_swift_protocol_conformances &&
|
||||
_dyld_has_preoptimized_swift_protocol_conformances(
|
||||
reinterpret_cast<const mach_header *>(baseAddress))) {
|
||||
// dyld may optimize images outside the shared cache. Skip those too.
|
||||
DYLD_CONFORMANCES_LOG(
|
||||
|
||||
Reference in New Issue
Block a user