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-8006] Segmentation fault: 11 (when whole module enabled) #50539

Open
swift-ci opened this issue Jun 15, 2018 · 2 comments
Open

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

swift-ci opened this issue Jun 15, 2018 · 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 regression swift 4.1

Comments

@swift-ci
Copy link
Collaborator

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.

@belkadan
Copy link
Contributor

If you can share the project that'd be great. If not, attaching the full build log, or at least the part for the command that crashed, could potentially help a lot.

@swift-ci
Copy link
Collaborator Author

Comment by Salvador (JIRA)

Sharing the project unfortunately is not an option, but I can for sure share the build log. I can't tell the command that crashed, the only info I have is the name of the class and the stack track I already pasted (above). I tried using the snapshot of swift 4.1.2, master (08/06/2018), Xcode (9.4), Xcode 10 beta.

Is there anything else I can do to retrieve more info?

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the crash Bug: A crash, i.e., an abnormal termination of software label Dec 12, 2022
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 regression swift 4.1
Projects
None yet
Development

No branches or pull requests

3 participants