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-6800] Swift 4.1 regression: compiler crash with optimizations (instrprof failed to lower an increment UNREACHABLE executed) #49349
Comments
@swift-ci create |
For once, a bug in LLVM and not Swift! |
Yay? |
@NachoSoto could you provide some more instructions for reproducing this crash? Simply compiling it in Xcode does not work (there's a build error about ReactiveSwift being built already for 4.0.1). Do I need to run a carthage command first? Thanks. |
Can you try removing derived data? The correct framework is already built in the repo. Make sure you're using the AsyncImageView-iOS schema! |
I wiped the derived data in ~/Library/Developer/Xcode, but am still seeing: Module compiled with Swift 4.1 cannot be imported in Swift 4.0.1: /Users/vk/Desktop/AsyncImageView-swift-4-1-release/Carthage/Build/iOS/ReactiveSwift.framework/Modules/ReactiveSwift.swiftmodule/x86_64.swiftmodule Should I wipe the Carthage Build directory as well? |
Ah, oops, I'm not building with a new enough swift. Sorry for the noise. |
Oh yeah, I thought you meant the opposite. |
Hm, I'm building with this swift, but it's still not the right version: /Library/Developer/Toolchains/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-01-18-a.xctoolchain/usr/bin/swift --version Do you have a link to a working dev snapshot (from https://swift.org/download/#snapshots)? Thanks again for your help. |
Are you getting the same error? I built this using the latest snapshot for 4.1 If you need to, you can rebuild dependencies with the following command:
|
Yes, I'm seeing the same error: Module compiled with Swift 4.0.3 cannot be imported in Swift 4.1: /Users/vk/Desktop/AsyncImageView/Carthage/Build/iOS/ReactiveSwift.framework/Modules/ReactiveSwift.swiftmodule/i386.swiftmodule I'm using the latest 4.1 snapshot ("Swift 4.1 Development" on this page: https://swift.org/download/#snapshots ), but the ReactiveSwift module included in your package is built with 4.0.3: 00001ec0 10 22 a4 12 07 94 0d 00 52 65 61 63 74 69 76 65 |."......Reactive| I suppose I need to rebuild the dependencies, but I'm not sure how to do that as I'm unfamiliar with carthage. The carthage command you provided doesn't look like it's rebuilding anything: $ carthage build --platform ios --toolchain XcodeDefault
Would it be possible for you to share a package where ReactiveSwift is compiled with the 4.1 snapshot? If I'm misunderstanding your instructions – apologies! |
I'm happy to help! Is there any chance we can use any form of IM to speed this up? I can help you diagnose why Carthage isn't building. |
@NachoSoto thanks, feel free to direct-message me on IRC. I'm on the #llvm channel on OFTC as vedantk (https://llvm.org/docs/#irc). Could you also attach the full swift compiler invocation which crashes? It might rule out a few types of issues. |
I don't use IRC... |
@vedantk okay, now that Xcode 9.3 beta 1 is out, you can test this with that version. I just updated the branch to use that version of the compiler. If you still need to build by hand, the command I mentioned should work (I don't know if "XcodeDefault" is a valid toolchain though, you need the ID). But again, make sure you have the latest version of Carthage installed. |
This is what the error looks now?
|
Oh @vedantk you were asking about the compiler invocation too:
|
Uhm, I filed this 6 days ago, and it got closed as a dupe to a much newer Jira? |
Confirmed fixed, thanks! |
Environment
Swift version 4.1-dev (LLVM ef53654946, Clang f7df1e5a04, Swift 831b78c)
Additional Detail from JIRA
md5: 3dabdb63c4ad6cef364d7b857ba5162c
blocks:
Issue Description:
After converting AsyncImageView to Swift 4.1, I compiled it with Carthage and realized it crashes the compiler (not in Debug). You can clone the branch on that exact state from the repo or download it directly from here.
Once open, select the AsyncImageView-iOS scheme and compile (I already set it to Release configuration).
Stack trace:
See also SR-6797 and SR-6799.
The text was updated successfully, but these errors were encountered: