Skip to content

Commit 10d79bb

Browse files
[swiftc (132 vs. 5230)] Add crasher in swift::ASTVisitor
Add test case for crash triggered in `swift::ASTVisitor`. Current number of unresolved compiler crashers: 132 (5230 resolved) Stack trace: ``` ))#0 0x00000000033f9978 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/path/to/swift/bin/swift+0x33f9978) 1 0x00000000033fa0b6 SignalHandler(int) (/path/to/swift/bin/swift+0x33fa0b6) 2 0x00007f8c52bab3e0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x113e0) 3 0x00007f8c512d9428 gsignal /build/glibc-Qz8a69/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0 4 0x00007f8c512db02a abort /build/glibc-Qz8a69/glibc-2.23/stdlib/abort.c:91:0 5 0x0000000000dabcad (anonymous namespace)::Verifier::walkToStmtPost(swift::Stmt*) (/path/to/swift/bin/swift+0xdabcad) 6 0x0000000000dbd8d2 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Stmt*) (/path/to/swift/bin/swift+0xdbd8d2) 7 0x0000000000dba934 (anonymous namespace)::Traversal::doIt(swift::Decl*) (/path/to/swift/bin/swift+0xdba934) 8 0x0000000000dba6c4 swift::Decl::walk(swift::ASTWalker&) (/path/to/swift/bin/swift+0xdba6c4) 9 0x0000000000e1259e swift::SourceFile::walk(swift::ASTWalker&) (/path/to/swift/bin/swift+0xe1259e) 10 0x0000000000da37d5 swift::verify(swift::SourceFile&) (/path/to/swift/bin/swift+0xda37d5) 11 0x0000000000b538a1 swift::Parser::parseTopLevel() (/path/to/swift/bin/swift+0xb538a1) 12 0x0000000000b87980 swift::parseIntoSourceFile(swift::SourceFile&, unsigned int, bool*, swift::SILParserState*, swift::PersistentParserState*, swift::DelayedParsingCallbacks*) (/path/to/swift/bin/swift+0xb87980) 13 0x000000000097f673 swift::CompilerInstance::performSema() (/path/to/swift/bin/swift+0x97f673) 14 0x000000000047c1d6 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x47c1d6) 15 0x000000000047b0dc swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x47b0dc) 16 0x0000000000439a07 main (/path/to/swift/bin/swift+0x439a07) 17 0x00007f8c512c4830 __libc_start_main /build/glibc-Qz8a69/glibc-2.23/csu/../csu/libc-start.c:325:0 18 0x0000000000436e49 _start (/path/to/swift/bin/swift+0x436e49) ```
1 parent 1ff2154 commit 10d79bb

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 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+
#if#selector(struct r

0 commit comments

Comments
 (0)