Skip to content

[swiftc] Add test case for crash triggered in swift::ModuleDecl::lookupPrefixOperator(…) #1663

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
Mar 13, 2016
Merged

[swiftc] Add test case for crash triggered in swift::ModuleDecl::lookupPrefixOperator(…) #1663

merged 1 commit into from
Mar 13, 2016

Conversation

practicalswift
Copy link
Contributor

What's in this pull request?

Crash case with stack trace:

6  swift           0x000000000310ab3d llvm::llvm_unreachable_internal(char const*, char const*, unsigned int) + 461
7  swift           0x000000000106f570 swift::ModuleDecl::lookupPrefixOperator(swift::Identifier, swift::SourceLoc) + 0
9  swift           0x0000000000f66048 swift::ArchetypeBuilder::PotentialArchetype::addConformance(swift::ProtocolDecl*, swift::RequirementSource const&, swift::ArchetypeBuilder&) + 296
10 swift           0x0000000000f69a16 swift::ArchetypeBuilder::addConformanceRequirement(swift::ArchetypeBuilder::PotentialArchetype*, swift::ProtocolDecl*, swift::RequirementSource, llvm::SmallPtrSetImpl<swift::ProtocolDecl*>&) + 118
13 swift           0x0000000000f6b9ff swift::ArchetypeBuilder::visitInherited(llvm::ArrayRef<swift::TypeLoc>, llvm::function_ref<bool (swift::Type, swift::SourceLoc)>) + 175
14 swift           0x0000000000f697ea swift::ArchetypeBuilder::addAbstractTypeParamRequirements(swift::AbstractTypeParamDecl*, swift::ArchetypeBuilder::PotentialArchetype*, swift::RequirementSource::Kind, llvm::SmallPtrSetImpl<swift::ProtocolDecl*>&) + 426
15 swift           0x0000000000f69b77 swift::ArchetypeBuilder::addConformanceRequirement(swift::ArchetypeBuilder::PotentialArchetype*, swift::ProtocolDecl*, swift::RequirementSource, llvm::SmallPtrSetImpl<swift::ProtocolDecl*>&) + 471
18 swift           0x0000000000f6b9ff swift::ArchetypeBuilder::visitInherited(llvm::ArrayRef<swift::TypeLoc>, llvm::function_ref<bool (swift::Type, swift::SourceLoc)>) + 175
19 swift           0x0000000000f697ea swift::ArchetypeBuilder::addAbstractTypeParamRequirements(swift::AbstractTypeParamDecl*, swift::ArchetypeBuilder::PotentialArchetype*, swift::RequirementSource::Kind, llvm::SmallPtrSetImpl<swift::ProtocolDecl*>&) + 426
20 swift           0x0000000000f6961c swift::ArchetypeBuilder::addGenericParameterRequirements(swift::GenericTypeParamDecl*) + 172
21 swift           0x0000000000e7d3f7 swift::TypeChecker::checkGenericParamList(swift::ArchetypeBuilder*, swift::GenericParamList*, swift::GenericSignature*, bool, swift::GenericTypeResolver*) + 375
22 swift           0x0000000000e7eb07 swift::TypeChecker::validateGenericSignature(swift::GenericParamList*, swift::DeclContext*, swift::GenericSignature*, std::function<bool (swift::ArchetypeBuilder&)>, bool&) + 135
23 swift           0x0000000000e7eea6 swift::TypeChecker::validateGenericTypeSignature(swift::GenericTypeDecl*) + 102
24 swift           0x0000000000e41f31 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 1601
29 swift           0x0000000000e47556 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
30 swift           0x0000000000e6a8e2 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1026
31 swift           0x0000000000cbcedf swift::CompilerInstance::performSema() + 3087
33 swift           0x000000000078b6ff frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2495
34 swift           0x00000000007861c5 main + 2837
Stack dump:
0.  Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28266-swift-moduledecl-lookupprefixoperator.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28266-swift-moduledecl-lookupprefixoperator-bacf6e.o
1.  While type-checking 'B' at validation-test/compiler_crashers/28266-swift-moduledecl-lookupprefixoperator.swift:9:1
<unknown>:0: error: unable to execute command: Aborted
<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.

…upPrefixOperator(swift::Identifier, swift::SourceLoc)

Stack trace:

```
6  swift           0x000000000310ab3d llvm::llvm_unreachable_internal(char const*, char const*, unsigned int) + 461
7  swift           0x000000000106f570 swift::ModuleDecl::lookupPrefixOperator(swift::Identifier, swift::SourceLoc) + 0
9  swift           0x0000000000f66048 swift::ArchetypeBuilder::PotentialArchetype::addConformance(swift::ProtocolDecl*, swift::RequirementSource const&, swift::ArchetypeBuilder&) + 296
10 swift           0x0000000000f69a16 swift::ArchetypeBuilder::addConformanceRequirement(swift::ArchetypeBuilder::PotentialArchetype*, swift::ProtocolDecl*, swift::RequirementSource, llvm::SmallPtrSetImpl<swift::ProtocolDecl*>&) + 118
13 swift           0x0000000000f6b9ff swift::ArchetypeBuilder::visitInherited(llvm::ArrayRef<swift::TypeLoc>, llvm::function_ref<bool (swift::Type, swift::SourceLoc)>) + 175
14 swift           0x0000000000f697ea swift::ArchetypeBuilder::addAbstractTypeParamRequirements(swift::AbstractTypeParamDecl*, swift::ArchetypeBuilder::PotentialArchetype*, swift::RequirementSource::Kind, llvm::SmallPtrSetImpl<swift::ProtocolDecl*>&) + 426
15 swift           0x0000000000f69b77 swift::ArchetypeBuilder::addConformanceRequirement(swift::ArchetypeBuilder::PotentialArchetype*, swift::ProtocolDecl*, swift::RequirementSource, llvm::SmallPtrSetImpl<swift::ProtocolDecl*>&) + 471
18 swift           0x0000000000f6b9ff swift::ArchetypeBuilder::visitInherited(llvm::ArrayRef<swift::TypeLoc>, llvm::function_ref<bool (swift::Type, swift::SourceLoc)>) + 175
19 swift           0x0000000000f697ea swift::ArchetypeBuilder::addAbstractTypeParamRequirements(swift::AbstractTypeParamDecl*, swift::ArchetypeBuilder::PotentialArchetype*, swift::RequirementSource::Kind, llvm::SmallPtrSetImpl<swift::ProtocolDecl*>&) + 426
20 swift           0x0000000000f6961c swift::ArchetypeBuilder::addGenericParameterRequirements(swift::GenericTypeParamDecl*) + 172
21 swift           0x0000000000e7d3f7 swift::TypeChecker::checkGenericParamList(swift::ArchetypeBuilder*, swift::GenericParamList*, swift::GenericSignature*, bool, swift::GenericTypeResolver*) + 375
22 swift           0x0000000000e7eb07 swift::TypeChecker::validateGenericSignature(swift::GenericParamList*, swift::DeclContext*, swift::GenericSignature*, std::function<bool (swift::ArchetypeBuilder&)>, bool&) + 135
23 swift           0x0000000000e7eea6 swift::TypeChecker::validateGenericTypeSignature(swift::GenericTypeDecl*) + 102
24 swift           0x0000000000e41f31 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 1601
29 swift           0x0000000000e47556 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
30 swift           0x0000000000e6a8e2 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1026
31 swift           0x0000000000cbcedf swift::CompilerInstance::performSema() + 3087
33 swift           0x000000000078b6ff frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2495
34 swift           0x00000000007861c5 main + 2837
Stack dump:
0.	Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28266-swift-moduledecl-lookupprefixoperator.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28266-swift-moduledecl-lookupprefixoperator-bacf6e.o
1.	While type-checking 'B' at validation-test/compiler_crashers/28266-swift-moduledecl-lookupprefixoperator.swift:9:1
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
gribozavr added a commit that referenced this pull request Mar 13, 2016
…edecl-lookupprefixoperator

[swiftc] Add test case for crash triggered in swift::ModuleDecl::lookupPrefixOperator(…)
@gribozavr gribozavr merged commit bb17d48 into swiftlang:master Mar 13, 2016
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