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-12993] SourceKit: Assertion failed: (Next.Range.getStart() == D->getRange().Start && "Attribute's TokenNodes already consumed?") #55438

Closed
nathawes opened this issue Jun 12, 2020 · 2 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. found by stress tester Flag: An issue found by the SourceKit stress tester

Comments

@nathawes
Copy link
Collaborator

Previous ID SR-12993
Radar rdar://problem/64304839
Original Reporter @nathawes
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Source Tooling
Labels Bug, FoundByStressTester
Assignee @ahoppen
Priority Medium

md5: 030ee48845355929760cb2015bae8356

Issue Description:

Reproducer:

@available(macOS 10.12
@available(macOS 10.12
func foo() {} 

Trace:

Thread 4 Crashed:: Dispatch queue: com.apple.root.default-qosThread 4 Crashed:: Dispatch queue: com.apple.root.default-qos0   libsystem_kernel.dylib         0x00007fff6b42d33a __pthread_kill + 101   libsystem_pthread.dylib        0x00007fff6b4e9e60 pthread_kill + 4302   libsystem_c.dylib              0x00007fff6b3b48a2 __abort + 1393   libsystem_c.dylib              0x00007fff6b3b4817 abort + 1354   libsystem_c.dylib              0x00007fff6b3b3ac6 __assert_rtn + 3145   com.apple.SourceKitService.5.0.20200610101_osx 0x00000001069327b3 (anonymous namespace)::ModelASTWalker::handleSpecialDeclAttribute(swift::DeclAttribute const*, llvm::ArrayRef<swift::Token>) (.cold.2) + 356   com.apple.SourceKitService.5.0.20200610101_osx 0x00000001038d4416 (anonymous namespace)::ModelASTWalker::handleSpecialDeclAttribute(swift::DeclAttribute const*, llvm::ArrayRef<swift::Token>) + 2307   com.apple.SourceKitService.5.0.20200610101_osx 0x00000001038d40e1 (anonymous namespace)::ModelASTWalker::handleAttrRanges(llvm::ArrayRef<std::__1::pair<swift::DeclAttribute const*, swift::SourceRange> >) + 6258   com.apple.SourceKitService.5.0.20200610101_osx 0x00000001038c6c1b (anonymous namespace)::ModelASTWalker::handleAttrs(swift::DeclAttributes const&) + 2839   com.apple.SourceKitService.5.0.20200610101_osx 0x00000001038c4223 (anonymous namespace)::ModelASTWalker::walkToDeclPre(swift::Decl*) + 19510  com.apple.SourceKitService.5.0.20200610101_osx 0x0000000104700b4a (anonymous namespace)::Traversal::doIt(swift::Decl*) + 17011  com.apple.SourceKitService.5.0.20200610101_osx 0x0000000104700a8b swift::Decl::walk(swift::ASTWalker&) + 2712  com.apple.SourceKitService.5.0.20200610101_osx 0x000000010482dd78 swift::SourceFile::walk(swift::ASTWalker&) + 21613  com.apple.SourceKitService.5.0.20200610101_osx 0x00000001038c22bd swift::ide::SyntaxModelContext::walk(swift::ide::SyntaxModelWalker&) + 31714  com.apple.SourceKitService.5.0.20200610101_osx 0x000000010376a0fd SourceKit::SwiftEditorDocument::readSyntaxInfo(SourceKit::EditorConsumer&) + 116515  com.apple.SourceKitService.5.0.20200610101_osx 0x000000010376eacc SourceKit::SwiftLangSupport::editorReplaceText(llvm::StringRef, llvm::MemoryBuffer*, unsigned int, unsigned int, SourceKit::EditorConsumer&) + 113216  com.apple.SourceKitService.5.0.20200610101_osx 0x00000001037add22 handleRequestImpl(void*, std::__1::function<void (void*)>) + 1445017  com.apple.SourceKitService.5.0.20200610101_osx 0x00000001037aa463 sourcekitd::handleRequest(void*, std::__1::function<void (void*)>) + 27518  com.apple.SourceKitService.5.0.20200610101_osx 0x0000000103666898 invocation function for block in sourcekitdServer_peer_event_handler(_xpc_connection_s*, void*) + 21619  libdispatch.dylib              0x00007fff6b28b6c4 _dispatch_call_block_and_release + 1220  libdispatch.dylib              0x00007fff6b28c658 _dispatch_client_callout + 821  libdispatch.dylib              0x00007fff6b28e4b0 _dispatch_queue_override_invoke + 76322  libdispatch.dylib              0x00007fff6b29a957 _dispatch_root_queue_drain + 32623  libdispatch.dylib              0x00007fff6b29b097 _dispatch_worker_thread2 + 9224  libsystem_pthread.dylib        0x00007fff6b4e69f7 _pthread_wqthread + 22025  libsystem_pthread.dylib        0x00007fff6b4e5b77 start_wqthread + 15 
@nathawes
Copy link
Collaborator Author

@swift-ci create

@ahoppen
Copy link
Contributor

ahoppen commented Mar 18, 2021

Fixed in #36491.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 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. found by stress tester Flag: An issue found by the SourceKit stress tester
Projects
None yet
Development

No branches or pull requests

2 participants