Skip to content
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

[SR-15437] Compiler Crash when swift-alorithms is a Package Dependency #57743

Closed
swift-ci opened this issue Nov 4, 2021 · 2 comments
Closed
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Nov 4, 2021

Previous ID SR-15437
Radar rdar://problem/85007684
Original Reporter rnantes (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate

Attachment: Download

Environment

Compiling via Docker image nightly-main-focal. x86

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: 54b83dfde2daab4b6bfbbe32c78589b7

duplicates:

  • SR-15254 Trunk snapshot compiler for linux x86_64 crashes with "Invalid type parameter in getCanonicalTypeInContext()" when compiling the swift-algorithms package

Issue Description:

The Swift compiler crashes when compiling a package that has swift-alorithms as a dependency. I am compiling with the nightly-main-focal Docker image. I've created a github repo of the issue. Note the you can see the error also occurs in the Github Actions CI.

The error is:

Invalid type parameter in getCanonicalTypeInContext()
Original type: Optional<τ_0_1.Element.Index>
Simplified term: τ_0_1.[Collection:Element].[Collection:Index]
Longest valid prefix: τ_0_1.[Collection:Element]
Prefix type: τ_0_1.Element
Step 6/6 : RUN swift build --build-tests
 ---> Running in 1f5fd8a51a42
[1/9] Compiling _NumericsShims _NumericsShims.c
[2/15] Emitting module RealModule
[3/15] Compiling RealModule AlgebraicField.swift
[4/15] Compiling RealModule ApproximateEquality.swift
[5/15] Compiling RealModule AugmentedArithmetic.swift
[6/15] Compiling RealModule Double+Real.swift
[7/15] Compiling RealModule ElementaryFunctions.swift
[8/20] Compiling RealModule Float+Real.swift
[9/20] Compiling RealModule Float16+Real.swift
[10/20] Compiling RealModule Float80+Real.swift
[11/20] Compiling RealModule Real.swift
[12/20] Compiling RealModule RealFunctions.swift
[15/22] Wrapping AST for RealModule for debugging
error: emit-module command failed due to signal 6 (use -v to see invocation)error: compile command failed due to signal 6 (use -v to see invocation)Invalid type parameter in getCanonicalTypeInContext()
Original type: Optional<τ_0_1.Element.Index>
Simplified term: τ_0_1.[Collection:Element].[Collection:Index]
Longest valid prefix: τ_0_1.[Collection:Element]
Prefix type: τ_0_1.Element

Requirement machine for <τ_0_0, τ_0_1 where τ_0_1 : Collection>
Rewrite system: {
- [Collection].[Collection] => [Collection] [permanent]
- [Collection].Element => [Collection:Element] [permanent]
- [Collection].Index => [Collection:Index] [permanent]
- [Collection].Iterator => [Collection:Iterator] [permanent]
- [Collection].SubSequence => [Collection:SubSequence] [permanent]
- [Collection].Indices => [Collection:Indices] [permanent]
- [Sequence].[Sequence] => [Sequence] [permanent]
- [Sequence].Element => [Sequence:Element] [permanent]
- [Sequence].Iterator => [Sequence:Iterator] [permanent]
- [Comparable].[Comparable] => [Comparable] [permanent]
- [IteratorProtocol].[IteratorProtocol] => [IteratorProtocol] [permanent]
- [IteratorProtocol].Element => [IteratorProtocol:Element] [permanent]
- [Equatable].[Equatable] => [Equatable] [permanent]
- [Collection].[Sequence] => [Collection]
- [Collection:SubSequence].[Sequence:Element] => [Collection:Element]
- [Collection:Index].[Comparable] => [Collection:Index]
- [Collection:Indices].[Sequence:Element] => [Collection:Index]
- [Collection:Indices].[Collection] => [Collection:Indices]
- [Collection:Indices].[Collection:SubSequence] => [Collection:Indices]
- [Collection:SubSequence].[Collection] => [Collection:SubSequence]
- [Collection:SubSequence].[Collection:SubSequence] => [Collection:SubSequence]
- [Collection:Indices].[Collection:Index] => [Collection:Index]
- [Collection:SubSequence].[Collection:Index] => [Collection:Index]
- [Sequence:Iterator].[IteratorProtocol:Element] => [Sequence:Element]
- [Sequence:Iterator].[IteratorProtocol] => [Sequence:Iterator]
/usr/bin/swift-frontend[0xd5daa5]
/usr/bin/swift-frontend[0xd72ab7]
/usr/bin/swift-frontend[0xd7d5fc]
/usr/bin/swift-frontend[0xd7cc63]
/usr/bin/swift-frontend[0xd62912]
/usr/bin/swift-frontend[0xd5fab1]
/usr/bin/swift-frontend[0xcd19c4]
/usr/bin/swift-frontend[0xcc3a33]
/usr/bin/swift-frontend[0xd354d2]
/usr/bin/swift-frontend[0xd332d7]
/usr/bin/swift-frontend[0xd328a6]
/usr/bin/swift-frontend[0xd32ddf]
/usr/bin/swift-frontend[0xd328a6]
/usr/bin/swift-frontend[0xd32ddf]
/usr/bin/swift-frontend[0xd328a6]
/usr/bin/swift-frontend[0xd3171d]
/usr/bin/swift-frontend[0xce8f37]
/usr/bin/swift-frontend[0xc827f4]
/usr/bin/swift-frontend[0xc84994]
/usr/bin/swift-frontend[0xc8101e]
/usr/bin/swift-frontend[0xd45e39]
/usr/bin/swift-frontend[0xd41ded]
/usr/bin/swift-frontend[0xd41d9d]
/usr/bin/swift-frontend[0xc87486]
/usr/bin/swift-frontend[0xd31153]
/usr/bin/swift-frontend[0xc8b2a2]
/usr/bin/swift-frontend[0xc885f4]
/usr/bin/swift-frontend[0x4ed9e0]
/usr/bin/swift-frontend[0x4e0fb1]
/usr/bin/swift-frontend[0x4ad300]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7fe6e92400b3]
/usr/bin/swift-frontend[0x4acefe]
The command '/bin/sh -c swift build --build-tests' returned a non-zero code: 1
Error: Process completed with exit code 1.
@ktoso
Copy link
Member

ktoso commented Nov 4, 2021

@swift-ci create

@ktoso
Copy link
Member

ktoso commented Nov 4, 2021

Hm, no idea but I'll ask someone to have a look.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

2 participants