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-15748] Compiler crashes (Trap 6) if one of classes is moved from containing class into separate file/extension #58025

Open
bealex opened this issue Jan 18, 2022 · 0 comments
Labels

Comments

@bealex
Copy link

bealex commented Jan 18, 2022

Previous ID SR-15748
Radar None
Original Reporter @bealex
Type Bug

Attachment: Download

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

md5: 1ad3ee844ba2de576c6f81cd9a9d267d

Issue Description:

To reproduce:

1. Open project in Xcode (I use version 13.2.1, 13C100)
2. Resolve dependencies (there is only one public dependency)
3. Try to compile. Compiler crashes (log is below)
4. If you'll comment SearchOverlayComponent.Model in TheRules2022/Code/Presentation/Main/SearchOverlayComponent.Logic.swift and uncomment same struct in TheRules2022/Code/Presentation/Main/SearchOverlayComponent.swift, crash will disappear.

1. Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)
2.
3. While evaluating request ASTLoweringRequest(Lowering AST to SIL for module Version2022)
4. While deserializing SIL function "$s11Version202213MainComponentC5LogicC012createSearchC0AA0f7OverlayC0CSgyF"
5. While deserializing decl @ 166317 (XREF) in 'Version2022'
6. Cross-reference to module 'Version2022'
... SearchOverlayComponent
7. While evaluating request ModuleQualifiedLookupRequest(0x135046c00 Module name=Version2022, Version2022.Version2022, 'SearchOverlayComponent', { NL_RemoveNonVisible, NL_RemoveOverridden })
8. While evaluating request LookupInModuleRequest(0x135046c00 Module name=Version2022, 'SearchOverlayComponent', QualifiedLookup, Overloadable, 0x135046c00 Module name=Version2022, { NL_RemoveNonVisible, NL_RemoveOverridden })
9. While reading from module 'Version2022' with full misc version '5.5.2(5.5.2)/Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)'
10. While deserializing 'SearchOverlayComponent' (ClassDecl @ 207049) in 'Version2022'
11. ...decl is named 'SearchOverlayComponent'
12. *** DESERIALIZATION FAILURE ***
module 'Version2022' with full misc version '5.5.2(5.5.2)/Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)'
top-level value not found
Cross-reference to module 'Version2022'
... SearchOverlayComponent

Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 swift-frontend 0x00000001084a39c4 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
1 swift-frontend 0x00000001084a2acc llvm::sys::RunSignalHandlers() + 128
2 swift-frontend 0x00000001084a4004 SignalHandler(int) + 292
3 libsystem_platform.dylib 0x00000001c67084e4 _sigtramp + 56
4 libsystem_pthread.dylib 0x00000001c66f0eb0 pthread_kill + 288
5 libsystem_c.dylib 0x00000001c662e314 abort + 164
6 swift-frontend 0x0000000104747fa8 swift::ModuleFileSharedCore::outputDiagnosticInfo(llvm::raw_ostream&) const + 0
7 swift-frontend 0x00000001046ed3a4 swift::ModuleFile::fatal(llvm::Error) const + 428
8 swift-frontend 0x00000001046ff328 swift::DeclDeserializer::getDeclCheckedImpl(llvm::function_ref<bool (swift::DeclAttributes)>) + 34444
9 swift-frontend 0x00000001046ee7a8 swift::ModuleFile::getDeclChecked(llvm::PointerEmbeddedInt<unsigned int, 31>, llvm::function_ref<bool (swift::DeclAttributes)>) + 380
10 swift-frontend 0x000000010473bec0 swift::ModuleFile::lookupValue(swift::DeclName, llvm::SmallVectorImpl<swift::ValueDecl*>&) + 1064
11 swift-frontend 0x0000000105277984 swift::ModuleDecl::lookupValue(swift::DeclName, swift::NLKind, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 264
12 swift-frontend 0x000000010529c1b8 (anonymous namespace)::ModuleNameLookup<(anonymous namespace)::LookupByName>::lookupInModule(llvm::SmallVectorImpl<swift::ValueDecl*>&, swift::DeclContext const*, swift::ImportPath::Access, swift::DeclContext const*, swift::NLOptions) + 400
13 swift-frontend 0x00000001052bd5ac swift::SimpleRequest<swift::LookupInModuleRequest, llvm::SmallVector<swift::ValueDecl*, 4u> (swift::DeclContext const*, swift::DeclName, swift::NLKind, swift::namelookup::ResolutionKind, swift::DeclContext const*, swift::NLOptions), (swift::RequestFlags)17>::evaluateRequest(swift::LookupInModuleRequest const&, swift::Evaluator&) + 148
14 swift-frontend 0x000000010529ce7c swift::LookupInModuleRequest::OutputType swift::evaluateOrDefault<swift::LookupInModuleRequest>(swift::Evaluator&, swift::LookupInModuleRequest, swift::LookupInModuleRequest::OutputType) + 476
15 swift-frontend 0x000000010529cc10 swift::namelookup::lookupInModule(swift::DeclContext const*, swift::DeclName, llvm::SmallVectorImpl<swift::ValueDecl*>&, swift::NLKind, swift::namelookup::ResolutionKind, swift::DeclContext const*, swift::NLOptions) + 140
16 swift-frontend 0x00000001052ae1a0 swift::ModuleQualifiedLookupRequest::evaluate(swift::Evaluator&, swift::DeclContext const*, swift::ModuleDecl*, swift::DeclNameRef, swift::NLOptions) const + 372
17 swift-frontend 0x00000001052bd5d0 swift::SimpleRequest<swift::ModuleQualifiedLookupRequest, llvm::SmallVector<swift::ValueDecl*, 4u> (swift::DeclContext const*, swift::ModuleDecl*, swift::DeclNameRef, swift::NLOptions), (swift::RequestFlags)17>::evaluateRequest(swift::ModuleQualifiedLookupRequest const&, swift::Evaluator&) + 24
18 swift-frontend 0x00000001052abfec swift::DeclContext::lookupQualified(swift::ModuleDecl*, swift::DeclNameRef, swift::NLOptions, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 564
19 swift-frontend 0x00000001046f2a10 swift::ModuleFile::resolveCrossReference(llvm::PointerEmbeddedInt<unsigned int, 31>, unsigned int) + 1268
20 swift-frontend 0x00000001046f84ec swift::DeclDeserializer::getDeclCheckedImpl(llvm::function_ref<bool (swift::DeclAttributes)>) + 6224
21 swift-frontend 0x00000001046ee7a8 swift::ModuleFile::getDeclChecked(llvm::PointerEmbeddedInt<unsigned int, 31>, llvm::function_ref<bool (swift::DeclAttributes)>) + 380
22 swift-frontend 0x00000001047081fc swift::TypeDeserializer::getTypeCheckedImpl() + 688
23 swift-frontend 0x00000001046f2460 swift::ModuleFile::getTypeChecked(llvm::PointerEmbeddedInt<unsigned int, 31>) + 272
24 swift-frontend 0x0000000104708f54 swift::TypeDeserializer::getTypeCheckedImpl() + 4104
25 swift-frontend 0x00000001046f2460 swift::ModuleFile::getTypeChecked(llvm::PointerEmbeddedInt<unsigned int, 31>) + 272
26 swift-frontend 0x00000001047095d8 swift::TypeDeserializer::getTypeCheckedImpl() + 5772
27 swift-frontend 0x00000001046f2460 swift::ModuleFile::getTypeChecked(llvm::PointerEmbeddedInt<unsigned int, 31>) + 272
28 swift-frontend 0x000000010472036c swift::SILDeserializer::readSILFunctionChecked(llvm::PointerEmbeddedInt<unsigned int, 31>, swift::SILFunction*, llvm::StringRef, bool, bool) + 712
29 swift-frontend 0x0000000104734198 swift::SILDeserializer::getAllSILFunctions() + 1260
30 swift-frontend 0x00000001047adc80 swift::SILDeserializer::getAll(bool) + 44
31 swift-frontend 0x00000001047e7444 swift::ASTLoweringRequest::evaluate(swift::Evaluator&, swift::ASTLoweringDescriptor) const + 6480
32 swift-frontend 0x00000001048a2294 swift::SimpleRequest<swift::ASTLoweringRequest, std::_1::unique_ptr<swift::SILModule, std::_1::default_delete<swift::SILModule> > (swift::ASTLoweringDescriptor), (swift::RequestFlags)9>::evaluateRequest(swift::ASTLoweringRequest const&, swift::Evaluator&) + 216
33 swift-frontend 0x00000001047ea45c llvm::Expected<swift::ASTLoweringRequest::OutputType> swift::Evaluator::getResultUncached<swift::ASTLoweringRequest>(swift::ASTLoweringRequest const&) + 612
34 swift-frontend 0x00000001047e7a4c swift::performASTLowering(swift::ModuleDecl*, swift::Lowering::TypeConverter&, swift::SILOptions const&) + 124
35 swift-frontend 0x0000000104215714 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 6936
36 swift-frontend 0x000000010416edf8 main + 932
37 dyld 0x000000010aa150f4 start + 520
error: Abort trap: 6 (in target 'Version2022' from project 'TheRulesX')

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant