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-13179] SourceKit crashes in ModuleFile::lookupClassMembers on SwiftPM file with incomplete code #55620

Open
belkadan opened this issue Jul 8, 2020 · 0 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@belkadan
Copy link
Contributor

belkadan commented Jul 8, 2020

Previous ID SR-13179
Radar None
Original Reporter @belkadan
Type Bug

Attachment: Download

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

md5: 8ad80d500b26604a1e962e437c9b79af

Issue Description:

Steps to reproduce:

  1. Open the attached package in Xcode 12b1.

  2. Build the "Suffusion" target.

  3. Switch to the "mount_json" target.

  4. Open Sources/mount_json/main.swift

  5. 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

@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
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Projects
None yet
Development

No branches or pull requests

1 participant