Skip to content

Commit 53e1c51

Browse files
[swiftc (139 vs. 5189)] Add crasher in swift::ASTVisitor
Add test case for crash triggered in `swift::ASTVisitor`. Current number of unresolved compiler crashers: 139 (5189 resolved) Stack trace: ``` (discard_assignment_expr type='@lvalue _' location=validation-test/compiler_crashers/28518-anonymous-namespace-verifier-walktoexprpost-swift-expr.swift:9:3 range=[validation-test/compiler_crashers/28518-anonymous-namespace-verifier-walktoexprpost-swift-expr.swift:9:3 - line:9:3])#0 0x00000000031d7558 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/path/to/swift/bin/swift+0x31d7558) 1 0x00000000031d7da6 SignalHandler(int) (/path/to/swift/bin/swift+0x31d7da6) 2 0x00007f507ef86330 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10330) 3 0x00007f507d744c37 gsignal /build/eglibc-oGUzwX/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0 4 0x00007f507d748028 abort /build/eglibc-oGUzwX/eglibc-2.19/stdlib/abort.c:91:0 5 0x0000000000d6307b (/path/to/swift/bin/swift+0xd6307b) 6 0x0000000000d51df4 (anonymous namespace)::Verifier::walkToExprPost(swift::Expr*) (/path/to/swift/bin/swift+0xd51df4) 7 0x0000000000d6be1f (anonymous namespace)::Traversal::visit(swift::Expr*) (/path/to/swift/bin/swift+0xd6be1f) 8 0x0000000000d6a414 (anonymous namespace)::Traversal::visit(swift::Expr*) (/path/to/swift/bin/swift+0xd6a414) 9 0x0000000000d6c4cf (anonymous namespace)::Traversal::visitApplyExpr(swift::ApplyExpr*) (/path/to/swift/bin/swift+0xd6c4cf) 10 0x0000000000d6a46a (anonymous namespace)::Traversal::visit(swift::Expr*) (/path/to/swift/bin/swift+0xd6a46a) 11 0x0000000000d6c51d (anonymous namespace)::Traversal::visitApplyExpr(swift::ApplyExpr*) (/path/to/swift/bin/swift+0xd6c51d) 12 0x0000000000d6a46a (anonymous namespace)::Traversal::visit(swift::Expr*) (/path/to/swift/bin/swift+0xd6a46a) 13 0x0000000000d693df swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Stmt*) (/path/to/swift/bin/swift+0xd693df) 14 0x0000000000d67c7e (anonymous namespace)::Traversal::doIt(swift::Decl*) (/path/to/swift/bin/swift+0xd67c7e) 15 0x0000000000d67894 swift::Decl::walk(swift::ASTWalker&) (/path/to/swift/bin/swift+0xd67894) 16 0x0000000000dbd2fe swift::SourceFile::walk(swift::ASTWalker&) (/path/to/swift/bin/swift+0xdbd2fe) 17 0x0000000000d4f48c swift::verify(swift::SourceFile&) (/path/to/swift/bin/swift+0xd4f48c) 18 0x0000000000c16b22 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) (/path/to/swift/bin/swift+0xc16b22) 19 0x00000000009392a6 swift::CompilerInstance::performSema() (/path/to/swift/bin/swift+0x9392a6) 20 0x000000000047f2b5 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x47f2b5) 21 0x000000000047e14f swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x47e14f) 22 0x000000000044509a main (/path/to/swift/bin/swift+0x44509a) 23 0x00007f507d72ff45 __libc_start_main /build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:321:0 24 0x0000000000442816 _start (/path/to/swift/bin/swift+0x442816) ```
1 parent 6ccb662 commit 53e1c51

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 -emit-ir
9+
!(_=nil){}

0 commit comments

Comments
 (0)