Skip to content

Commit d502529

Browse files
[swiftc] Add 💥 case (😢 → 55, 😀 → 5099) triggered in swift::Type::transform(…)
Add crash case with stack trace: ``` swift: /path/to/swift/lib/AST/ArchetypeBuilder.cpp:2049: auto swift::ArchetypeBuilder::mapTypeIntoContext(Module *, swift::GenericParamList *, swift::Type, swift::LazyResolver *)::(anonymous class)::operator()(swift::Type) const: Assertion `genericParamsDepth >= depth' failed. 9 swift 0x0000000001123b74 swift::Type::transform(llvm::function_ref<swift::Type (swift::Type)>) const + 36 10 swift 0x0000000001123e10 swift::Type::transform(llvm::function_ref<swift::Type (swift::Type)>) const + 704 11 swift 0x0000000000fefeeb swift::ArchetypeBuilder::mapTypeIntoContext(swift::ModuleDecl*, swift::GenericParamList*, swift::Type, swift::LazyResolver*) + 155 12 swift 0x0000000000f322e7 swift::createDesignatedInitOverride(swift::TypeChecker&, swift::ClassDecl*, swift::ConstructorDecl*, swift::DesignatedInitKind) + 119 13 swift 0x0000000000eb8173 swift::TypeChecker::addImplicitConstructors(swift::NominalTypeDecl*) + 3187 18 swift 0x0000000000eb1ef6 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 21 swift 0x0000000000f182ea swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 346 22 swift 0x0000000000f1814e swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46 23 swift 0x0000000000f18d13 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 179 25 swift 0x0000000000ed4201 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1281 26 swift 0x0000000000c61489 swift::CompilerInstance::performSema() + 3289 28 swift 0x00000000007d82c9 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2857 29 swift 0x00000000007a4308 main + 2872 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28344-swift-type-transform.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28344-swift-type-transform-510b91.o 1. While type-checking 'a' at validation-test/compiler_crashers/28344-swift-type-transform.swift:10:1 2. While type-checking 'A' at validation-test/compiler_crashers/28344-swift-type-transform.swift:10:8 <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ```
1 parent 4c1e6ac commit d502529

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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+
// REQUIRES: asserts
10+
func a{protocol A{class b<T=class d:A.b

0 commit comments

Comments
 (0)