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-10648] Linker fails to link open method that was previously internal #53048

Closed
swift-ci opened this issue May 9, 2019 · 5 comments
Closed
Assignees
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 May 9, 2019

Previous ID SR-10648
Radar rdar://problem/48330571
Original Reporter downie (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate

Attachment: Download

Environment

Version/Build:
Xcode Version 10.2.1 (10E1001)

Configuration:
macOS 10.14.4 (18E226)

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

md5: a9da38a72883e43dcee2a1d522430994

relates to:

  • SR-10191 Trap 6 during compilation instead of compile error

Issue Description:

Summary:
In the attached zip, I have a project that includes a framework. In the framework's class hierarchy, a subclass makes an internal 'initialize' method open. In the app, I subclass that class with an open 'initialize' method and try to build.

In Debug, it builds fine. In Release, the linker fails to find the method descriptor for that method and the build fails.

This seems to be related to the "Enable Testability" flag. This appears to be the property enabled in the debug builds but disabled in release builds that's causing this behavior.

Steps to Reproduce:

  1. Open the attached Project
  2. Select the Release scheme
  3. Build

Expected Results:
It builds without issue. Or at least, it builds with the exact same result in the Debug scheme.

Actual Results:
It fails to build with a linker error.

Other Notes:

This was reported to Apple's public bug reporter with id 50619960

It was discussed in relation to the Charts library in this bug

@swift-ci
Copy link
Collaborator Author

swift-ci commented May 9, 2019

Comment by Chris Downie (JIRA)

@belkadan My colleague Jacob Bullock mentioned you wanted to be alerted about this issue?

@belkadan
Copy link
Contributor

Slava's got a Radar for this, though I don't know when it'll get to the top of his queue.

@belkadan
Copy link
Contributor

(Thanks for filing.)

@swift-ci
Copy link
Collaborator Author

Comment by Chris Downie (JIRA)

FYI: The issue I filed just got marked as a dupe of 48330571 in Apple's bug reporter.

@slavapestov
Copy link
Member

I'll have a fix shortly.

@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

3 participants