Skip to content

Commit c5d8f12

Browse files
Add πŸ’₯ (😒 β†’ 54, πŸ˜€ β†’ 5107) in swift::FunctionType::get(…)
Add test case for crash triggered in `swift::FunctionType::get(…)`. <details> <summary>Stack trace:</summary> ``` 4 swift 0x000000000100595b swift::FunctionType::get(swift::Type, swift::Type, swift::AnyFunctionType::ExtInfo const&) + 27 5 swift 0x0000000000f3d4a5 swift::constraints::ConstraintSystem::getTypeOfMemberReference(swift::Type, swift::ValueDecl*, bool, bool, swift::constraints::ConstraintLocatorBuilder, swift::DeclRefExpr const*, llvm::DenseMap<swift::CanType, swift::TypeVariableType*, llvm::DenseMapInfo<swift::CanType>, llvm::detail::DenseMapPair<swift::CanType, swift::TypeVariableType*> >*) + 2309 10 swift 0x0000000000efb560 swift::TypeChecker::inferDefaultWitnesses(swift::ProtocolDecl*) + 288 11 swift 0x0000000000ed3ee8 swift::finishTypeChecking(swift::SourceFile&) + 536 12 swift 0x0000000000c60d3a swift::CompilerInstance::performSema() + 3722 14 swift 0x00000000007d8429 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2857 15 swift 0x00000000007a4458 main + 2872 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28351-swift-functiontype-get.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28351-swift-functiontype-get-b083da.o <unknown>:0: error: unable to execute command: Segmentation fault <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` </details>
1 parent 77da371 commit c5d8f12

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// This source file is part of the Swift.org open source project
2+
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
3+
// Licensed under Apache License v2.0 with Runtime Library Exception
4+
//
5+
// See http://swift.org/LICENSE.txt for license information
6+
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
7+
8+
// RUN: not --crash %target-swift-frontend %s -parse
9+
extension A{{}protocol A}protocol A:class{protocol A{}typealias e:A

0 commit comments

Comments
Β (0)