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-15755] Swift 5.6-dev crashes when trying to compile SwiftGLib #58032
Comments
This is not reproducible for me with swift-DEVELOPMENT-SNAPSHOT-2022-01-09-a-osx. I'm getting these error messages when trying to build the archive from attachments: SwiftGLib/Sources/GLib/GLib-2.0-constants.swift:706:31: error: cannot find 'G_VA_COPY_AS_ARRAY' in scope swift --version shows this with that snapshot: Apple Swift version 5.6-dev (LLVM 7b20e61dd04138a, Swift 9438cf6) |
Comment by Rene Hexel (JIRA) The auto-generated Glib-2.0-*.swift files are for the corresponding x86_64 .gir files, so I would not expect them to work out of the box on arm64. I don't have an arm64 Mac, but this should be reproducible on an Intel Mac. If you wanted to try and reproduce this on arm64, these would be the steps to take (but YMMV as glib and the generated files would most likely be different): brew install glib gobject-introspection |
Thanks, with these steps it builds successfully for me with both Xcode 13.2.1 and swift-DEVELOPMENT-SNAPSHOT-2022-01-09-a. The latest 5.6 snapshot from swift.org is unfortunately broken for me, not with SwiftGLib, but for any purposes with unrelated errors, so I couldn't try that. |
Comment by Rene Hexel (JIRA) I did some more digging and have attached a minimal example (VAListPointer.zip) that reproduces this. This builds fine for any Xcode versions of Swift (including 5.6 from the latest beta), but crashes with the latest snapshots for both trunk and 5.6 (i.e. swift-DEVELOPMENT-SNAPSHOT-2022-01-09-a and swift-5.6-DEVELOPMENT-SNAPSHOT-2022-01-11-a). The problem goes away when I replace UnsafeMutablePointer<va_list> with CVaListPointer, but obviously neither should crash the compiler. With swift-DEVELOPMENT-SNAPSHOT-2022-01-09-a for x86_64, i.e. Apple Swift version 5.6-dev (LLVM 7b20e61dd04138a, Swift 9438cf6) I get the following crash/backtrace for the VAListPointer package example: $ swift build
|
Attachment: Download
Environment
Darwin Kernel Version 21.3.0: Mon Jan 3 23:49:26 PST 2022; root:xnu-8019.80.24~15/RELEASE_X86_64 x86_64
Apple Swift version 5.6-dev (LLVM 64a4d678f114158, Swift 8ae983c3480462b)
Target: x86_64-apple-macosx12.0
glib-2.70.2
(installed via
brew install glib
)Additional Detail from JIRA
md5: 0268cd20d5fb23438d0cfd4a3226b4dd
Issue Description:
Trying to run
swift build
with the January 11 macOS snapshot for 5.6 crashes with the following output:The text was updated successfully, but these errors were encountered: