Skip to content

[swiftc (52 vs. 5156)] Add crasher in swift::irgen::emitPolymorphicParameters(...) #4449

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
Aug 23, 2016
Merged

[swiftc (52 vs. 5156)] Add crasher in swift::irgen::emitPolymorphicParameters(...) #4449

merged 1 commit into from
Aug 23, 2016

Conversation

practicalswift
Copy link
Contributor

Add test case for crash triggered in swift::irgen::emitPolymorphicParameters(...).

Current number of unresolved compiler crashers: 52 (5156 resolved)

Assertion failure in lib/IRGen/GenProto.cpp (line 1810):

Assertion `targetDepType->isTypeParameter()' failed.

When executing: void addPotentialArchetypeAccessPath(swift::irgen::IRGenFunction &, swift::CanType, swift::CanType, GetTypeParameterInContextFn)

Assertion context:

  case SILFunctionTypeRepresentation::Thick:
  case SILFunctionTypeRepresentation::Thin:
  case SILFunctionTypeRepresentation::Method:
    return ty->isPolymorphic();

  case SILFunctionTypeRepresentation::CFunctionPointer:
  case SILFunctionTypeRepresentation::ObjCMethod:
    // May be polymorphic at the SIL level, but no type metadata is actually
    // passed.
    return false;

Stack trace:

swift: /path/to/swift/lib/IRGen/GenProto.cpp:1810: void addPotentialArchetypeAccessPath(swift::irgen::IRGenFunction &, swift::CanType, swift::CanType, GetTypeParameterInContextFn): Assertion `targetDepType->isTypeParameter()' failed.
10 swift           0x000000000087bd49 swift::irgen::emitPolymorphicParameters(swift::irgen::IRGenFunction&, swift::SILFunction&, swift::irgen::Explosion&, swift::irgen::WitnessMetadata*, llvm::function_ref<llvm::Value* (unsigned int)> const&) + 1033
12 swift           0x00000000008b35d4 swift::irgen::IRGenModule::emitSILFunction(swift::SILFunction*) + 1268
13 swift           0x0000000000810c95 swift::irgen::IRGenerator::emitGlobalTopLevel() + 405
15 swift           0x00000000007ea0a4 swift::performIRGeneration(swift::IRGenOptions&, swift::SourceFile&, swift::SILModule*, llvm::StringRef, llvm::LLVMContext&, unsigned int) + 68
17 swift           0x00000000007db487 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2887
18 swift           0x00000000007a72b8 main + 2872
Stack dump:
0.  Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28399-getpointerelementtype-is-not-storagetype.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28399-getpointerelementtype-is-not-storagetype-cd8726.o
1.  While emitting IR SIL function @_TTWV4main1HS_1ES_FS1_1guRd__S_1Awx1Fzwd__1BrfGVS_1Cqd___T_ for 'g' at validation-test/compiler_crashers/28399-getpointerelementtype-is-not-storagetype.swift:19:1
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)

…rameters(...)

Add test case for crash triggered in `swift::irgen::emitPolymorphicParameters(...)`.

Current number of unresolved compiler crashers: 52 (5156 resolved)

Assertion failure in [`lib/IRGen/GenProto.cpp (line 1810)`](https://github.com/apple/swift/blob/master/lib/IRGen/GenProto.cpp#L1810):

```
Assertion `targetDepType->isTypeParameter()' failed.

When executing: void addPotentialArchetypeAccessPath(swift::irgen::IRGenFunction &, swift::CanType, swift::CanType, GetTypeParameterInContextFn)
```

Assertion context:

```
  case SILFunctionTypeRepresentation::Thick:
  case SILFunctionTypeRepresentation::Thin:
  case SILFunctionTypeRepresentation::Method:
    return ty->isPolymorphic();

  case SILFunctionTypeRepresentation::CFunctionPointer:
  case SILFunctionTypeRepresentation::ObjCMethod:
    // May be polymorphic at the SIL level, but no type metadata is actually
    // passed.
    return false;

```
Stack trace:

```
swift: /path/to/swift/lib/IRGen/GenProto.cpp:1810: void addPotentialArchetypeAccessPath(swift::irgen::IRGenFunction &, swift::CanType, swift::CanType, GetTypeParameterInContextFn): Assertion `targetDepType->isTypeParameter()' failed.
10 swift           0x000000000087bd49 swift::irgen::emitPolymorphicParameters(swift::irgen::IRGenFunction&, swift::SILFunction&, swift::irgen::Explosion&, swift::irgen::WitnessMetadata*, llvm::function_ref<llvm::Value* (unsigned int)> const&) + 1033
12 swift           0x00000000008b35d4 swift::irgen::IRGenModule::emitSILFunction(swift::SILFunction*) + 1268
13 swift           0x0000000000810c95 swift::irgen::IRGenerator::emitGlobalTopLevel() + 405
15 swift           0x00000000007ea0a4 swift::performIRGeneration(swift::IRGenOptions&, swift::SourceFile&, swift::SILModule*, llvm::StringRef, llvm::LLVMContext&, unsigned int) + 68
17 swift           0x00000000007db487 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2887
18 swift           0x00000000007a72b8 main + 2872
Stack dump:
0.	Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28399-getpointerelementtype-is-not-storagetype.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28399-getpointerelementtype-is-not-storagetype-cd8726.o
1.	While emitting IR SIL function @_TTWV4main1HS_1ES_FS1_1guRd__S_1Awx1Fzwd__1BrfGVS_1Cqd___T_ for 'g' at validation-test/compiler_crashers/28399-getpointerelementtype-is-not-storagetype.swift:19:1
<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 test and merge

@CodaFi
Copy link
Contributor

CodaFi commented Aug 22, 2016

This totally passed CI but seems to have hit up against a Github API failure about the smoke testing requirements.

// @shahmishal

@CodaFi
Copy link
Contributor

CodaFi commented Aug 23, 2016

@swift-ci please smoke test OS X platform.

@CodaFi CodaFi merged commit fa36206 into swiftlang:master Aug 23, 2016
kateinoigakukun added a commit that referenced this pull request Aug 31, 2022
[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