-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
SIL Value Ownership Error causes a compiler crash when building in Release mode for 6.0-series toolchains. #78923
Comments
I cannot reproduce this with the linux toolchains. |
If you want to help bisect this, all the old toolchains should still be available at swift.org. Simply take the URL for a recent snapshot build, such as https://download.swift.org/development/xcode/swift-DEVELOPMENT-SNAPSHOT-2025-01-10-a/swift-DEVELOPMENT-SNAPSHOT-2025-01-10-a-osx.pkg, and replace the date with the one you want to try. To see on which dates a snapshot toolchain was built in the first half of last year, get a Swift repo like swift-package-manager through git (this compiler repo is huge, so you may want to get a smaller one), and then run |
More information on this one (I'm running this on MacOS 14.2.1):
I tried this on a Ubuntu 24 machine with a |
OK, I was wrong about this working on linux, as I missed the bit about this only failing for you when compiling in release mode. That's why the bug template asks for an exact reproducer command, which you did not provide until a couple hours ago. Simply running the following on your repro code crashes the linux snapshot builds from early last year:
It does not crash the linux release that you tried because assertions are turned off there. I bisected it back to that Jan. 11 trunk snapshot, which you could also have tried, no reason to only try the 5.10 and 6.0 branch snapshots. Looking at the commits between that tag and the previous one, I only see one that mentions ownership, #70741. This was probably fixed in trunk last summer, sometime after the 6.0 branch. @jckarter, could you take a look and let us know if this is worth fixing in 6.0 or if anything further needs to be done in trunk, ie was this inadvertently or incompletely fixed in trunk or not? @shahmishal, has there been any thought about adding a git bisecting CI for these repro samples, which would use the prebuilt toolchains as we just did to find when the crash was introduced? It would save us some manual labor to track these regressions down, might make for a good GSoC project for a student or side project for a new Swift dev. |
Description
The code below crashes the compiler when an attempt is made to build in Release mode. This only affects 6.0-series toolchains. It does not affect 6.1-series toolchains.
Copy and paste this into a new project and attempt to build.
This was found to be a distinct issue from this one: #78444
Reproduction
Stack dump
Expected behavior
The build should complete successfully.
Environment
This affects every 6.0-series toolchain I've tried:
6.0 Development Snapshot 2024-07-11a
6.0.2 Release 2024-10-24a
6.0.3 Release 2024-12-10a
This isn't impacting the 6.1 series; the build succeeds there.
Additional information
I haven't found the download URL for the 6.0 series Development Snapshots from last year on here:
https://www.swift.org/install/macos/
It looks like only 6.1 series development snapshots are available.
If provided, I can edit the date of the URL in order to try to narrow down the commits where the breaking change was introduced.
The text was updated successfully, but these errors were encountered: