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-10306] Runtime Error while using key paths with internal attributes exposed via @testable import #52706

Closed
swift-ci opened this issue Apr 4, 2019 · 3 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself key paths Feature: key paths (both native and Objective-C) regression swift 5.0

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Apr 4, 2019

Previous ID SR-10306
Radar rdar://problem/49618412
Original Reporter moger777 (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate

Attachment: Download

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, 5.0Regression, KeyPaths
Assignee moger777 (JIRA)
Priority Medium

md5: 2aef9a3fddacd07e909d7d9914501484

duplicates:

  • SR-10264 EXC_BAD_ACCESS when assigning to a field in a testable class with a key-path

Issue Description:

Getting "EXC_BAD_ACCESS (code=1, address=0xfffffffb)" when trying to access fields that are marked internal via key paths when using @testable import. I'm not sure if this is an XCode or Swift bug. This behavior worked correctly on XCode 10.1 but now seems broke on 10.2. Attached is a project that illustrates the issue. The ViewControllerTests will crash when run unless you change the SuperHero class to be public and change all the attributes to be public.

SwitchToBoolean.zip

@belkadan
Copy link
Contributor

belkadan commented Apr 4, 2019

@jckarter, you have a dup of this, right?

@jckarter
Copy link
Member

Yeah, I think this is https://bugs.swift.org/browse/SR-10264.

@jckarter
Copy link
Member

Would you be able to try a recent snapshot of master (or 5.1, newer than 05-20, once we generate a new one) from https://swift.org/download/ to see whether your crash goes away?

@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 key paths Feature: key paths (both native and Objective-C) regression swift 5.0
Projects
None yet
Development

No branches or pull requests

4 participants