Skip to content

[SR-8006] Segmentation fault: 11 (when whole module enabled) #50539

Open
@swift-ci

Description

@swift-ci
Previous ID SR-8006
Radar None
Original Reporter brduca (JIRA User)
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, 4.1Regression, CompilerCrash
Assignee None
Priority Medium

md5: 81e8c22d8d5515e059eb740b2e10480d

relates to:

  • SR-8738 Project doesn't compile with Incremental compilation, something about ObjC protocols

Issue Description:

I have a Swift/Objective-C project and since Xcode 9.2 in order to build the project in debug a must have the whole module enabled. If not I'm getting several (100+) segmentation faults: 11.
Here is the output I'm getting from the compiler:

0  swift                    0x000000011046dc5a PrintStackTraceSignalHandler(void*) + 42
1  swift                    0x000000011046d066 SignalHandler(int) + 966
2  libsystem_platform.dylib 0x00007fff58ff2f5a _sigtramp + 26
3  libsystem_platform.dylib 0x0000000000000040 _sigtramp + 2801848576
4  swift                    0x000000010d686317 swift::SILType::getPreferredExistentialRepresentation(swift::SILModule&, swift::Type) const + 391
5  swift                    0x000000010d6b89fb (anonymous namespace)::TypeClassifierBase<(anonymous namespace)::LowerType, swift::Lowering::TypeLowering const*>::visitExistentialType(swift::CanType) + 43
6  swift                    0x000000010d6b4ba4 swift::Lowering::TypeConverter::getTypeLowering(swift::Lowering::AbstractionPattern, swift::Type) + 2548
7  swift                    0x000000010d6232e8 (anonymous namespace)::DestructureResults::destructure(swift::Lowering::AbstractionPattern, swift::CanType) + 248
8  swift                    0x000000010d6223c1 getSILFunctionType(swift::SILModule&, swift::Lowering::AbstractionPattern, swift::CanTypeWrapper<swift::AnyFunctionType>, swift::AnyFunctionType::ExtInfo, (anonymous namespace)::Conventions const&, swift::ForeignInfo const&, llvm::Optional<swift::SILDeclRef>, llvm::Optional<swift::ProtocolConformanceRef>) + 1041
9  swift                    0x000000010d6258ee getUncachedSILFunctionTypeForConstant(swift::SILModule&, swift::SILDeclRef, swift::CanTypeWrapper<swift::AnyFunctionType>) + 1806
10 swift                    0x000000010d626da3 swift::Lowering::TypeConverter::getConstantInfo(swift::SILDeclRef) + 579
11 swift                    0x000000010c8af3fe swift::irgen::emitObjCMethodDescriptorParts(swift::irgen::IRGenModule&, swift::AbstractFunctionDecl*, bool, bool, llvm::Constant*&, llvm::Constant*&, llvm::Constant*&) + 270
12 swift                    0x000000010c7f1c4d (anonymous namespace)::ClassDataBuilder::buildMethodList(llvm::ArrayRef<(anonymous namespace)::ClassDataBuilder::MethodDescriptor>, llvm::StringRef) + 925
13 swift                    0x000000010c7f6f06 swift::irgen::emitObjCProtocolData(swift::irgen::IRGenModule&, swift::ProtocolDecl*) + 1766
14 swift                    0x000000010c8ae1ff swift::irgen::IRGenModule::emitLazyObjCProtocolDefinitions() + 63
15 swift                    0x000000010c91bb95 swift::irgen::IRGenModule::finalize() + 325
16 swift                    0x000000010c900a38 performIRGeneration(swift::IRGenOptions&, swift::ModuleDecl*, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> >, llvm::StringRef, swift::PrimarySpecificPaths const&, llvm::LLVMContext&, swift::SourceFile*, llvm::GlobalVariable**, unsigned int) + 1960
17 swift                    0x000000010c74bd08 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 46856
18 swift                    0x000000010c73d10f swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 7839
19 swift                    0x000000010c6e6c48 main + 13144
20 libdyld.dylib            0x00007fff58ce4015 start + 1

I'm not sure if it is the proper way to fill a bug (or what other useful information I might include), if so let me know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of softwareregressionswift 4.1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions