Skip to content

[swiftc (76 vs. 5179)] Add crasher in ? #5534

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
Oct 30, 2016
Merged

[swiftc (76 vs. 5179)] Add crasher in ? #5534

merged 1 commit into from
Oct 30, 2016

Conversation

practicalswift
Copy link
Contributor

Add test case for crash triggered in ?.

Current number of unresolved compiler crashers: 76 (5179 resolved)

Assertion failure in lib/AST/ProtocolConformance.cpp (line 271):

Assertion `resolver && "Unable to resolve type witness"' failed.

When executing: std::pair<const Substitution &, TypeDecl *> swift::NormalProtocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl *, swift::LazyResolver *) const

Assertion context:

  if (Resolver)
    resolveLazyInfo();

  auto known = TypeWitnesses.find(assocType);
  if (known == TypeWitnesses.end()) {
    assert(resolver && "Unable to resolve type witness");
    resolver->resolveTypeWitness(this, assocType);
    known = TypeWitnesses.find(assocType);
    assert(known != TypeWitnesses.end() && "Didn't resolve witness?");
  }

Stack trace:

swift: /path/to/swift/lib/AST/ProtocolConformance.cpp:271: std::pair<const Substitution &, TypeDecl *> swift::NormalProtocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl *, swift::LazyResolver *) const: Assertion `resolver && "Unable to resolve type witness"' failed.
Stack dump:
0.  Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28444-resolver-unable-to-resolve-type-witness-failed.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28444-resolver-unable-to-resolve-type-witness-failed-1c716b.o
1.  While type-checking 'd' at validation-test/compiler_crashers/28444-resolver-unable-to-resolve-type-witness-failed.swift:10:1
2.  While type-checking expression at [validation-test/compiler_crashers/28444-resolver-unable-to-resolve-type-witness-failed.swift:10:19 - line:10:19] RangeText="b"
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)

Add test case for crash triggered in `?`.

Current number of unresolved compiler crashers: 76 (5179 resolved)

Assertion failure in [`lib/AST/ProtocolConformance.cpp (line 271)`](https://github.com/apple/swift/blob/master/lib/AST/ProtocolConformance.cpp#L271):

```
Assertion `resolver && "Unable to resolve type witness"' failed.

When executing: std::pair<const Substitution &, TypeDecl *> swift::NormalProtocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl *, swift::LazyResolver *) const
```

Assertion context:

```
  if (Resolver)
    resolveLazyInfo();

  auto known = TypeWitnesses.find(assocType);
  if (known == TypeWitnesses.end()) {
    assert(resolver && "Unable to resolve type witness");
    resolver->resolveTypeWitness(this, assocType);
    known = TypeWitnesses.find(assocType);
    assert(known != TypeWitnesses.end() && "Didn't resolve witness?");
  }

```
Stack trace:

```
swift: /path/to/swift/lib/AST/ProtocolConformance.cpp:271: std::pair<const Substitution &, TypeDecl *> swift::NormalProtocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl *, swift::LazyResolver *) const: Assertion `resolver && "Unable to resolve type witness"' failed.
Stack dump:
0.	Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28444-resolver-unable-to-resolve-type-witness-failed.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28444-resolver-unable-to-resolve-type-witness-failed-1c716b.o
1.	While type-checking 'd' at validation-test/compiler_crashers/28444-resolver-unable-to-resolve-type-witness-failed.swift:10:1
2.	While type-checking expression at [validation-test/compiler_crashers/28444-resolver-unable-to-resolve-type-witness-failed.swift:10:19 - line:10:19] RangeText="b"
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
@practicalswift
Copy link
Contributor Author

@swift-ci please smoke test and merge

@swift-ci swift-ci merged commit d886e11 into swiftlang:master Oct 30, 2016
MaxDesiatov pushed a commit that referenced this pull request Sep 7, 2023
[pull] swiftwasm from main
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