Skip to content

[SourceKit 🎄] Add test case for crash triggered in swift::ConstructorDecl::getResultType() #771

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

Merged
merged 1 commit into from
Dec 25, 2015
Merged

[SourceKit 🎄] Add test case for crash triggered in swift::ConstructorDecl::getResultType() #771

merged 1 commit into from
Dec 25, 2015

Conversation

practicalswift
Copy link
Contributor

My Swift fuzzer brought a Christmas gift in the form of a newly discovered SourceKit crash case! Appy holidays all Swift contributors! 🎄

Stack trace:

found code completion token A at offset 127
swift-ide-test: /path/to/llvm/include/llvm/Support/Casting.h:237: typename cast_retty<X, Y *>::ret_type llvm::cast(Y *) [X = swift::AnyFunctionType, Y = swift::TypeBase]: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
8  swift-ide-test  0x0000000000b40991 swift::ConstructorDecl::getResultType() const + 129
19 swift-ide-test  0x0000000000adfdf4 swift::Decl::walk(swift::ASTWalker&) + 20
20 swift-ide-test  0x0000000000b69ade swift::SourceFile::walk(swift::ASTWalker&) + 174
21 swift-ide-test  0x0000000000b68d0f swift::ModuleDecl::walk(swift::ASTWalker&) + 79
22 swift-ide-test  0x0000000000b42e12 swift::DeclContext::walkContext(swift::ASTWalker&) + 146
23 swift-ide-test  0x000000000085c23a swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 138
24 swift-ide-test  0x000000000076b344 swift::CompilerInstance::performSema() + 3316
25 swift-ide-test  0x0000000000714ad7 main + 33239
Stack dump:
0.  Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1.  While walking into decl declaration 0x448df20 at <INPUT-FILE>:2:14

…cl::getResultType() const

Stack trace:

```
found code completion token A at offset 127
swift-ide-test: /path/to/llvm/include/llvm/Support/Casting.h:237: typename cast_retty<X, Y *>::ret_type llvm::cast(Y *) [X = swift::AnyFunctionType, Y = swift::TypeBase]: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
8  swift-ide-test  0x0000000000b40991 swift::ConstructorDecl::getResultType() const + 129
19 swift-ide-test  0x0000000000adfdf4 swift::Decl::walk(swift::ASTWalker&) + 20
20 swift-ide-test  0x0000000000b69ade swift::SourceFile::walk(swift::ASTWalker&) + 174
21 swift-ide-test  0x0000000000b68d0f swift::ModuleDecl::walk(swift::ASTWalker&) + 79
22 swift-ide-test  0x0000000000b42e12 swift::DeclContext::walkContext(swift::ASTWalker&) + 146
23 swift-ide-test  0x000000000085c23a swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 138
24 swift-ide-test  0x000000000076b344 swift::CompilerInstance::performSema() + 3316
25 swift-ide-test  0x0000000000714ad7 main + 33239
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1.	While walking into decl declaration 0x448df20 at <INPUT-FILE>:2:14
```
gribozavr added a commit that referenced this pull request Dec 25, 2015
…ructordecl-getresulttype

[SourceKit 🎄] Add test case for crash triggered in swift::ConstructorDecl::getResultType()
@gribozavr gribozavr merged commit 62d8dde into swiftlang:master Dec 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants