Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-12571] Swift compiler crashes with extensions declared outside framework (archive mode only) #55016

Closed
swift-ci opened this issue Apr 10, 2020 · 2 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software IRGen LLVM IR generation

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-12571
Radar rdar://problem/62202282
Original Reporter acormery (JIRA User)
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Environment

Apple Swift version 5.2 (swiftlang-1103.0.32.1 clang-1103.0.32.29)
Target: x86_64-apple-darwin19.5.0

Xcode: 11.4 (11E146)
macOS: 19F53f

Additional Detail from JIRA
Votes 0
Component/s
Labels Bug, Crash
Assignee None
Priority Medium

md5: 9b989802327c1fb0039fb2ecf633ee21

Issue Description:

Description

The Swift compiler (5.2) can crash with extensions declared outside a framework target in archive mode only (works in debug).

Example (see the project in attachments)

Create a simple iOS app project, and create 2 others frameworks targets (in the attachments, SubscriptionKit and ResourceKit).
In the first framework target, declare:

  • an empty protocol

  • an empty class

public protocol SubscriptionViewControllerDelegate { /* nothing */ }

public class SubscriptionViewController { /* nothing */ }

In the second framework target, declare 2 protocols:

  • the first needs to add a conformance (like to NSObject)

  • the second needs to have a method with the first protocol as parameter

import Foundation

public protocol ResourceKitProtocol: NSObject {}

public protocol ResourceKitDelegate {
    func subscriptionViewController(for resourceKit: ResourceKitProtocol)
}

Inside the app target:

  • create an extension of the object used as conformance of the first protocol inside the second framework, and implement the protocol inside the first framework

    extension NSObject: SubscriptionViewControllerDelegate { /* nothing */ }
  • declare a new class, and inside this one, declare a property with the protocol of the first framework as type

    class SubscriptionViewControllerBuilder {
        let delegate: SubscriptionViewControllerDelegate
    
        init(delegate: SubscriptionViewControllerDelegate) { self.delegate = delegate }
    }
  • implement the second protocol of the second framework inside the default ViewController class, and use your previous class declaration with the parameter of the protocol method.

    class ViewController: UIViewController, ResourceKitDelegate {
        func subscriptionViewController(for resourceKit: ResourceKitProtocol) {
            _ = SubscriptionViewControllerBuilder(delegate: resourceKit)
        }
    }

    Full code inside the iOS target:

    import UIKit
    import SubscriptionKit
    import ResourceKit
    
    class ViewController: UIViewController, ResourceKitDelegate {
        func subscriptionViewController(for resourceKit: ResourceKitProtocol) {
            _ = SubscriptionViewControllerBuilder(delegate: resourceKit)
        }
    }
    
    class SubscriptionViewControllerBuilder {
        let delegate: SubscriptionViewControllerDelegate
    
        init(delegate: SubscriptionViewControllerDelegate) { self.delegate = delegate }
    }
    
    extension NSObject: SubscriptionViewControllerDelegate { /* nothing */ }

    Now, try to compile:

  • in debug mode, the compile process will succeed

  • when you try to archive this project, you will get a compiler crash

Compile logs (from the attached project)

CompileSwift normal arm64 (in target 'SwiftArchiveIssue' from project 'SwiftArchiveIssue')
    cd /Users/acormery/Desktop/SwiftArchiveIssue
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -emit-bc /Users/acormery/Desktop/SwiftArchiveIssue/SwiftArchiveIssue/UIViewController+Extension.swift /Users/acormery/Desktop/SwiftArchiveIssue/SwiftArchiveIssue/ViewController.swift /Users/acormery/Desktop/SwiftArchiveIssue/SwiftArchiveIssue/ViewController+ResouceKitDelegate.swift /Users/acormery/Desktop/SwiftArchiveIssue/SwiftArchiveIssue/SubscriptionViewControllerBuilder.swift /Users/acormery/Desktop/SwiftArchiveIssue/SwiftArchiveIssue/AppDelegate.swift /Users/acormery/Desktop/SwiftArchiveIssue/SwiftArchiveIssue/SceneDelegate.swift -supplementary-output-file-map /var/folders/bb/rj3x1yx52kv6jt697ww81jwm0000gn/T/supplementaryOutputs-b50cf3 -target arm64-apple-ios13.4 -Xllvm -aarch64-use-tbi -enable-objc-interop -stack-check -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.4.sdk -I /Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/BuildProductsPath/Release-iphoneos -F /Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/BuildProductsPath/Release-iphoneos -g -module-cache-path /Users/acormery/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -swift-version 5 -enforce-exclusivity=checked -O -serialize-debugging-options -Xcc -working-directory -Xcc /Users/acormery/Desktop/SwiftArchiveIssue -Xcc -I/Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/SwiftArchiveIssue-generated-files.hmap -Xcc -I/Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/SwiftArchiveIssue-own-target-headers.hmap -Xcc -I/Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/SwiftArchiveIssue-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/SwiftArchiveIssue-project-headers.hmap -Xcc -I/Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/BuildProductsPath/Release-iphoneos/include -Xcc -I/Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/DerivedSources-normal/arm64 -Xcc -I/Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/DerivedSources/arm64 -Xcc -I/Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/DerivedSources -module-name SwiftArchiveIssue -num-threads 8 -o /Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/Objects-normal/arm64/UIViewController+Extension.bc -o /Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/Objects-normal/arm64/ViewController.bc -o /Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/Objects-normal/arm64/ViewController+ResouceKitDelegate.bc -o /Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/Objects-normal/arm64/SubscriptionViewControllerBuilder.bc -o /Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/Objects-normal/arm64/AppDelegate.bc -o /Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/Objects-normal/arm64/SceneDelegate.bc

Stack dump:
0.  Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -emit-bc /Users/acormery/Desktop/SwiftArchiveIssue/SwiftArchiveIssue/UIViewController+Extension.swift /Users/acormery/Desktop/SwiftArchiveIssue/SwiftArchiveIssue/ViewController.swift /Users/acormery/Desktop/SwiftArchiveIssue/SwiftArchiveIssue/ViewController+ResouceKitDelegate.swift /Users/acormery/Desktop/SwiftArchiveIssue/SwiftArchiveIssue/SubscriptionViewControllerBuilder.swift /Users/acormery/Desktop/SwiftArchiveIssue/SwiftArchiveIssue/AppDelegate.swift /Users/acormery/Desktop/SwiftArchiveIssue/SwiftArchiveIssue/SceneDelegate.swift -supplementary-output-file-map /var/folders/bb/rj3x1yx52kv6jt697ww81jwm0000gn/T/supplementaryOutputs-b50cf3 -target arm64-apple-ios13.4 -Xllvm -aarch64-use-tbi -enable-objc-interop -stack-check -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.4.sdk -I /Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/BuildProductsPath/Release-iphoneos -F /Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/BuildProductsPath/Release-iphoneos -g -module-cache-path /Users/acormery/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -swift-version 5 -enforce-exclusivity=checked -O -serialize-debugging-options -Xcc -working-directory -Xcc /Users/acormery/Desktop/SwiftArchiveIssue -Xcc -I/Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/SwiftArchiveIssue-generated-files.hmap -Xcc -I/Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/SwiftArchiveIssue-own-target-headers.hmap -Xcc -I/Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/SwiftArchiveIssue-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/SwiftArchiveIssue-project-headers.hmap -Xcc -I/Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/BuildProductsPath/Release-iphoneos/include -Xcc -I/Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/DerivedSources-normal/arm64 -Xcc -I/Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/DerivedSources/arm64 -Xcc -I/Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/DerivedSources -module-name SwiftArchiveIssue -num-threads 8 -o /Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/Objects-normal/arm64/UIViewController+Extension.bc -o /Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/Objects-normal/arm64/ViewController.bc -o /Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/Objects-normal/arm64/ViewController+ResouceKitDelegate.bc -o /Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/Objects-normal/arm64/SubscriptionViewControllerBuilder.bc -o /Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/Objects-normal/arm64/AppDelegate.bc -o /Users/acormery/Library/Developer/Xcode/DerivedData/SwiftArchiveIssue-gtsqrbljmwrtwhfigaqyokbwyjlv/Build/Intermediates.noindex/ArchiveIntermediates/SwiftArchiveIssue/IntermediateBuildFilesPath/SwiftArchiveIssue.build/Release-iphoneos/SwiftArchiveIssue.build/Objects-normal/arm64/SceneDelegate.bc 
1.  Apple Swift version 5.2 (swiftlang-1103.0.32.1 clang-1103.0.32.29)
2.  While emitting IR SIL function "@$s17SwiftArchiveIssue14ViewControllerC11ResourceKit0fG8DelegateAadEP012subscriptiondE03forSo06UIViewE0CSgAD0fG8Protocol_p_tFTW".
 for 'subscriptionViewController(for:)' (at /Users/acormery/Desktop/SwiftArchiveIssue/SwiftArchiveIssue/ViewController+ResouceKitDelegate.swift:13:12)
