[SR-13179] SourceKit crashes in ModuleFile::lookupClassMembers on SwiftPM file with incomplete code #55620
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Attachment: Download
Additional Detail from JIRA
md5: 8ad80d500b26604a1e962e437c9b79af
Issue Description:
Steps to reproduce:
Open the attached package in Xcode 12b1.
Build the "Suffusion" target.
Switch to the "mount_json" target.
Open Sources/mount_json/main.swift
Add a space to the end of line 28 (just after
takeUnretainedValue()
). Invoke code completion if nothing seems to be happening.This is almost certainly a compiler bug given the backtrace, but it doesn't happen in builds, probably because there's no actual call to
lookupClassMembers
there.4 com.apple.SourceKitService.1200.0.16.13_osx 0x000000010a77bdfc swift::ModuleFile::fatal(llvm::Error) + 23484 com.apple.SourceKitService.1200.0.16.13_osx 0x000000010a77bdfc swift::ModuleFile::fatal(llvm::Error) + 23485 com.apple.SourceKitService.1200.0.16.13_osx 0x000000010a7db480 swift::ModuleFile::lookupClassMembers(llvm::ArrayRef<swift::Located<swift::Identifier> >, swift::VisibleDeclConsumer&) + 16486 com.apple.SourceKitService.1200.0.16.13_osx 0x000000010ab8c5ad swift::ModuleDecl::lookupClassMembers(llvm::ArrayRef<swift::Located<swift::Identifier> >, swift::VisibleDeclConsumer&) const + 777 com.apple.SourceKitService.1200.0.16.13_osx 0x000000010a5e16e3 lookupVisibleMemberDeclsImpl(swift::Type, swift::VisibleDeclConsumer&, swift::DeclContext const*, (anonymous namespace)::LookupState, swift::DeclVisibilityKind, swift::GenericSignatureBuilder*, llvm::SmallPtrSet<swift::TypeDecl*, 8u>&) + 8838 com.apple.SourceKitService.1200.0.16.13_osx 0x000000010a5dfe51 lookupVisibleMemberAndDynamicMemberDecls(swift::Type, swift::VisibleDeclConsumer&, (anonymous namespace)::KeyPathDynamicMemberConsumer&, swift::DeclContext const*, (anonymous namespace)::LookupState, swift::DeclVisibilityKind, swift::GenericSignatureBuilder*, llvm::SmallPtrSet<swift::TypeDecl*, 8u>&, llvm::DenseSet<swift::TypeBase*, llvm::DenseMapInfo<swift::TypeBase*> >&) + 65
The text was updated successfully, but these errors were encountered: