Skip to content

[swiftc] Add test case for crash triggered in swift::TypeChecker::resolveTypeWitness(…) #1489

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
Feb 29, 2016
Merged

[swiftc] Add test case for crash triggered in swift::TypeChecker::resolveTypeWitness(…) #1489

merged 1 commit into from
Feb 29, 2016

Conversation

practicalswift
Copy link
Contributor

What's in this pull request?

A new crash case.

Stack trace:

5  swift           0x0000000000e41101 swift::TypeChecker::resolveTypeWitness(swift::NormalProtocolConformance const*, swift::AssociatedTypeDecl*) + 225
6  swift           0x00000000010341a6 swift::NormalProtocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 150
7  swift           0x00000000010340e8 swift::ProtocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 40
8  swift           0x00000000010348e6 swift::ProtocolConformance::getTypeWitness(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 6
11 swift           0x0000000000f1f058 swift::ArchetypeBuilder::addSuperclassRequirement(swift::ArchetypeBuilder::PotentialArchetype*, swift::Type, swift::RequirementSource) + 248
14 swift           0x0000000000f20d4f swift::ArchetypeBuilder::visitInherited(llvm::ArrayRef<swift::TypeLoc>, llvm::function_ref<bool (swift::Type, swift::SourceLoc)>) + 175
15 swift           0x0000000000f1eb4a swift::ArchetypeBuilder::addAbstractTypeParamRequirements(swift::AbstractTypeParamDecl*, swift::ArchetypeBuilder::PotentialArchetype*, swift::RequirementSource::Kind, llvm::SmallPtrSetImpl<swift::ProtocolDecl*>&) + 426
16 swift           0x0000000000f1eed7 swift::ArchetypeBuilder::addConformanceRequirement(swift::ArchetypeBuilder::PotentialArchetype*, swift::ProtocolDecl*, swift::RequirementSource, llvm::SmallPtrSetImpl<swift::ProtocolDecl*>&) + 471
19 swift           0x0000000000f20d4f swift::ArchetypeBuilder::visitInherited(llvm::ArrayRef<swift::TypeLoc>, llvm::function_ref<bool (swift::Type, swift::SourceLoc)>) + 175
20 swift           0x0000000000f1eb4a swift::ArchetypeBuilder::addAbstractTypeParamRequirements(swift::AbstractTypeParamDecl*, swift::ArchetypeBuilder::PotentialArchetype*, swift::RequirementSource::Kind, llvm::SmallPtrSetImpl<swift::ProtocolDecl*>&) + 426
21 swift           0x0000000000f1e97c swift::ArchetypeBuilder::addGenericParameterRequirements(swift::GenericTypeParamDecl*) + 172
22 swift           0x0000000000e34427 swift::TypeChecker::checkGenericParamList(swift::ArchetypeBuilder*, swift::GenericParamList*, swift::GenericSignature*, bool, swift::GenericTypeResolver*) + 375
23 swift           0x0000000000e35b37 swift::TypeChecker::validateGenericSignature(swift::GenericParamList*, swift::DeclContext*, swift::GenericSignature*, std::function<bool (swift::ArchetypeBuilder&)>, bool&) + 135
24 swift           0x0000000000e35ee4 swift::TypeChecker::validateGenericTypeSignature(swift::NominalTypeDecl*) + 116
25 swift           0x0000000000df9bd4 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 1300
28 swift           0x0000000000dff206 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
29 swift           0x0000000000e22092 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1026
30 swift           0x0000000000c97b9f swift::CompilerInstance::performSema() + 3167
32 swift           0x000000000077705b frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2523
33 swift           0x0000000000771b25 main + 2773
Stack dump:
0.  Program arguments: /usr/local/bin/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28257-swift-typechecker-resolvetypewitness.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28257-swift-typechecker-resolvetypewitness-eec025.o
1.  While type-checking 'A' at validation-test/compiler_crashers/28257-swift-typechecker-resolvetypewitness.swift:7:1
<unknown>:0: error: unable to execute command: Segmentation fault
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)

Resolved bug number: –


Before merging this pull request to apple/swift repository:

  • Test pull request on Swift continuous integration.

Triggering Swift CI

The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:

Smoke Testing

Platform Comment
All supported platforms @swift-ci Please smoke test
OS X platform @swift-ci Please smoke test OS X platform
Linux platform @swift-ci Please smoke test Linux platform

Validation Testing

Platform Comment
All supported platforms @swift-ci Please test
OS X platform @swift-ci Please test OS X platform
Linux platform @swift-ci Please test Linux platform

Note: Only members of the Apple organization can trigger swift-ci.

…olveTypeWitness(swift::NormalProtocolConformance const*, swift::AssociatedTypeDecl*)

Stack trace:

```
5  swift           0x0000000000e41101 swift::TypeChecker::resolveTypeWitness(swift::NormalProtocolConformance const*, swift::AssociatedTypeDecl*) + 225
6  swift           0x00000000010341a6 swift::NormalProtocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 150
7  swift           0x00000000010340e8 swift::ProtocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 40
8  swift           0x00000000010348e6 swift::ProtocolConformance::getTypeWitness(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 6
11 swift           0x0000000000f1f058 swift::ArchetypeBuilder::addSuperclassRequirement(swift::ArchetypeBuilder::PotentialArchetype*, swift::Type, swift::RequirementSource) + 248
14 swift           0x0000000000f20d4f swift::ArchetypeBuilder::visitInherited(llvm::ArrayRef<swift::TypeLoc>, llvm::function_ref<bool (swift::Type, swift::SourceLoc)>) + 175
15 swift           0x0000000000f1eb4a swift::ArchetypeBuilder::addAbstractTypeParamRequirements(swift::AbstractTypeParamDecl*, swift::ArchetypeBuilder::PotentialArchetype*, swift::RequirementSource::Kind, llvm::SmallPtrSetImpl<swift::ProtocolDecl*>&) + 426
16 swift           0x0000000000f1eed7 swift::ArchetypeBuilder::addConformanceRequirement(swift::ArchetypeBuilder::PotentialArchetype*, swift::ProtocolDecl*, swift::RequirementSource, llvm::SmallPtrSetImpl<swift::ProtocolDecl*>&) + 471
19 swift           0x0000000000f20d4f swift::ArchetypeBuilder::visitInherited(llvm::ArrayRef<swift::TypeLoc>, llvm::function_ref<bool (swift::Type, swift::SourceLoc)>) + 175
20 swift           0x0000000000f1eb4a swift::ArchetypeBuilder::addAbstractTypeParamRequirements(swift::AbstractTypeParamDecl*, swift::ArchetypeBuilder::PotentialArchetype*, swift::RequirementSource::Kind, llvm::SmallPtrSetImpl<swift::ProtocolDecl*>&) + 426
21 swift           0x0000000000f1e97c swift::ArchetypeBuilder::addGenericParameterRequirements(swift::GenericTypeParamDecl*) + 172
22 swift           0x0000000000e34427 swift::TypeChecker::checkGenericParamList(swift::ArchetypeBuilder*, swift::GenericParamList*, swift::GenericSignature*, bool, swift::GenericTypeResolver*) + 375
23 swift           0x0000000000e35b37 swift::TypeChecker::validateGenericSignature(swift::GenericParamList*, swift::DeclContext*, swift::GenericSignature*, std::function<bool (swift::ArchetypeBuilder&)>, bool&) + 135
24 swift           0x0000000000e35ee4 swift::TypeChecker::validateGenericTypeSignature(swift::NominalTypeDecl*) + 116
25 swift           0x0000000000df9bd4 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 1300
28 swift           0x0000000000dff206 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
29 swift           0x0000000000e22092 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1026
30 swift           0x0000000000c97b9f swift::CompilerInstance::performSema() + 3167
32 swift           0x000000000077705b frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2523
33 swift           0x0000000000771b25 main + 2773
Stack dump:
0.	Program arguments: /usr/local/bin/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28257-swift-typechecker-resolvetypewitness.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28257-swift-typechecker-resolvetypewitness-eec025.o
1.	While type-checking 'A' at validation-test/compiler_crashers/28257-swift-typechecker-resolvetypewitness.swift:7:1
<unknown>:0: error: unable to execute command: Segmentation fault
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
gribozavr added a commit that referenced this pull request Feb 29, 2016
…hecker-resolvetypewitness

[swiftc] Add test case for crash triggered in swift::TypeChecker::resolveTypeWitness(…)
@gribozavr gribozavr merged commit 6ee3802 into swiftlang:master Feb 29, 2016
@gottesmm
Copy link
Contributor

I have noticed that we have been having less and less of these lately... I guess I need to go create some more "treasures" for you to find ; ).

Michael

On Feb 29, 2016, at 2:50 PM, practicalswift [email protected] wrote:

What's in this pull request?

A new crash case.

Stack trace:

5 swift 0x0000000000e41101 swift::TypeChecker::resolveTypeWitness(swift::NormalProtocolConformance const_, swift::AssociatedTypeDecl_) + 225
6 swift 0x00000000010341a6 swift::NormalProtocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl_, swift::LazyResolver_) const + 150
7 swift 0x00000000010340e8 swift::ProtocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl_, swift::LazyResolver_) const + 40
8 swift 0x00000000010348e6 swift::ProtocolConformance::getTypeWitness(swift::AssociatedTypeDecl_, swift::LazyResolver_) const + 6
11 swift 0x0000000000f1f058 swift::ArchetypeBuilder::addSuperclassRequirement(swift::ArchetypeBuilder::PotentialArchetype_, swift::Type, swift::RequirementSource) + 248
14 swift 0x0000000000f20d4f swift::ArchetypeBuilder::visitInherited(llvm::ArrayRefswift::TypeLoc, llvm::function_ref<bool (swift::Type, swift::SourceLoc)>) + 175
15 swift 0x0000000000f1eb4a swift::ArchetypeBuilder::addAbstractTypeParamRequirements(swift::AbstractTypeParamDecl_, swift::ArchetypeBuilder::PotentialArchetype_, swift::RequirementSource::Kind, llvm::SmallPtrSetImplswift::ProtocolDecl_&) + 426
16 swift 0x0000000000f1eed7 swift::ArchetypeBuilder::addConformanceRequirement(swift::ArchetypeBuilder::PotentialArchetype_, swift::ProtocolDecl_, swift::RequirementSource, llvm::SmallPtrSetImplswift::ProtocolDecl*&) + 471
19 swift 0x0000000000f20d4f swift::ArchetypeBuilder::visitInherited(llvm::ArrayRefswift::TypeLoc, llvm::function_ref<bool (swift::Type, swift::SourceLoc)>) + 175
20 swift 0x0000000000f1eb4a swift::ArchetypeBuilder::addAbstractTypeParamRequirements(swift::AbstractTypeParamDecl_, swift::ArchetypeBuilder::PotentialArchetype_, swift::RequirementSource::Kind, llvm::SmallPtrSetImplswift::ProtocolDecl*&) + 426
21 swift 0x0000000000f1e97c swift::ArchetypeBuilder::addGenericParameterRequirements(swift::GenericTypeParamDecl_) + 172
22 swift 0x0000000000e34427 swift::TypeChecker::checkGenericParamList(swift::ArchetypeBuilder_, swift::GenericParamList_, swift::GenericSignature_, bool, swift::GenericTypeResolver_) + 375
23 swift 0x0000000000e35b37 swift::TypeChecker::validateGenericSignature(swift::GenericParamList_, swift::DeclContext_, swift::GenericSignature_, std::function<bool (swift::ArchetypeBuilder&)>, bool&) + 135
24 swift 0x0000000000e35ee4 swift::TypeChecker::validateGenericTypeSignature(swift::NominalTypeDecl_) + 116
25 swift 0x0000000000df9bd4 swift::TypeChecker::validateDecl(swift::ValueDecl_, bool) + 1300
28 swift 0x0000000000dff206 swift::TypeChecker::typeCheckDecl(swift::Decl_, bool) + 150
29 swift 0x0000000000e22092 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1026
30 swift 0x0000000000c97b9f swift::CompilerInstance::performSema() + 3167
32 swift 0x000000000077705b frontend_main(llvm::ArrayRef, char const_, void_) + 2523
33 swift 0x0000000000771b25 main + 2773
Stack dump:
0. Program arguments: /usr/local/bin/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28257-swift-typechecker-resolvetypewitness.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28257-swift-typechecker-resolvetypewitness-eec025.o

  1. While type-checking 'A' at validation-test/compiler_crashers/28257-swift-typechecker-resolvetypewitness.swift:7:1
    :0: error: unable to execute command: Segmentation fault
    :0: error: compile command failed due to signal (use -v to see invocation)
    Resolved bug number: –

Before merging this pull request to apple/swift repository:

Test pull request on Swift continuous integration.

Triggering Swift CI
https://github.com/swift-ci https://github.com/swift-ci https://github.com/swift-ci https://github.com/swift-ci https://github.com/swift-ci https://github.com/swift-ci https://github.com/swift-ci

You can view, comment on, or merge this pull request online at:

#1489 #1489
Commit Summary

[swiftc] Add test case for crash triggered in swift::TypeChecker::resolveTypeWitness(swift::NormalProtocolConformance const_, swift::AssociatedTypeDecl_)
File Changes

A validation-test/compiler_crashers/28257-swift-typechecker-resolvetypewitness.swift https://github.com/apple/swift/pull/1489/files#diff-0 (14)
Patch Links:

https://github.com/apple/swift/pull/1489.patch https://github.com/apple/swift/pull/1489.patch
https://github.com/apple/swift/pull/1489.diff https://github.com/apple/swift/pull/1489.diff

Reply to this email directly or view it on GitHub #1489.

@practicalswift
Copy link
Contributor Author

@gottesmm Heh, I guess that would be needed to bump the discover rate! My fuzzing farm is running at full speed, so the slow rate of discovered bugs is a sign of robustness and not lack of interest :-)

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.

3 participants