0  swift                    0x000000010a2294ea PrintStackTraceSignalHandler(void*) + 42
1  swift                    0x000000010a228cc0 SignalHandler(int) + 352
2  libsystem_platform.dylib 0x00007fff734645fd _sigtramp + 29
3  libsystem_platform.dylib 0x0000000000000010 _sigtramp + 2360982064
4  swift                    0x00000001070025cd swift::GenericSignatureImpl::getConformanceAccessPath(swift::Type, swift::ProtocolDecl*) + 493
5  swift                    0x0000000105ff3b50 swift::irgen::emitArchetypeWitnessTableRef(swift::irgen::IRGenFunction&, swift::CanTypeWrapper<swift::ArchetypeType>, swift::ProtocolDecl*) + 400
6  swift                    0x0000000106145280 swift::irgen::emitGenericRequirementFromSubstitutions(swift::irgen::IRGenFunction&, swift::CanGenericSignature, swift::ModuleDecl&, swift::irgen::GenericRequirement, swift::SubstitutionMap) + 256
7  swift                    0x00000001061450e4 void llvm::function_ref<void (swift::irgen::GenericRequirement)>::callback_fn<(anonymous namespace)::EmitPolymorphicArguments::emit(swift::SubstitutionMap, swift::irgen::WitnessMetadata*, swift::irgen::Explosion&)::$_21>(long, swift::irgen::GenericRequirement) + 36
8  swift                    0x0000000106142e2d void llvm::function_ref<void (swift::irgen::GenericRequirement)>::callback_fn<(anonymous namespace)::PolymorphicConvention::enumerateUnfulfilledRequirements(llvm::function_ref<void (swift::irgen::GenericRequirement)> const&)::$_11>(long, swift::irgen::GenericRequirement) + 205
9  swift                    0x0000000106142d40 (anonymous namespace)::PolymorphicConvention::enumerateUnfulfilledRequirements(llvm::function_ref<void (swift::irgen::GenericRequirement)> const&) + 336
10 swift                    0x0000000106144e3e swift::irgen::emitPolymorphicArguments(swift::irgen::IRGenFunction&, swift::CanTypeWrapper<swift::SILFunctionType>, swift::SubstitutionMap, swift::irgen::WitnessMetadata*, swift::irgen::Explosion&) + 478
11 swift                    0x00000001061d0167 (anonymous namespace)::IRGenSILFunction::visitFullApplySite(swift::FullApplySite) + 2263
12 swift                    0x00000001061b08e3 swift::irgen::IRGenModule::emitSILFunction(swift::SILFunction*) + 8835
13 swift                    0x0000000106066c46 swift::irgen::IRGenerator::emitLazyDefinitions() + 8790
14 swift                    0x000000010618cb2b swift::performIRGeneration(swift::IRGenOptions&, swift::ModuleDecl*, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> >, llvm::StringRef, swift::PrimarySpecificPaths const&, llvm::LLVMContext&, llvm::ArrayRef<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, llvm::GlobalVariable**) + 1979
15 swift                    0x0000000105f862f1 performCompileStepsPostSILGen(swift::CompilerInstance&, swift::CompilerInvocation&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> >, bool, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::PrimarySpecificPaths const&, bool, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 4129
16 swift                    0x0000000105f7d4a5 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 55813
17 swift                    0x0000000105ef34d3 main + 1283
18 libdyld.dylib            0x00007fff7326bcc9 start + 1
19 libdyld.dylib            0x000000000000004d start + 2363048837
error: Segmentation fault: 11 (in target 'SwiftArchiveIssue' from project 'SwiftArchiveIssue')
@beccadax
Copy link
Contributor

@swift-ci create

@slavapestov
Copy link
Member

This was fixed in 5.3 by aschwaighofer@apple.com (JIRA User). #31385

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added CompilerCrash IRGen LLVM IR generation labels Sep 17, 2022
@AnthonyLatsis AnthonyLatsis added the compiler The Swift compiler in itself label Dec 13, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software IRGen LLVM IR generation
Projects
None yet
Development

No branches or pull requests

4 participants