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-3779] Program with struct nested in generic struct crashes because of “cyclic metadata dependency” #46364

Closed
jadengeller mannequin opened this issue Jan 29, 2017 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software run-time crash Bug → crash: Swift code crashed during execution runtime The Swift Runtime

Comments

@jadengeller
Copy link
Mannequin

jadengeller mannequin commented Jan 29, 2017

Previous ID SR-3779
Radar None
Original Reporter @JadenGeller
Type Bug
Status Resolved
Resolution Duplicate
Environment

Xcode
Version 8.2.1 (8C1002)
Toolchain: Swift 3.1 Snapshot 2017-01-22 (a)

Additional Detail from JIRA
Votes 2
Component/s Compiler
Labels Bug, RunTimeCrash, Runtime
Assignee None
Priority Medium

md5: 8751e3adec298727e374ec168957556e

duplicates:

  • SR-263 Implement a general solution to prevent deadlocks when generic types rely on their own metadata recursively

is duplicated by:

  • SR-5767 Unexpected cyclic metadata

relates to:

  • SR-7604 cyclic metadata dependency detected, aborting
  • SR-1686 Program with recursive class crashes because of “cyclic metadata dependency”
  • SR-4611 Runtime crash with nested type used as superclass generic argument

Issue Description:

public struct Base<Element> {
  public struct Glue {
    enum Backing {
      case known(Element)
      case unknown(Int)
    }
    var backing: Backing
    
    static func unknown() -> Glue {
      return Glue(backing: .unknown(0))
    }
  }
}

let x: Base<Int>.Glue = .unknown() // CRASH: "GenericCache(0x1002df1c8): cyclic metadata dependency detected, aborting"
@jadengeller
Copy link
Mannequin Author

jadengeller mannequin commented Jan 29, 2017

Potentially related: https://bugs.swift.org/browse/SR-1686

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the crash Bug: A crash, i.e., an abnormal termination of software label Dec 12, 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 crash Bug: A crash, i.e., an abnormal termination of software run-time crash Bug → crash: Swift code crashed during execution runtime The Swift Runtime
Projects
None yet
Development

No branches or pull requests

1 participant