Skip to content

Commit f74897f

Browse files
[swiftc] Add 💥 case (😢 → 45, 😀 → 5089) triggered in swift::DiagnosticEngine::emitDiagnostic(…)
Add crash case with stack trace: ``` swift: /path/to/llvm/include/llvm/Support/Casting.h:95: static bool llvm::isa_impl_cl<swift::ParenType, const swift::TypeBase *>::doit(const From *) [To = swift::ParenType, From = const swift::TypeBase *]: Assertion `Val && "isa<> used on a null pointer"' failed. 10 swift 0x00000000010c6e1b swift::DiagnosticEngine::emitDiagnostic(swift::Diagnostic const&) + 2923 11 swift 0x00000000010c608f swift::DiagnosticEngine::flushActiveDiagnostic() + 319 12 swift 0x0000000000e9c6e7 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 2391 19 swift 0x0000000000ea1586 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 20 swift 0x0000000000ec3732 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1026 21 swift 0x0000000000c59299 swift::CompilerInstance::performSema() + 3289 23 swift 0x00000000007d72b9 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2857 24 swift 0x00000000007a32c8 main + 2872 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28324-swift-diagnosticengine-emitdiagnostic.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28324-swift-diagnosticengine-emitdiagnostic-23bd53.o 1. While type-checking 'a' at validation-test/compiler_crashers/28324-swift-diagnosticengine-emitdiagnostic.swift:10:1 <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ```
1 parent 9b9513b commit f74897f

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+
protocol a{extension{@objc protocol A:a

0 commit comments

Comments
 (0)