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-5567] Segmentation fault 11 #48139

Closed
an0 mannequin opened this issue Jul 27, 2017 · 3 comments
Closed

[SR-5567] Segmentation fault 11 #48139

an0 mannequin opened this issue Jul 27, 2017 · 3 comments
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

Comments

@an0
Copy link
Mannequin

an0 mannequin commented Jul 27, 2017

Previous ID SR-5567
Radar None
Original Reporter @an0
Type Bug
Status Resolved
Resolution Duplicate

Attachment: Download

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

md5: 2d9e75015ab8fc3ed499df527b181460

duplicates:

  • SR-5025 Swift 4.0: Crash because "missing diags for other accessors" in @objc extensions

Issue Description:

This code cause compiler segmentation fault 11:

import UIKit

@objc public extension UIView {
    
    private static var key = "key"
    
    public var isKeySet: Bool {
        get {
            let value = objc_getAssociatedObject(self, &UIView.key)
            guard let key = value as? Bool else {
                return false
            }
            return key
        }
        
        set {
            objc_setAssociatedObject(self, &UIView.key, newValue, .OBJC_ASSOCIATION_RETAIN)
        }
    }
    
}
@belkadan
Copy link
Contributor

Seems to be fixed on master, but I'll check whether it made it into the 4.0 branch.

@belkadan
Copy link
Contributor

Looks like SR-5025.

@belkadan
Copy link
Contributor

Well, okay, I'm not sure it was that one, but it is fixed in the 4.0 branch, and will make it to a future Xcode.

@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
Projects
None yet
Development

No branches or pull requests

2 participants