-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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-11125] new, recent Swift 5.1 compiler ambiguity error & crash when compiling project #53521
Comments
this was first reported as apple/swift-nio-ssl#116 |
CC @Lukasa |
@swift-ci create |
The compiler shouldn't crash, but that looks like a real ambiguity to me? |
Oh, I see. The ambiguity is in trying to figure out what the mangled name "typedef ECDSA_SIG from C" means, which is a true ambiguity…but shouldn't crash the compiler. I don't think anything changed here recently; it's just a comparison between a with-asserts and a no-asserts compiler. It's also unclear what should be done about this, since the typedefs really are incompatible and that means that you potentially won't be able to debug this program. |
@belkadan So yes, the But I can see that it would be troublesome for a debugger to find the right decl but tbh if somebody needs to debug BoringSSL, they'll have a bad day anyway 😛 |
The compiler can still see them both because it has to resolve imports. Maybe implementation-only imports will be able to handle this at some point, though. |
(To be clear, I definitely think this is a problem. I just don't know what to do about it.) |
Thanks @belkadan, do we understand why it’s working on Swift 5.0.x then? Because it seems to be no problem there... |
I suspect we just didn't have the assertion there, and it was just as broken. But you're right that I haven't confirmed that. |
Added a much smaller repro (in Pacakge.swift
and
|
@belkadan hmm, but before the crash (the assertion) we hit a compiler error, right? So even if the assertion were taken out, we'd still hit the compiler error which wasn't the case in 5.0.x. |
I am 95% sure the compiler error is coming from work being done for the assertion, but we'll have to test that. |
That makes sense! Thanks @belkadan |
Looks like this has been fixed with recent compilers (the clash-crash-repro no longer crashes the compiler). |
Attachment: Download
Additional Detail from JIRA
md5: c3526df0957007fcac1ce3f6d9b8dbcb
relates to:
Issue Description:
The attached sample project (folder name
qwer
) compiled just fine with Swift 5.1 from Xcode 11, beta 3 (Apple Swift version 5.1 (swiftlang-1100.0.212.5 clang-1100.0.28.2)
) but throws ambiguity errors and crashes the compiler with the 12th July 2019 snapshot ({{Apple Swift version 5.1-dev (LLVM 688b71e2f9, Swift a062b3c) }}).The project can be described by this
Package.swift
:and this
main.swift
repro:
for APNSwift, you'll need to have openssl 1.1 installed (just run
brew install brew install openssl@1.1
before the repro instructions)errors are:
The text was updated successfully, but these errors were encountered: