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-12994] Indexing: Assertion failed: (false && "Malformed curry thunk?"), function getUnwrappedCurryThunkExpr #55439

Closed
nathawes opened this issue Jun 12, 2020 · 6 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-12994
Radar rdar://problem/64306636
Original Reporter @nathawes
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Source Tooling
Labels Bug, FoundByStressTester
Assignee @theblixguy
Priority Medium

md5: 82c204fe97816f55a583234bf8086b65

is duplicated by:

Issue Description:

Reproducer:

protocol MyProto {
  func compile() throws
}


func compile(x: MyProto) throws {
  try x.compile
} 

Trace:

Assertion failed: (false && "Malformed curry thunk?"), function getUnwrappedCurryThunkExpr, file /Users/buildnode/jenkins/workspace/oss-swift-package-osx/swift/lib/AST/Expr.cpp, line 2049.
 

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib          0x00007fff6b42d33a __pthread_kill + 10
1   libsystem_pthread.dylib         0x00007fff6b4e9e60 pthread_kill + 430
2   libsystem_c.dylib               0x00007fff6b3b48a2 __abort + 139
3   libsystem_c.dylib               0x00007fff6b3b4817 abort + 135
4   libsystem_c.dylib               0x00007fff6b3b3ac6 __assert_rtn + 314
5   swift                           0x0000000106774ac3 swift::AutoClosureExpr::getUnwrappedCurryThunkExpr() const (.cold.4) + 35
6   swift                           0x0000000103142429 swift::AutoClosureExpr::getUnwrappedCurryThunkExpr() const + 329
7   swift                           0x000000010221697e (anonymous namespace)::SemaAnnotator::walkToExprPre(swift::Expr*) + 206
8   swift                           0x000000010306abe7 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Expr*) + 71
9   swift                           0x000000010306aca3 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Expr*) + 259
10  swift                           0x000000010306cf7b swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Stmt*) + 219
11  swift                           0x00000001030700b8 (anonymous namespace)::Traversal::visitAbstractFunctionDecl(swift::AbstractFunctionDecl*) + 584
12  swift                           0x000000010306ab57 (anonymous namespace)::Traversal::doIt(swift::Decl*) + 215
13  swift                           0x000000010306aa6b swift::Decl::walk(swift::ASTWalker&) + 27
14  swift                           0x00000001031a4268 swift::SourceFile::walk(swift::ASTWalker&) + 216
15  swift                           0x0000000102215e6f swift::SourceEntityWalker::walk(swift::SourceFile&) + 255
16  swift                           0x000000010221e766 (anonymous namespace)::IndexSwiftASTWalker::visitModule(swift::ModuleDecl&) + 230
17  swift                           0x000000010221e64c swift::index::indexSourceFile(swift::SourceFile*, swift::index::IndexDataConsumer&) + 428
18  swift                           0x00000001022248f1 recordSourceFileUnit(swift::SourceFile*, llvm::StringRef, llvm::StringRef, bool, bool, bool, llvm::StringRef, llvm::ArrayRef<clang::FileEntry const*>, clang::CompilerInstance const&, swift::DiagnosticEngine&) + 1617
19  swift                           0x0000000102224236 swift::index::indexAndRecord(swift::SourceFile*, llvm::StringRef, llvm::StringRef, bool, bool, bool, llvm::StringRef, swift::DependencyTracker const&) + 230
20  swift                           0x0000000102100c4c emitIndexDataForSourceFile(swift::SourceFile*, swift::CompilerInstance const&) + 332
21  swift                           0x0000000102100abc performEndOfPipelineActions(swift::CompilerInstance&) + 524
22  swift                           0x00000001020f3351 performCompile(swift::CompilerInstance&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*) + 7761
23  swift                           0x00000001020f0519 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 3529
24  swift                           0x000000010208cccd main + 861
25  libdyld.dylib                   0x00007fff6b2e5cc9 start + 1
@nathawes
Copy link
Collaborator Author

@swift-ci create

@theblixguy
Copy link
Collaborator

#32458

@theblixguy
Copy link
Collaborator

Fixed on master. @nathawes Please verify using the next available snapshot!

@tachyonics
Copy link

Any idea when this will merged into a Swift release? Looks like I have run into the same or a similar issue in Swift 5.3. Testing with the current nightly on master is fine.

@theblixguy
Copy link
Collaborator

Sorry, I don’t know. Since the fix was merged into master, you’ll have to wait until the next available Swift version (5.4 I believe).

@MaxDesiatov
Copy link
Member

I've cherry-picked this for 5.3 in #34131

@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

4 participants