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-4981] CoreStore source breakage: While deserializing extension of '<null>' (ExtensionDecl #5) in 'CoreStore' #47558

Closed
lplarson opened this issue May 24, 2017 · 9 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 source compatibility

Comments

@lplarson
Copy link
Member

Previous ID SR-4981
Radar rdar://problem/32409449
Original Reporter @lplarson
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 1
Component/s Compiler
Labels Bug, CompilerCrash, SourceCompatibility
Assignee @lplarson
Priority Medium

md5: 577544b610c6fe55048d551e72c05b53

Issue Description:

To reproduce:

  1. Install latest GM/Beta Xcode
  2. $ git clone git@github.com:apple/swift-source-compat-suite.git
  3. $ cd swift-source-compat-suite

To build Swift from scratch before testing:
4. $ ./reproduce.py master --project-path CoreStore

Or if you've already built Swift:
4. $ ./reproduce.py master --project-path CoreStore --swiftc path/to/swiftc

0  swift                    0x000000010379dfa8 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1  swift                    0x000000010379e5c6 SignalHandler(int) + 342
2  libsystem_platform.dylib 0x00007fffd0812b3a _sigtramp + 26
3  libsystem_platform.dylib 0x000000010f6cf551 _sigtramp + 1055640113
4  libsystem_c.dylib        0x00007fffd0697420 abort + 129
5  swift                    0x00000001015f2def swift::ModuleFile::readConformance(llvm::BitstreamCursor&, swift::GenericEnvironment*) + 1823
6  swift                    0x00000001015f34f1 swift::ModuleFile::readNormalConformance(llvm::PointerEmbeddedInt<unsigned int, 31>) + 801
7  swift                    0x00000001015f2b58 swift::ModuleFile::readConformance(llvm::BitstreamCursor&, swift::GenericEnvironment*) + 1160
8  swift                    0x00000001015fab0d swift::ModuleFile::loadAllConformances(swift::Decl const*, unsigned long long, llvm::SmallVectorImpl<swift::ProtocolConformance*>&) + 221
9  swift                    0x0000000101960b4c swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage, swift::LazyResolver*) + 2124
10 swift                    0x0000000101960427 swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage, swift::LazyResolver*) + 295
11 swift                    0x0000000101962a25 swift::ConformanceLookupTable::lookupConformance(swift::ModuleDecl*, swift::NominalTypeDecl*, swift::ProtocolDecl*, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ProtocolConformance*>&) + 53
12 swift                    0x00000001015f290b swift::ModuleFile::readConformance(llvm::BitstreamCursor&, swift::GenericEnvironment*) + 571
13 swift                    0x00000001015f34f1 swift::ModuleFile::readNormalConformance(llvm::PointerEmbeddedInt<unsigned int, 31>) + 801
14 swift                    0x00000001015f2b58 swift::ModuleFile::readConformance(llvm::BitstreamCursor&, swift::GenericEnvironment*) + 1160
15 swift                    0x00000001015fab0d swift::ModuleFile::loadAllConformances(swift::Decl const*, unsigned long long, llvm::SmallVectorImpl<swift::ProtocolConformance*>&) + 221
16 swift                    0x0000000101960b4c swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage, swift::LazyResolver*) + 2124
17 swift                    0x0000000101960427 swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage, swift::LazyResolver*) + 295
18 swift                    0x0000000101962a25 swift::ConformanceLookupTable::lookupConformance(swift::ModuleDecl*, swift::NominalTypeDecl*, swift::ProtocolDecl*, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ProtocolConformance*>&) + 53
19 swift                    0x00000001019b95f1 swift::ModuleDecl::lookupConformance(swift::Type, swift::ProtocolDecl*, swift::LazyResolver*) + 785
20 swift                    0x00000001016b209e swift::ClangImporter::Implementation::finishProtocolConformance(swift::NormalProtocolConformance*) + 942
21 swift                    0x00000001016b1c27 swift::ClangImporter::Implementation::finishPendingActions() + 39
22 swift                    0x00000001016b25b0 swift::ClangImporter::Implementation::importDeclAndCacheImpl(clang::NamedDecl const*, swift::importer::ImportNameVersion, bool) + 896
23 swift                    0x0000000101699a60 swift::ClangImporter::Implementation::lookupValue(swift::SwiftLookupTable&, swift::DeclName, swift::VisibleDeclConsumer&) + 384
24 swift                    0x00000001016998bf swift::ClangModuleUnit::lookupValue(llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::DeclName, swift::NLKind, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 431
25 swift                    0x00000001019b87aa swift::ModuleDecl::lookupValue(llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::DeclName, swift::NLKind, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 90
26 swift                    0x00000001019c331a void lookupInModule<llvm::SmallSet<swift::CanType, 4u, (anonymous namespace)::SortCanType>, swift::namelookup::lookupInModule(swift::ModuleDecl*, llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::DeclName, llvm::SmallVectorImpl<swift::ValueDecl*>&, swift::NLKind, swift::namelookup::ResolutionKind, swift::LazyResolver*, swift::DeclContext const*, llvm::ArrayRef<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*> >)::$_0>(swift::ModuleDecl*, llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, llvm::SmallVectorImpl<swift::ValueDecl*>&, swift::namelookup::ResolutionKind, bool, swift::LazyResolver*, llvm::SmallDenseMap<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*>, llvm::TinyPtrVector<swift::ValueDecl*>, 32u, llvm::DenseMapInfo<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*> >, llvm::detail::DenseMapPair<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*>, llvm::TinyPtrVector<swift::ValueDecl*> > >&, swift::DeclContext const*, bool, llvm::ArrayRef<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*> >, swift::namelookup::lookupInModule(swift::ModuleDecl*, llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::DeclName, llvm::SmallVectorImpl<swift::ValueDecl*>&, swift::NLKind, swift::namelookup::ResolutionKind, swift::LazyResolver*, swift::DeclContext const*, llvm::ArrayRef<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*> >)::$_0) + 346
27 swift                    0x00000001019c373c void lookupInModule<llvm::SmallSet<swift::CanType, 4u, (anonymous namespace)::SortCanType>, swift::namelookup::lookupInModule(swift::ModuleDecl*, llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::DeclName, llvm::SmallVectorImpl<swift::ValueDecl*>&, swift::NLKind, swift::namelookup::ResolutionKind, swift::LazyResolver*, swift::DeclContext const*, llvm::ArrayRef<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*> >)::$_0>(swift::ModuleDecl*, llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, llvm::SmallVectorImpl<swift::ValueDecl*>&, swift::namelookup::ResolutionKind, bool, swift::LazyResolver*, llvm::SmallDenseMap<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*>, llvm::TinyPtrVector<swift::ValueDecl*>, 32u, llvm::DenseMapInfo<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*> >, llvm::detail::DenseMapPair<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*>, llvm::TinyPtrVector<swift::ValueDecl*> > >&, swift::DeclContext const*, bool, llvm::ArrayRef<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*> >, swift::namelookup::lookupInModule(swift::ModuleDecl*, llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::DeclName, llvm::SmallVectorImpl<swift::ValueDecl*>&, swift::NLKind, swift::namelookup::ResolutionKind, swift::LazyResolver*, swift::DeclContext const*, llvm::ArrayRef<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*> >)::$_0) + 1404
28 swift                    0x00000001019c318e swift::namelookup::lookupInModule(swift::ModuleDecl*, llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::DeclName, llvm::SmallVectorImpl<swift::ValueDecl*>&, swift::NLKind, swift::namelookup::ResolutionKind, swift::LazyResolver*, swift::DeclContext const*, llvm::ArrayRef<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*> >) + 1278
29 swift                    0x00000001019c9840 swift::DeclContext::lookupQualified(swift::Type, swift::DeclName, swift::NLOptions, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 1136
30 swift                    0x00000001015f4858 swift::ModuleFile::resolveCrossReference(swift::ModuleDecl*, unsigned int) + 760
31 swift                    0x00000001015eda8b swift::ModuleFile::getDeclChecked(llvm::PointerEmbeddedInt<unsigned int, 31>, llvm::Optional<swift::DeclContext*>) + 12635
32 swift                    0x00000001015f823a swift::ModuleFile::getTypeChecked(llvm::PointerEmbeddedInt<unsigned int, 31>) + 3834
33 swift                    0x00000001015ee66b swift::ModuleFile::getDeclChecked(llvm::PointerEmbeddedInt<unsigned int, 31>, llvm::Optional<swift::DeclContext*>) + 15675
34 swift                    0x00000001015e9d7e swift::ModuleFile::getDecl(llvm::PointerEmbeddedInt<unsigned int, 31>, llvm::Optional<swift::DeclContext*>) + 78
35 swift                    0x00000001016192db swift::ModuleFile::getTopLevelDecls(llvm::SmallVectorImpl<swift::Decl*>&) + 2043
36 swift                    0x00000001019b905f swift::ModuleDecl::getTopLevelDecls(llvm::SmallVectorImpl<swift::Decl*>&) const + 63
37 swift                    0x000000010125a2cf swift::ClassHierarchyAnalysis::init() + 79
38 swift                    0x0000000101250421 swift::createClassHierarchyAnalysis(swift::SILModule*) + 129
39 swift                    0x00000001012fc4fb swift::SILPassManager::SILPassManager(swift::SILModule*, llvm::StringRef) + 427
40 swift                    0x000000010130466b swift::runSILDiagnosticPasses(swift::SILModule&) + 123
41 swift                    0x0000000100be375e performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 7870
42 swift                    0x0000000100be09fd swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2621
43 swift                    0x0000000100ba7ada main + 2346
44 libdyld.dylib            0x00007fffd0603235 start + 1
45 libdyld.dylib            0x00000000000000b0 start + 799002236
Stack dump:
1.  While reading from CoreStore/build/Build/Intermediates/CoreStore.build/Release/CoreStore OSX.build/Objects-normal/x86_64/CoreDataNativeType~partial.swiftmodule
2.  While deserializing extension of '<null>' (ExtensionDecl #&#8203;5) in 'CoreStore'
3.  While deserializing decl #&#8203;15 (XREF) in 'CoreStore'
4.  Cross-reference to module 'Foundation'
    ... NSData
5.NSManagedObjectModel.h:16:8: importing 'NSData'
6.  While loading conformances for extension of NSData in module 'CoreStore'
7.  While reading conformance for type 'NSData'
8.  While ... to 'CoreStoreImportableAttributeType' in module 'CoreStore'
9.  While cross-referencing conformance for 'NSData' in module 'Foundation'
10. While ... to 'CoreStoreQueryableAttributeType' in module 'CoreStore'
11. While loading conformances for extension of NSData in module 'CoreStore'
12. While reading conformance for type 'NSData'
13. While ... to 'CoreStoreQueryableAttributeType' in module 'CoreStore'
14. While cross-referencing conformance for 'NSData' in module 'Foundation'
15. While ... to 'CoreDataNativeType' in module 'CoreStore'
16. If you're seeing a crash here, check that your SDK and dependencies are at least as new as the versions used to build 'CoreStore'

<unknown>:0: error: unable to execute command: Abort trap: 6
<unknown>:0: error: merge-module command failed due to signal 6 (use -v to see invocation)
** BUILD FAILED **
@lplarson
Copy link
Member Author

This is happening in 4.0.

@belkadan
Copy link
Contributor

@swift-ci create

@swift-ci
Copy link
Collaborator

swift-ci commented Jun 7, 2017

Comment by John Estropia (JIRA)

Hi, I am the author of CoreStore. Is there any way to work around this from the library's side? I'm getting this same error with Swift 3.2 as well on Xcode 9:

0  swift                    0x000000011217d3aa PrintStackTraceSignalHandler(void*) + 42
1  swift                    0x000000011217c7e6 SignalHandler(int) + 662
2  libsystem_platform.dylib 0x00007fffa518bb3a _sigtramp + 26
3  libsystem_platform.dylib 0x00007fa55dd09490 _sigtramp + 3099056496
4  libsystem_c.dylib        0x00007fffa5010420 abort + 129
5  swift                    0x000000010f8aad1a swift::ModuleFile::readConformance(llvm::BitstreamCursor&, swift::GenericEnvironment*) + 4042
6  swift                    0x000000010f8aab75 swift::ModuleFile::readConformance(llvm::BitstreamCursor&, swift::GenericEnvironment*) + 3621
7  swift                    0x000000010f8ad5cc swift::ModuleFile::loadAllConformances(swift::Decl const*, unsigned long long, llvm::SmallVectorImpl<swift::ProtocolConformance*>&) + 300
8  swift                    0x000000010fcdcecd swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage, swift::LazyResolver*) + 2029
9  swift                    0x000000010fcdc7d7 swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage, swift::LazyResolver*) + 247
10 swift                    0x000000010fce0a51 swift::ConformanceLookupTable::lookupConformance(swift::ModuleDecl*, swift::NominalTypeDecl*, swift::ProtocolDecl*, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ProtocolConformance*>&) + 49
11 swift                    0x000000010fd3e300 swift::ModuleDecl::lookupConformance(swift::Type, swift::ProtocolDecl*, swift::LazyResolver*) + 1248
12 swift                    0x000000010f9af930 swift::ClangImporter::Implementation::finishPendingActions() + 1808
13 swift                    0x000000010f984d80 swift::ClangImporter::Implementation::importDeclAndCacheImpl(clang::NamedDecl const*, swift::importer::ImportNameVersion, bool) + 2816
14 swift                    0x000000010f96944f swift::ClangImporter::Implementation::lookupValue(swift::SwiftLookupTable&, swift::DeclName, swift::VisibleDeclConsumer&) + 591
15 swift                    0x000000010f965966 swift::ClangModuleUnit::lookupValue(llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::DeclName, swift::NLKind, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 566
16 swift                    0x000000010fd4526d void lookupInModule<llvm::SmallSet<swift::CanType, 4u, (anonymous namespace)::SortCanType>, swift::namelookup::lookupInModule(swift::ModuleDecl*, llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::DeclName, llvm::SmallVectorImpl<swift::ValueDecl*>&, swift::NLKind, swift::namelookup::ResolutionKind, swift::LazyResolver*, swift::DeclContext const*, llvm::ArrayRef<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*> >)::$_0>(swift::ModuleDecl*, llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, llvm::SmallVectorImpl<swift::ValueDecl*>&, swift::namelookup::ResolutionKind, bool, swift::LazyResolver*, llvm::SmallDenseMap<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*>, llvm::TinyPtrVector<swift::ValueDecl*>, 32u, llvm::DenseMapInfo<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*> >, llvm::detail::DenseMapPair<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*>, llvm::TinyPtrVector<swift::ValueDecl*> > >&, swift::DeclContext const*, bool, llvm::ArrayRef<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*> >, swift::namelookup::lookupInModule(swift::ModuleDecl*, llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::DeclName, llvm::SmallVectorImpl<swift::ValueDecl*>&, swift::NLKind, swift::namelookup::ResolutionKind, swift::LazyResolver*, swift::DeclContext const*, llvm::ArrayRef<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*> >)::$_0) + 333
17 swift                    0x000000010fd45874 void lookupInModule<llvm::SmallSet<swift::CanType, 4u, (anonymous namespace)::SortCanType>, swift::namelookup::lookupInModule(swift::ModuleDecl*, llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::DeclName, llvm::SmallVectorImpl<swift::ValueDecl*>&, swift::NLKind, swift::namelookup::ResolutionKind, swift::LazyResolver*, swift::DeclContext const*, llvm::ArrayRef<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*> >)::$_0>(swift::ModuleDecl*, llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, llvm::SmallVectorImpl<swift::ValueDecl*>&, swift::namelookup::ResolutionKind, bool, swift::LazyResolver*, llvm::SmallDenseMap<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*>, llvm::TinyPtrVector<swift::ValueDecl*>, 32u, llvm::DenseMapInfo<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*> >, llvm::detail::DenseMapPair<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*>, llvm::TinyPtrVector<swift::ValueDecl*> > >&, swift::DeclContext const*, bool, llvm::ArrayRef<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*> >, swift::namelookup::lookupInModule(swift::ModuleDecl*, llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::DeclName, llvm::SmallVectorImpl<swift::ValueDecl*>&, swift::NLKind, swift::namelookup::ResolutionKind, swift::LazyResolver*, swift::DeclContext const*, llvm::ArrayRef<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*> >)::$_0) + 1876
18 swift                    0x000000010fd450e3 swift::namelookup::lookupInModule(swift::ModuleDecl*, llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::DeclName, llvm::SmallVectorImpl<swift::ValueDecl*>&, swift::NLKind, swift::namelookup::ResolutionKind, swift::LazyResolver*, swift::DeclContext const*, llvm::ArrayRef<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*> >) + 1267
19 swift                    0x000000010fd4dece swift::DeclContext::lookupQualified(swift::Type, swift::DeclName, swift::NLOptions, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 1438
20 swift                    0x000000010f8a5caa swift::ModuleFile::resolveCrossReference(swift::ModuleDecl*, unsigned int) + 874
21 swift                    0x000000010f897d65 swift::ModuleFile::getDeclChecked(llvm::PointerEmbeddedInt<unsigned int, 31>, llvm::Optional<swift::DeclContext*>) + 14853
22 swift                    0x000000010f8a1a4d swift::ModuleFile::getTypeChecked(llvm::PointerEmbeddedInt<unsigned int, 31>) + 4237
23 swift                    0x000000010f89904c swift::ModuleFile::getDeclChecked(llvm::PointerEmbeddedInt<unsigned int, 31>, llvm::Optional<swift::DeclContext*>) + 19692
24 swift                    0x000000010f894324 swift::ModuleFile::getDecl(llvm::PointerEmbeddedInt<unsigned int, 31>, llvm::Optional<swift::DeclContext*>) + 84
25 swift                    0x000000010f8cda7a swift::ModuleFile::getTopLevelDecls(llvm::SmallVectorImpl<swift::Decl*>&) + 2714
26 swift                    0x000000010f57c680 swift::SILPassManager::SILPassManager(swift::SILModule*, llvm::StringRef) + 1504
27 swift                    0x000000010f582cff swift::runSILDiagnosticPasses(swift::SILModule&) + 143
28 swift                    0x000000010eb4f0f0 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 13696
29 swift                    0x000000010eb4a304 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 7332
30 swift                    0x000000010eb00728 main + 12248
31 libdyld.dylib            0x00007fffa4f7c235 start + 1
32 libdyld.dylib            0x0000000000000042 start + 1527266830
Stack dump:
0.  Program arguments: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -emit-module -filelist /var/folders/bv/hvtc52bn1mgcfg6j6368nzx80000gp/T/inputs-abe3f0 -parse-as-library -target x86_64-apple-ios8.0 -enable-objc-interop -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk -I /Users/JohnEstropia/Documents/XCodeProjects/CoreStore/DerivedData/Build/Products/Debug-iphonesimulator -F /Users/JohnEstropia/Documents/XCodeProjects/CoreStore/DerivedData/Build/Products/Debug-iphonesimulator -application-extension -enable-testing -g -import-underlying-module -module-cache-path /Users/JohnEstropia/Documents/XCodeProjects/CoreStore/DerivedData/ModuleCache -swift-version 3 -D DEBUG -serialize-debugging-options -Xcc -I/Users/JohnEstropia/Documents/XCodeProjects/CoreStore/DerivedData/Build/Intermediates/CoreStore.build/Debug-iphonesimulator/CoreStore iOS.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/JohnEstropia/Documents/XCodeProjects/CoreStore/DerivedData/Build/Intermediates/CoreStore.build/Debug-iphonesimulator/CoreStore iOS.build/CoreStore-generated-files.hmap -Xcc -I/Users/JohnEstropia/Documents/XCodeProjects/CoreStore/DerivedData/Build/Intermediates/CoreStore.build/Debug-iphonesimulator/CoreStore iOS.build/CoreStore-own-target-headers.hmap -Xcc -I/Users/JohnEstropia/Documents/XCodeProjects/CoreStore/DerivedData/Build/Intermediates/CoreStore.build/Debug-iphonesimulator/CoreStore iOS.build/CoreStore-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/JohnEstropia/Documents/XCodeProjects/CoreStore/DerivedData/Build/Intermediates/CoreStore.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/JohnEstropia/Documents/XCodeProjects/CoreStore/DerivedData/Build/Intermediates/CoreStore.build/Debug-iphonesimulator/CoreStore iOS.build/CoreStore-project-headers.hmap -Xcc -I/Users/JohnEstropia/Documents/XCodeProjects/CoreStore/DerivedData/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/JohnEstropia/Documents/XCodeProjects/CoreStore/DerivedData/Build/Intermediates/CoreStore.build/Debug-iphonesimulator/CoreStore iOS.build/DerivedSources/x86_64 -Xcc -I/Users/JohnEstropia/Documents/XCodeProjects/CoreStore/DerivedData/Build/Intermediates/CoreStore.build/Debug-iphonesimulator/CoreStore iOS.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -ivfsoverlay -Xcc /Users/JohnEstropia/Documents/XCodeProjects/CoreStore/DerivedData/Build/Intermediates/CoreStore.build/Debug-iphonesimulator/CoreStore iOS.build/unextended-module-overlay.yaml -Xcc -working-directory/Users/JohnEstropia/Documents/XCodeProjects/CoreStore -emit-module-doc-path /Users/JohnEstropia/Documents/XCodeProjects/CoreStore/DerivedData/Build/Intermediates/CoreStore.build/Debug-iphonesimulator/CoreStore iOS.build/Objects-normal/x86_64/CoreStore.swiftdoc -module-name CoreStore -emit-objc-header-path /Users/JohnEstropia/Documents/XCodeProjects/CoreStore/DerivedData/Build/Intermediates/CoreStore.build/Debug-iphonesimulator/CoreStore iOS.build/Objects-normal/x86_64/CoreStore-Swift.h -o /Users/JohnEstropia/Documents/XCodeProjects/CoreStore/DerivedData/Build/Intermediates/CoreStore.build/Debug-iphonesimulator/CoreStore iOS.build/Objects-normal/x86_64/CoreStore.swiftmodule 
1.  While reading from /Users/JohnEstropia/Documents/XCodeProjects/CoreStore/DerivedData/Build/Intermediates/CoreStore.build/Debug-iphonesimulator/CoreStore iOS.build/Objects-normal/x86_64/CoreDataNativeType~partial.swiftmodule
2.  While deserializing extension of '<null>' (ExtensionDecl #&#8203;10) in 'CoreStore'
3.  While deserializing decl #&#8203;20 (XREF) in 'CoreStore'
4.  Cross-reference to module 'Foundation'
    ... NSNull
5.  /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSNull.h:9:12: importing 'NSNull'
6.  While loading conformances for extension of NSNull in module 'CoreStore'
7.  While reading conformance for type 'NSNull'
8.  While ... to 'QueryableAttributeType' in module 'CoreStore'
9.  While cross-referencing conformance for 'NSNull' in module 'Foundation'
10. While ... to 'CoreDataNativeType' in module 'CoreStore'
11. If you're seeing a crash here, check that your SDK and dependencies are at least as new as the versions used to build 'CoreStore'

@swift-ci
Copy link
Collaborator

swift-ci commented Jun 7, 2017

Comment by John Estropia (JIRA)

Sorry, forgot to mention this is on CoreStore's prototype/Swift_3_2 branch.

@belkadan
Copy link
Contributor

belkadan commented Jun 7, 2017

Ah, this is the issue I mentioned in the pull request, John—trying to make one associated type extend another. Removing that will make the crash go away.

@swift-ci
Copy link
Collaborator

swift-ci commented Jun 8, 2017

Comment by John Estropia (JIRA)

I see what you mean now, thanks!

@belkadan
Copy link
Contributor

The core team has decided that this qualifies as a bug fix to now reject invalid code and will not be downgraded to a warning in Swift 3 mode. @lplarson, what happens next?

@lplarson
Copy link
Member Author

lplarson commented Dec 1, 2017

@lplarson
Copy link
Member Author

lplarson commented Dec 1, 2017

PR testing passed. The issue is resolved.

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

No branches or pull requests

4 participants