Skip to content
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

Crash in LLVM when compiling SwiftCompilerSources on Windows with a 5.10 toolchain #73253

Open
eeckstein opened this issue Apr 25, 2024 · 1 comment
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. c++ interop Feature: Interoperability with C++ c++ to swift Feature → c++ interop: c++ to swift CodeGen crash Bug: A crash, i.e., an abnormal termination of software swift 5.10 Windows Platform: Windows

Comments

@eeckstein
Copy link
Contributor

Description

The problem occurs when calling the C++ imported function from public func getFunctionType(withNoEscape: Bool) -> Type in Type.swift.

Crashes in LLVM with:

Attribute 'zeroext' applied to incompatible type!
  call void @"?getFunctionTypeWithNoEscape@BridgedType@@QEBA?AU1@_N@Z"(ptr %3, ptr zeroext sret(%struct.BridgedType) %4, i1 %0)

Reproduction

Once #73247 lands, revert the "SwiftCompilerSources: workaround a compiler crash on windows by disabling convert_function simplification" commit of this PR

Expected behavior

no crash

Environment

reproducible with top-of main on Windows

Additional information

No response

@eeckstein eeckstein added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels c++ interop Feature: Interoperability with C++ Windows Platform: Windows swift 5.10 labels Apr 25, 2024
@AnthonyLatsis AnthonyLatsis added CodeGen crash Bug: A crash, i.e., an abnormal termination of software c++ to swift Feature → c++ interop: c++ to swift and removed triage needed This issue needs more specific labels labels Apr 25, 2024
@eeckstein
Copy link
Contributor Author

Still happening in Swift 6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. c++ interop Feature: Interoperability with C++ c++ to swift Feature → c++ interop: c++ to swift CodeGen crash Bug: A crash, i.e., an abnormal termination of software swift 5.10 Windows Platform: Windows
Projects
None yet
Development

No branches or pull requests

3 participants