Skip to content

Commit 97cd9e5

Browse files
[swiftc (47 vs. 5395)] Add crasher in swift::ASTVisitor
Add test case for crash triggered in `swift::ASTVisitor`. Current number of unresolved compiler crashers: 47 (5395 resolved) Stack trace: ``` (brace_stmt))))#0 0x000000000351c4f8 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/path/to/swift/bin/swift+0x351c4f8) 1 0x000000000351cc36 SignalHandler(int) (/path/to/swift/bin/swift+0x351cc36) 2 0x00007f82ee31d3e0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x113e0) 3 0x00007f82ecc83428 gsignal /build/glibc-Qz8a69/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0 4 0x00007f82ecc8502a abort /build/glibc-Qz8a69/glibc-2.23/stdlib/abort.c:91:0 5 0x0000000000e03709 (anonymous namespace)::Verifier::walkToStmtPost(swift::Stmt*) (/path/to/swift/bin/swift+0xe03709) 6 0x0000000000e15d72 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Stmt*) (/path/to/swift/bin/swift+0xe15d72) 7 0x0000000000e13bb7 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Expr*) (/path/to/swift/bin/swift+0xe13bb7) 8 0x0000000000e153e1 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Expr*) (/path/to/swift/bin/swift+0xe153e1) 9 0x0000000000e156c7 (anonymous namespace)::Traversal::visitCollectionExpr(swift::CollectionExpr*) (/path/to/swift/bin/swift+0xe156c7) 10 0x0000000000e15c84 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Stmt*) (/path/to/swift/bin/swift+0xe15c84) 11 0x0000000000e12d1d (anonymous namespace)::Traversal::doIt(swift::Decl*) (/path/to/swift/bin/swift+0xe12d1d) 12 0x0000000000e12a94 swift::Decl::walk(swift::ASTWalker&) (/path/to/swift/bin/swift+0xe12a94) 13 0x0000000000e6c24e swift::SourceFile::walk(swift::ASTWalker&) (/path/to/swift/bin/swift+0xe6c24e) 14 0x0000000000dfabd5 swift::verify(swift::SourceFile&) (/path/to/swift/bin/swift+0xdfabd5) 15 0x0000000000b830d1 swift::Parser::parseTopLevel() (/path/to/swift/bin/swift+0xb830d1) 16 0x0000000000bb7450 swift::parseIntoSourceFile(swift::SourceFile&, unsigned int, bool*, swift::SILParserState*, swift::PersistentParserState*, swift::DelayedParsingCallbacks*) (/path/to/swift/bin/swift+0xbb7450) 17 0x00000000009990f3 swift::CompilerInstance::performSema() (/path/to/swift/bin/swift+0x9990f3) 18 0x000000000047ca6a swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x47ca6a) 19 0x000000000043b2a7 main (/path/to/swift/bin/swift+0x43b2a7) 20 0x00007f82ecc6e830 __libc_start_main /build/glibc-Qz8a69/glibc-2.23/csu/../csu/libc-start.c:325:0 21 0x00000000004386e9 _start (/path/to/swift/bin/swift+0x4386e9) ```
1 parent 9e83570 commit 97cd9e5

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 - 2017 Apple Inc. and the Swift project authors
3+
// Licensed under Apache License v2.0 with Runtime Library Exception
4+
//
5+
// See https://swift.org/LICENSE.txt for license information
6+
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
7+
8+
// RUN: not --crash %target-swift-frontend %s -emit-ir
9+
[{{#if0 guard let c:}

0 commit comments

Comments
 (0)