Skip to content

[SIL] Add test case for crash triggered in swift::GenericParamList::getAsGenericSignatureElements(…) #666

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::GenericParamList::getAsGenericSignatureElements(…) #666

merged 1 commit into from
Dec 20, 2015

Conversation

practicalswift
Copy link
Contributor

Stack trace:

<stdin>:3:29: error: expected type
sil@__:$<__ where τ:k>()->(
<stdin>:3:29: error: expected ',' separator
sil@__:$<__ where τ:k>()->(
<stdin>:3:19: error: use of undeclared type 'τ'
sil@__:$<__ where τ:k>()->(
sil-opt: /path/to/llvm/include/llvm/ADT/ArrayRef.h:172: ArrayRef<T> llvm::ArrayRef<swift::ArchetypeType *>::slice(unsigned int, unsigned int) const [T = swift::ArchetypeType *]: Assertion `N+M <= size() && "Invalid specifier"' failed.
8  sil-opt         0x0000000000d20b65 swift::GenericParamList::getAsGenericSignatureElements(swift::ASTContext&, llvm::DenseMap<swift::ArchetypeType*, swift::Type, llvm::DenseMapInfo<swift::ArchetypeType*>, llvm::detail::DenseMapPair<swift::ArchetypeType*, swift::Type> >&, llvm::SmallVectorImpl<swift::GenericTypeParamType*>&, llvm::SmallVectorImpl<swift::Requirement>&) const + 2693
9  sil-opt         0x0000000000d1ff3c swift::GenericParamList::getAsCanonicalGenericSignature(llvm::DenseMap<swift::ArchetypeType*, swift::Type, llvm::DenseMapInfo<swift::ArchetypeType*>, llvm::detail::DenseMapPair<swift::ArchetypeType*, swift::Type> >&, swift::ASTContext&) const + 92
13 sil-opt         0x0000000000ae6c04 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 212
14 sil-opt         0x0000000000a66c5f swift::performTypeLocChecking(swift::ASTContext&, swift::TypeLoc&, bool, swift::DeclContext*, bool) + 1007
16 sil-opt         0x0000000000a23163 swift::Parser::parseDeclSIL() + 627
17 sil-opt         0x00000000009f5b2a swift::Parser::parseTopLevel() + 378
18 sil-opt         0x00000000009f0fcf swift::parseIntoSourceFile(swift::SourceFile&, unsigned int, bool*, swift::SILParserState*, swift::PersistentParserState*, swift::DelayedParsingCallbacks*) + 207
19 sil-opt         0x00000000007392a6 swift::CompilerInstance::performSema() + 2918
20 sil-opt         0x0000000000723efc main + 1916
Stack dump:
0.  Program arguments: sil-opt -enable-sil-verify-all
1.  With parser at source location: <stdin>:3:29
2.  While resolving type @convention(thin) () -> ()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.

…etAsGenericSignatureElements(swift::ASTContext&, llvm::DenseMap<swift::ArchetypeType*, swift::Type, llvm::DenseMapInfo<swift::ArchetypeType*>, llvm::detail::DenseMapPair<swift::ArchetypeType*, swift::Type> >&, llvm::SmallVectorImpl<swift::GenericTypeParamType*>&, llvm::SmallVectorImpl<swift::Requirement>&) const

Stack trace:

```
<stdin>:3:29: error: expected type
sil@__:$<__ where τ:k>()->(
<stdin>:3:29: error: expected ',' separator
sil@__:$<__ where τ:k>()->(
<stdin>:3:19: error: use of undeclared type 'τ'
sil@__:$<__ where τ:k>()->(
sil-opt: /path/to/llvm/include/llvm/ADT/ArrayRef.h:172: ArrayRef<T> llvm::ArrayRef<swift::ArchetypeType *>::slice(unsigned int, unsigned int) const [T = swift::ArchetypeType *]: Assertion `N+M <= size() && "Invalid specifier"' failed.
8  sil-opt         0x0000000000d20b65 swift::GenericParamList::getAsGenericSignatureElements(swift::ASTContext&, llvm::DenseMap<swift::ArchetypeType*, swift::Type, llvm::DenseMapInfo<swift::ArchetypeType*>, llvm::detail::DenseMapPair<swift::ArchetypeType*, swift::Type> >&, llvm::SmallVectorImpl<swift::GenericTypeParamType*>&, llvm::SmallVectorImpl<swift::Requirement>&) const + 2693
9  sil-opt         0x0000000000d1ff3c swift::GenericParamList::getAsCanonicalGenericSignature(llvm::DenseMap<swift::ArchetypeType*, swift::Type, llvm::DenseMapInfo<swift::ArchetypeType*>, llvm::detail::DenseMapPair<swift::ArchetypeType*, swift::Type> >&, swift::ASTContext&) const + 92
13 sil-opt         0x0000000000ae6c04 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 212
14 sil-opt         0x0000000000a66c5f swift::performTypeLocChecking(swift::ASTContext&, swift::TypeLoc&, bool, swift::DeclContext*, bool) + 1007
16 sil-opt         0x0000000000a23163 swift::Parser::parseDeclSIL() + 627
17 sil-opt         0x00000000009f5b2a swift::Parser::parseTopLevel() + 378
18 sil-opt         0x00000000009f0fcf swift::parseIntoSourceFile(swift::SourceFile&, unsigned int, bool*, swift::SILParserState*, swift::PersistentParserState*, swift::DelayedParsingCallbacks*) + 207
19 sil-opt         0x00000000007392a6 swift::CompilerInstance::performSema() + 2918
20 sil-opt         0x0000000000723efc main + 1916
Stack dump:
0.	Program arguments: sil-opt -enable-sil-verify-all
1.	With parser at source location: <stdin>:3:29
2.	While resolving type @convention(thin) () -> ()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
…mlist-getasgenericsignatureelements

[SIL] Add test case for crash triggered in swift::GenericParamList::getAsGenericSignatureElements(…)
@gribozavr gribozavr merged commit 054874e into swiftlang:master Dec 20, 2015
freak4pc pushed a commit to freak4pc/swift that referenced this pull request Sep 28, 2022
[Stress tester XFails] Update XFails
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