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-8559] SourceKit: CursorInfo crash in swift::SynthesizedExtensionAnalyzer::Implementation::isApplicable #51077

Open
nathawes opened this issue Aug 17, 2018 · 1 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

Comments

@nathawes
Copy link
Collaborator

Previous ID SR-8559
Radar rdar://problem/41593893
Original Reporter @nathawes
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Source Tooling
Labels Bug, CompilerCrash
Assignee None
Priority Medium

md5: e515d3b8b41fa2b3fc1159c6e79de021

Issue Description:

Only seems to reproduce when split across files:

{code: title=$ cat /tmp/first.swift}
protocol ChatDataSourceDelegateProtocol {
func chatDataSourceDidUpdate()
}

class BaseChatViewController {
var foo = 1
func bar() {
print(self . /cursor-info->/foo)
}
}

{code: title=$ cat /tmp/second.swift}
extension BaseChatViewController: ChatDataSourceDelegateProtocol {
 func chatDataSourceDidUpdate() \{ fatalError() }
}

{code: title=$ sourcekitd-test -req=cursor -pos=8:35 /tmp/first.swift – /tmp/first.swift /tmp/second.swift}
{
key.request: source.request.cursorinfo,
key.compilerargs: [
"/tmp/first.swift",
"/tmp/second.swift"
],
key.offset: 180,
key.sourcefile: "/tmp/first.swift"
}
error response (Connection Interrupted): Connection interrupted
sourcekit: [1:connection-event-handler:4099: 0.0000] Connection interruptsourcekit: [1:updateSemanticEditorDelay:4099: 0.0019] disabling semantic editor for 10 secondssourcekit: [1:pingService:4099: 0.0019] pinging serviceerror response (Connection Interrupted): Connection interrupted

@rintaro
Copy link
Mannequin

rintaro mannequin commented Sep 26, 2018

#18754 fixed this crash. However,

import Foundation

func item(indexPath: IndexPath) {
   _ = indexPath.isEmpty
                 ^ cursor-info
}

crashes in similar position (deserialization failure). rdar://problem/43380354

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added crash Bug: A crash, i.e., an abnormal termination of software compiler The Swift compiler in itself labels 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

2 participants