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-8963] Inlining a Swift method accessing a C bitfield member may cause a linker error #51468
Comments
@swift-ci create |
stephan (JIRA User) I am going to try to reproduce this with ToT of your project. I am worried that it may not reproduce (hopefully it does). Just in case, can you give me the hash in the repo I should check out? |
Comment by Stephan Tolksdorf (JIRA) If this problem still exists then you should be able to reproduce it with the ToT of STULabel. A few days ago I failed to reproduce the issue with a minimal test case when using the master branch version of Swift. |
Comment by Stephan Tolksdorf (JIRA) Thanks for looking into the issue! |
I reduced a test case and reproduced it with 4.2. It appears to have been fixed already on master. I'll beef up our regression tests for bitfields. Also I found an unrelated source compatibility issue while building your project on master. Once I investigate that I'll close out this bug. |
Comment by Stephan Tolksdorf (JIRA) Thank you, Slava! |
stephan (JIRA User) @slavapestov If this is exposing source compatibility issues, maybe add this to the source compatibility suite? |
I still need to investigate the other source compat issue – I'll reduce a test case and file a new bug shortly |
Comment by Stephan Tolksdorf (JIRA) There seems to a be a new regression issue in the Xcode 10.2 beta that breaks compilation of the STULabel Demo target (latest master branch version) in the Swift 4.2 mode. My workaround for SR-6894 seems to have stopped working. @slavapestov could you maybe take a look? |
Do you mind filing a new bug for the new regression so that we don't forget about it? Unless it's the same bitfield accessor linkage issue in which case you should re-open this one. Thanks! |
Comment by Stephan Tolksdorf (JIRA) Thanks! I've created SR-9785. |
Environment
MacOS High Sierra 10.13.6 (17G65), Xcode 10.1 Beta 2 (and earlier versions)
Additional Detail from JIRA
md5: e9d709455497070eb364751ae5052319
Issue Description:
Steps to reproduce, e.g. in Xcode 10.1 Beta 2:
Clone https://github.com/stephan-tolksdorf/STULabel
Open STULabel.xcodeproj
Select 'STULabel' scheme
Set the Build configuration for Test targets to 'Release' (in Product -> Scheme -> Edit scheme...)
Uncomment one or more of the
@inlinable
attributes in theSTULabelSwift
code marked with the comment "// swift inlining bug", e.g. the attribute on theParagraph.``isLastParagraph
property in the STULabelSwift/STUTextFrame.overlay.swift fileSelect a simulator and build the tests (via Product -> Build For -> Testing)
Observe the linker error(s) similar to the following :
Undefined symbols for architecture x86_64:
"OBJC_CLASS$_STUTextFrameDrawingOptions", referenced from:
"$_STUTextFrameParagraph$isLastParagraph$getter", referenced from:
ld: symbol(s) not found for architecture x86_64
The text was updated successfully, but these errors were encountered: