Skip to content

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

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

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

merged 1 commit into from
Dec 20, 2015

Conversation

practicalswift
Copy link
Contributor

Stack trace:

<stdin>:2:22: error: expected ',' separator
sil@s:$()->(@owned T c:t
                     ^
                    ,
<stdin>:2:25: error: expected ',' separator
sil@s:$()->(@owned T c:t
                        ^
                        ,
<stdin>:2:25: error: expected type
sil@s:$()->(@owned T c:t
                        ^
<stdin>:2:25: error: expected ',' separator
sil@s:$()->(@owned T c:t
                        ^
                        ,
<stdin>:2:20: error: use of undeclared type 'T'
sil@s:$()->(@owned T c:t
                   ^
NamedTypeRepr only shows up as an element of Tuple
UNREACHABLE executed at /path/to/swift/lib/Sema/TypeCheckType.cpp:1400!
6  sil-opt         0x0000000002c0db6d llvm::llvm_unreachable_internal(char const*, char const*, unsigned int) + 461
12 sil-opt         0x0000000000ae6ad4 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 212
13 sil-opt         0x0000000000a66c0f swift::performTypeLocChecking(swift::ASTContext&, swift::TypeLoc&, bool, swift::DeclContext*, bool) + 1007
15 sil-opt         0x0000000000a23113 swift::Parser::parseDeclSIL() + 627
16 sil-opt         0x00000000009f5ada swift::Parser::parseTopLevel() + 378
17 sil-opt         0x00000000009f0f7f swift::parseIntoSourceFile(swift::SourceFile&, unsigned int, bool*, swift::SILParserState*, swift::PersistentParserState*, swift::DelayedParsingCallbacks*) + 207
18 sil-opt         0x00000000007392a6 swift::CompilerInstance::performSema() + 2918
19 sil-opt         0x0000000000723efc main + 1916
Stack dump:
0.  Program arguments: sil-opt -enable-sil-verify-all
1.  With parser at source location: <stdin>:2:25
2.  While resolving type @convention(thin) () -> ( T, c: t)sil-opt: /path/to/swift/include/swift/Basic/SourceLoc.h:93: swift::SourceRange::SourceRange(swift::SourceLoc, swift::SourceLoc): Assertion `Start.isValid() == End.isValid() && "Start and end should either both be valid or both be invalid!"' failed.

…ernal(char const*, char const*, unsigned int)

Stack trace:

```
<stdin>:2:22: error: expected ',' separator
sil@s:$()->(@owned T c:t
                     ^
                    ,
<stdin>:2:25: error: expected ',' separator
sil@s:$()->(@owned T c:t
                        ^
                        ,
<stdin>:2:25: error: expected type
sil@s:$()->(@owned T c:t
                        ^
<stdin>:2:25: error: expected ',' separator
sil@s:$()->(@owned T c:t
                        ^
                        ,
<stdin>:2:20: error: use of undeclared type 'T'
sil@s:$()->(@owned T c:t
                   ^
NamedTypeRepr only shows up as an element of Tuple
UNREACHABLE executed at /path/to/swift/lib/Sema/TypeCheckType.cpp:1400!
6  sil-opt         0x0000000002c0db6d llvm::llvm_unreachable_internal(char const*, char const*, unsigned int) + 461
12 sil-opt         0x0000000000ae6ad4 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 212
13 sil-opt         0x0000000000a66c0f swift::performTypeLocChecking(swift::ASTContext&, swift::TypeLoc&, bool, swift::DeclContext*, bool) + 1007
15 sil-opt         0x0000000000a23113 swift::Parser::parseDeclSIL() + 627
16 sil-opt         0x00000000009f5ada swift::Parser::parseTopLevel() + 378
17 sil-opt         0x00000000009f0f7f swift::parseIntoSourceFile(swift::SourceFile&, unsigned int, bool*, swift::SILParserState*, swift::PersistentParserState*, swift::DelayedParsingCallbacks*) + 207
18 sil-opt         0x00000000007392a6 swift::CompilerInstance::performSema() + 2918
19 sil-opt         0x0000000000723efc main + 1916
Stack dump:
0.	Program arguments: sil-opt -enable-sil-verify-all
1.	With parser at source location: <stdin>:2:25
2.	While resolving type @convention(thin) () -> ( T, c: t)sil-opt: /path/to/swift/include/swift/Basic/SourceLoc.h:93: swift::SourceRange::SourceRange(swift::SourceLoc, swift::SourceLoc): Assertion `Start.isValid() == End.isValid() && "Start and end should either both be valid or both be invalid!"' failed.
```
gribozavr added a commit that referenced this pull request Dec 20, 2015
…-validatetype

[SIL] Add test case for crash triggered in llvm::llvm_unreachable_internal(…)
@gribozavr gribozavr merged commit a2f7d01 into swiftlang:master Dec 20, 2015
@practicalswift
Copy link
Contributor Author

@gribozavr Wow thanks for ultra quick merge! :-)

@practicalswift practicalswift changed the title [SIL] Add test case for crash triggered in llvm::llvm_unreachable_internal(…) [SIL] Add test case for crash triggered in swift::TypeChecker::validateType(…) Dec 20, 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