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-12253] Compiler segfault 11 on Xcode 11.4 (beta 2) #54680
Comments
On master:
|
Simpler reproducer (without class Base {
var myProperty: Int? { return nil }
}
class GenericDerived<T>: Base {
override var myProperty: Int { return 1 }
} |
Slava's got this one #30054 |
AnthonyLatsis
added
the
crash
Bug: A crash, i.e., an abnormal termination of software
label
Dec 12, 2022
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Attachment: Download
Environment
Apple Swift version 5.2 (swiftlang-1103.0.25.1 clang-1103.2.32.5)
macOS Catalina 10.15.3
Xcode 11.4 (beta 2)
Additional Detail from JIRA
md5: 09582bc40947696055f0db89c7bd9c5f
Issue Description:
*The compiler will Segfault in the following condition: *
1) Given a subclass of a base class
2) The subclass has a generic argument
3) The base class exposes an optional property
4) The subclass overrides the optional property with a non-optional property
Steps to repro
Paste the following code in a swift file, try to build:
Stacktrace
Stack trace:
1. Apple Swift version 5.2 (swiftlang-1103.0.25.1 clang-1103.2.32.5)
2. While generating vtable thunk SIL function "@$s12SegFaultTest14ViewControllerC9myIntegerSivgAA04BasedE0CADSiSgvgTV".
for getter for myInteger (at /Users/rogerio.assis/Desktop/z/SegFaultTest/SegFaultTest/ViewController.swift:18:18)
0 swift 0x0000000108fc4033 PrintStackTraceSignalHandler(void*) + 51
1 swift 0x0000000108fc37f0 SignalHandler(int) + 352
2 libsystem_platform.dylib 0x00007fff6e3c642d _sigtramp + 29
3 libsystem_platform.dylib 0x0000000000000008 _sigtramp + 2445515768
4 swift 0x00000001059ddbce swift::Type llvm::function_ref<swift::Type (swift::Type)>::callback_fn<swift::GenericFunctionType::substGenericArgs(swift::SubstitutionMap)::$_16>(long, swift::Type) + 78
5 swift 0x00000001059ddcba swift::GenericFunctionType::substGenericArgs(llvm::function_ref<swift::Type (swift::Type)>) const + 186
6 swift 0x0000000104d96bcf swift::Lowering::SILGenFunction::emitVTableThunk(swift::SILDeclRef, swift::SILDeclRef, swift::SILFunction*, swift::Lowering::AbstractionPattern, swift::CanTypeWrapper<swift::AnyFunctionType>, swift::CanTypeWrapper<swift::AnyFunctionType>, bool) + 1135
7 swift 0x0000000104db0903 (anonymous namespace)::SILGenType::emitType() + 5523
8 swift 0x0000000104cbff22 swift::ASTVisitor<swift::Lowering::SILGenModule, void, void, void, void, void, void>::visit(swift::Decl*) + 82
9 swift 0x0000000104cbf0ec swift::Lowering::SILGenModule::emitSourceFile(swift::SourceFile*) + 1356
10 swift 0x0000000104cc116e swift::SILModule::constructSIL(swift::ModuleDecl*, swift::Lowering::TypeConverter&, swift::SILOptions&, swift::FileUnit*) + 1438
11 swift 0x0000000104890855 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 60677
12 swift 0x0000000104801b83 main + 1299
13 libdyld.dylib 0x00007fff6e1cd7fd start + 1
14 libdyld.dylib 0x000000000000004b start + 2447583311
error: Segmentation fault: 11 (in target 'SegFaultTest' from project 'SegFaultTest')
The text was updated successfully, but these errors were encountered: