Uploaded image for project: 'Swift'
  1. Swift
  2. SR-7421

Swift 4.1 Segmentation error, SIL Large Loadable type by-address lowering.

    XMLWordPrintable

    Details

      Description

      Swift compiler in Xcode 9.3 (9E145) crashes with this error:

      CompileSwift normal x86_64 /Users/daniel/CloudStation/Development/ProcedureKit/ProcedureKit/Sources/ProcedureKitCloud/CKDiscoverUserIdentitiesOperation.swift
      cd /Users/daniel/CloudStation/Development/ProcedureKit/ProcedureKit
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/daniel/CloudStation/Development/ProcedureKit/ProcedureKit/Sources/ProcedureKitCloud/CloudKitSupport.swift /Users/daniel/CloudStation/Development/ProcedureKit/ProcedureKit/Sources/ProcedureKitCloud/CKDatabaseOperation.swift /Users/daniel/CloudStation/Development/ProcedureKit/ProcedureKit/Sources/ProcedureKitCloud/CloudKitError.swift /Users/daniel/CloudStation/Development/ProcedureKit/ProcedureKit/Sources/ProcedureKitCloud/CloudKitCapability.swift -primary-file /Users/daniel/CloudStation/Development/ProcedureKit/ProcedureKit/Sources/ProcedureKitCloud/CKDiscoverUserIdentitiesOperation.swift /Users/daniel/CloudStation/Development/ProcedureKit/ProcedureKit/Sources/ProcedureKitCloud/CKOperation.swift /Users/daniel/CloudStation/Development/ProcedureKit/ProcedureKit/Sources/ProcedureKitCloud/CloudKit.swift -target x86_64-apple-macosx10.11 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -I /Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Products/Debug -F /Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Products/Debug -application-extension -enable-testing -g -import-underlying-module -module-cache-path /Users/daniel/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -profile-generate -profile-coverage-mapping -swift-version 4 -enforce-exclusivity=checked -Onone -D DEBUG -disable-swift3-objc-inference -serialize-debugging-options -Xcc -I/Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/ProcedureKitCloud-generated-files.hmap -Xcc -I/Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/ProcedureKitCloud-own-target-headers.hmap -Xcc -I/Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/ProcedureKitCloud-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/ProcedureKitCloud-project-headers.hmap -Xcc -I/Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Products/Debug/include -Xcc -I/Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/DerivedSources/x86_64 -Xcc -I/Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -ivfsoverlay -Xcc /Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/unextended-module-overlay.yaml -Xcc -working-directory/Users/daniel/CloudStation/Development/ProcedureKit/ProcedureKit -emit-module-doc-path /Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/Objects-normal/x86_64/CKDiscoverUserIdentitiesOperation~partial.swiftdoc -serialize-diagnostics-path /Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/Objects-normal/x86_64/CKDiscoverUserIdentitiesOperation.dia -module-name ProcedureKitCloud -emit-module-path /Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/Objects-normal/x86_64/CKDiscoverUserIdentitiesOperation~partial.swiftmodule -emit-dependencies-path /Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/Objects-normal/x86_64/CKDiscoverUserIdentitiesOperation.d -emit-reference-dependencies-path /Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/Objects-normal/x86_64/CKDiscoverUserIdentitiesOperation.swiftdeps -o /Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/Objects-normal/x86_64/CKDiscoverUserIdentitiesOperation.o -index-store-path /Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Index/DataStore -index-system-modules

      0 swift 0x00000001044a5ffa PrintStackTraceSignalHandler(void*) + 42
      1 swift 0x00000001044a53b6 SignalHandler(int) + 966
      2 libsystem_platform.dylib 0x00007fff6dd06f5a _sigtramp + 26
      3 libsystem_platform.dylib 0x00007ffeef173ad0 _sigtramp + 2168900496
      4 swift 0x0000000101e27d1c swift::Mangle::ASTMangler::appendType(swift::Type) + 3116
      5 swift 0x0000000101e28c4f swift::Mangle::ASTMangler::appendType(swift::Type) + 7007
      6 swift 0x0000000101e2906c swift::Mangle::ASTMangler::appendType(swift::Type) + 8060
      7 swift 0x0000000100c9a488 swift::irgen::IRGenModule::createNominalType(swift::CanType) + 568
      8 swift 0x0000000100bf321d swift::irgen::TypeConverter::convertEnumType(swift::TypeBase*, swift::CanType, swift::EnumDecl*) + 77
      9 swift 0x0000000100c98d61 swift::irgen::TypeConverter::convertAnyNominalType(swift::CanType, swift::NominalTypeDecl*) + 449
      10 swift 0x0000000100c98164 swift::irgen::TypeConverter::getTypeEntry(swift::CanType) + 1060
      11 swift 0x0000000100cfdba8 isLargeLoadableType(swift::GenericEnvironment*, swift::SILType, swift::irgen::IRGenModule&) + 200
      12 swift 0x0000000100cfb2dd (anonymous namespace)::LoadableStorageAllocation::allocateLoadableStorage() + 12525
      13 swift 0x0000000100cf2ba8 (anonymous namespace)::LoadableByAddress::run() + 1096
      14 swift 0x0000000101601db9 swift::SILPassManager::runOneIteration() + 10217
      15 swift 0x0000000100ca990b runIRGenPreparePasses(swift::SILModule&, swift::irgen::IRGenModule&) + 1659
      16 swift 0x0000000100caa4b4 performIRGeneration(swift::IRGenOptions&, swift::ModuleDecl*, std::_1::unique_ptr<swift::SILModule, std::_1::default_delete<swift::SILModule> >, llvm::StringRef, llvm::LLVMContext&, swift::SourceFile*, llvm::GlobalVariable**, unsigned int) + 1284
      17 swift 0x0000000100b05dce performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 38110
      18 swift 0x0000000100afae64 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 7908
      19 swift 0x0000000100aaf8b5 main + 18917
      20 libdyld.dylib 0x00007fff6d9f8015 start + 1
      Stack dump:
      0. Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/daniel/CloudStation/Development/ProcedureKit/ProcedureKit/Sources/ProcedureKitCloud/CloudKitSupport.swift /Users/daniel/CloudStation/Development/ProcedureKit/ProcedureKit/Sources/ProcedureKitCloud/CKDatabaseOperation.swift /Users/daniel/CloudStation/Development/ProcedureKit/ProcedureKit/Sources/ProcedureKitCloud/CloudKitError.swift /Users/daniel/CloudStation/Development/ProcedureKit/ProcedureKit/Sources/ProcedureKitCloud/CloudKitCapability.swift -primary-file /Users/daniel/CloudStation/Development/ProcedureKit/ProcedureKit/Sources/ProcedureKitCloud/CKDiscoverUserIdentitiesOperation.swift /Users/daniel/CloudStation/Development/ProcedureKit/ProcedureKit/Sources/ProcedureKitCloud/CKOperation.swift /Users/daniel/CloudStation/Development/ProcedureKit/ProcedureKit/Sources/ProcedureKitCloud/CloudKit.swift -target x86_64-apple-macosx10.11 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -I /Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Products/Debug -F /Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Products/Debug -application-extension -enable-testing -g -import-underlying-module -module-cache-path /Users/daniel/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -profile-generate -profile-coverage-mapping -swift-version 4 -enforce-exclusivity=checked -Onone -D DEBUG -disable-swift3-objc-inference -serialize-debugging-options -Xcc -I/Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/ProcedureKitCloud-generated-files.hmap -Xcc -I/Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/ProcedureKitCloud-own-target-headers.hmap -Xcc -I/Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/ProcedureKitCloud-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/ProcedureKitCloud-project-headers.hmap -Xcc -I/Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Products/Debug/include -Xcc -I/Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/DerivedSources/x86_64 -Xcc -I/Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -ivfsoverlay -Xcc /Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/unextended-module-overlay.yaml -Xcc -working-directory/Users/daniel/CloudStation/Development/ProcedureKit/ProcedureKit -emit-module-doc-path /Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/Objects-normal/x86_64/CKDiscoverUserIdentitiesOperation~partial.swiftdoc -serialize-diagnostics-path /Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/Objects-normal/x86_64/CKDiscoverUserIdentitiesOperation.dia -module-name ProcedureKitCloud -emit-module-path /Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/Objects-normal/x86_64/CKDiscoverUserIdentitiesOperation~partial.swiftmodule -emit-dependencies-path /Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/Objects-normal/x86_64/CKDiscoverUserIdentitiesOperation.d -emit-reference-dependencies-path /Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/Objects-normal/x86_64/CKDiscoverUserIdentitiesOperation.swiftdeps -o /Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Build/Intermediates.noindex/ProcedureKit.build/Debug/ProcedureKitCloud.build/Objects-normal/x86_64/CKDiscoverUserIdentitiesOperation.o -index-store-path /Users/daniel/Library/Developer/Xcode/DerivedData/ProcedureKit-aclzhkcnkavbdngwdrktepvbagxs/Index/DataStore -index-system-modules
      1. While running pass #106 SILModuleTransform "SIL Large Loadable type by-address lowering.".
      2. While converting type 'Optional<(@inout_aliasable @block_storage @callee_guaranteed (@owned CKUserIdentity, @owned CKUserIdentityLookupInfo) -> (), CKUserIdentity) -> ()>'
      error: Segmentation fault: 11

       

      Here is a PR from the open source project: https://github.com/ProcedureKit/ProcedureKit/pull/830

      The offending code is a protocol, which has a property which is gettable & settable, which is an optional closure, containing associated type arguments.

       

      Essentially:

      var propertyName: ((T, V) -> Void)? { get set }

        Attachments

          Activity

            People

            Assignee:
            shajrawi Joe Shajrawi
            Reporter:
            danthorpe Dan Thorpe
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: