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-470] Segmentation fault: 11 #43087

Closed
krzyzanowskim opened this issue Jan 5, 2016 · 5 comments
Closed

[SR-470] Segmentation fault: 11 #43087

krzyzanowskim opened this issue Jan 5, 2016 · 5 comments
Assignees
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

Comments

@krzyzanowskim
Copy link
Contributor

krzyzanowskim commented Jan 5, 2016

Previous ID SR-470
Radar None
Original Reporter @krzyzanowskim
Type Bug
Environment

Xcode Version 7.2 (7C68)

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CompilerCrash
Assignee @slavapestov
Priority Medium

md5: 5366a25f0083648754be12fb590936f3

Issue Description:

Suddenly my application can't compile any longer and I have no idea why. This is the only information I can see in logs now:

0 swift 0x000000010bde6fbb llvm::sys::PrintStackTrace(\_\_sFILE\*) + 43  
1 swift 0x000000010bde76fb SignalHandler(int) + 379  
2 libsystem_platform.dylib 0x00007fff8d3b3eaa \_sigtramp + 26  
3 libsystem_platform.dylib 000000000000000000 \_sigtramp + 1925497200  
4 swift 0x000000010a55dd69 swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl\*, swift::ConformanceLookupTable::ConformanceStage, swift::LazyResolver\*) + 201  
5 swift 0x000000010a55dd9d swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl\*, swift::ConformanceLookupTable::ConformanceStage, swift::LazyResolver\*) + 253  
6 swift 0x000000010a55de12 swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl\*, swift::ConformanceLookupTable::ConformanceStage, swift::LazyResolver\*) + 370  
7 swift 0x000000010a560f95 swift::ConformanceLookupTable::lookupConformances(swift::NominalTypeDecl\*, swift::DeclContext\*, swift::LazyResolver\*, swift::ConformanceLookupKind, llvm::SmallVectorImpl\<swift::ProtocolDecl\*\>**, llvm::SmallVectorImpl\<swift::ProtocolConformance**\>**, llvm::SmallVectorImpl\<swift::ConformanceDiagnostic\>**) + 53  
8 swift 0x000000010a5a5449 swift::DeclContext::getLocalConformances(swift::ConformanceLookupKind, llvm::SmallVectorImpl\<swift::ConformanceDiagnostic\>\*, bool) const + 201  
9 swift 0x000000010a234689 swift::serialization::Serializer::writeDecl(swift::Decl const\*) + 2617  
10 swift 0x000000010a23b8ef swift::serialization::Serializer::writeAllDeclsAndTypes() + 8447  
11 swift 0x000000010a23c789 swift::serialization::Serializer::writeAST(llvm::PointerUnion\<swift::ModuleDecl\*, swift::SourceFile\*\>) + 2505  
12 swift 0x000000010a23ed87 swift::serialization::Serializer::writeToStream(llvm::raw_ostream&, llvm::PointerUnion\<swift::ModuleDecl\*, swift::SourceFile\*\>, swift::SILModule const\*, swift::SerializationOptions const&) + 135  
13 swift 0x000000010a23f9b2 withOutputFile(swift::ASTContext&, llvm::StringRef, llvm::function_ref\<void (llvm::raw_ostream&)\>) + 226  
14 swift 0x000000010a23f836 swift::serialize(llvm::PointerUnion\<swift::ModuleDecl\*, swift::SourceFile\*\>, swift::SerializationOptions const&, swift::SILModule const\*) + 214  
15 swift 0x0000000109ed7f08 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef\<char const\*\>, int&) + 12840  
16 swift 0x0000000109ed4ad3 frontend_main(llvm::ArrayRef\<char const\*\>, char const\*, void\*) + 2691  
17 swift 0x0000000109ed1154 main + 2324  
18 libdyld.dylib 0x00007fff911f25ad start + 1  
19 libdyld.dylib 0x0000000000000078 start + 1860229836  
@krzyzanowskim
Copy link
Contributor Author

Turn out that this issue occurs to me only after "clean build". It does not crash when I add file to the project and build.

@belkadan
Copy link
Contributor

belkadan commented Jan 5, 2016

Can you attach the project? Or file a Radar with the project attached?

I've seen something like this before but I can't remember where. Whole Module Optimization ought to get you unstuck, at least, at the cost of your incremental compilation.

@krzyzanowskim
Copy link
Contributor Author

krzyzanowskim commented Jan 5, 2016

unfortunately I can't attach the project. I think I narrowed it to this lines:

private protocol _Foo {}
extension CKAsset: _Foo {} // this here

this is OSX btw (in case that matters)

@mayoff
Copy link

mayoff commented May 16, 2016

Still crashes as of swift-DEVELOPMENT-SNAPSHOT-2016-05-09-a.xctoolchain.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis
Copy link
Collaborator

The reduced example works fine now. Digging for the reasons this once crashed is going to be a nightmare though, so I am going to err on the optimistic side and assume we have the test coverage.

@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
Projects
None yet
Development

No branches or pull requests

4 participants