Skip to content

[SIL] Add test case for crash triggered in swift::TypeChecker::typeCheckFunctionBodyUntil(…) #703

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 21, 2015
Merged

[SIL] Add test case for crash triggered in swift::TypeChecker::typeCheckFunctionBodyUntil(…) #703

merged 1 commit into from
Dec 21, 2015

Conversation

practicalswift
Copy link
Contributor

Stack trace:

<stdin>:2:7: error: expected '(' in argument list of function declaration
func n->a{return:}class a
      ^
<stdin>:2:17: error: expected expression in 'return' statement
func n->a{return:}class a
                ^
<stdin>:2:19: error: consecutive statements on a line must be separated by ';'
func n->a{return:}class a
                  ^
                  ;
<stdin>:2:26: error: expected '{' in class
func n->a{return:}class a
                         ^
sil-opt: /path/to/llvm/include/llvm/Support/Casting.h:95: static bool llvm::isa_impl_cl<swift::ProtocolDecl, const swift::NominalTypeDecl *>::doit(const From *) [To = swift::ProtocolDecl, From = const swift::NominalTypeDecl *]: Assertion `Val && "isa<> used on a null pointer"' failed.
11 sil-opt         0x0000000000ae0d3b swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 379
12 sil-opt         0x0000000000ae0b7e swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46
13 sil-opt         0x0000000000ae17a8 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 136
15 sil-opt         0x0000000000a6620b swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1771
16 sil-opt         0x00000000007391c2 swift::CompilerInstance::performSema() + 2946
17 sil-opt         0x0000000000723dfc main + 1916
Stack dump:
0.  Program arguments: sil-opt -enable-sil-verify-all
1.  While type-checking 'n' at <stdin>:2:1

…eckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc)

Stack trace:

```
<stdin>:2:7: error: expected '(' in argument list of function declaration
func n->a{return:}class a
      ^
<stdin>:2:17: error: expected expression in 'return' statement
func n->a{return:}class a
                ^
<stdin>:2:19: error: consecutive statements on a line must be separated by ';'
func n->a{return:}class a
                  ^
                  ;
<stdin>:2:26: error: expected '{' in class
func n->a{return:}class a
                         ^
sil-opt: /path/to/llvm/include/llvm/Support/Casting.h:95: static bool llvm::isa_impl_cl<swift::ProtocolDecl, const swift::NominalTypeDecl *>::doit(const From *) [To = swift::ProtocolDecl, From = const swift::NominalTypeDecl *]: Assertion `Val && "isa<> used on a null pointer"' failed.
11 sil-opt         0x0000000000ae0d3b swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 379
12 sil-opt         0x0000000000ae0b7e swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46
13 sil-opt         0x0000000000ae17a8 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 136
15 sil-opt         0x0000000000a6620b swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1771
16 sil-opt         0x00000000007391c2 swift::CompilerInstance::performSema() + 2946
17 sil-opt         0x0000000000723dfc main + 1916
Stack dump:
0.	Program arguments: sil-opt -enable-sil-verify-all
1.	While type-checking 'n' at <stdin>:2:1
```
gribozavr added a commit that referenced this pull request Dec 21, 2015
…-typecheckfunctionbodyuntil

[SIL] Add test case for crash triggered in swift::TypeChecker::typeCheckFunctionBodyUntil(…)
@gribozavr gribozavr merged commit edfbf40 into swiftlang:master Dec 21, 2015
freak4pc pushed a commit to freak4pc/swift that referenced this pull request Sep 28, 2022
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